Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: compiler/java/com/google/dart/compiler/resolver/AbstractElement.java

Issue 9689063: Visit Node in CompileTimeConstantAnalyzer only if Node based (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/resolver/AbstractElement.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/AbstractElement.java b/compiler/java/com/google/dart/compiler/resolver/AbstractElement.java
deleted file mode 100644
index 18501e89e8b306b1c85b67b286aaec567879d825..0000000000000000000000000000000000000000
--- a/compiler/java/com/google/dart/compiler/resolver/AbstractElement.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.resolver;
-
-import com.google.dart.compiler.ast.DartNode;
-import com.google.dart.compiler.ast.Modifiers;
-import com.google.dart.compiler.common.SourceInfo;
-import com.google.dart.compiler.type.Type;
-import com.google.dart.compiler.type.Types;
-
-abstract class AbstractElement implements Element {
- private final DartNode node;
- private final String name;
- private SourceInfo sourceInfo;
-
- AbstractElement(DartNode node, String name) {
- // TODO(scheglov) in the future we will not use ASTNode and remove null check
- this.sourceInfo = node != null ? node.getSourceInfo() : SourceInfo.UNKNOWN;
- this.node = node;
- this.name = name;
- }
-
- @Override
- public DartNode getNode() {
- return node;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getOriginalName() {
- return name;
- }
-
- @Override
- public abstract ElementKind getKind();
-
- @Override
- public final String toString() {
- return getKind() + " " + getName();
- }
-
- @Override
- public Type getType() {
- return Types.newDynamicType();
- }
-
- void setType(Type type) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean isDynamic() {
- return false;
- }
-
- @Override
- public Modifiers getModifiers() {
- return Modifiers.NONE;
- }
-
- @Override
- public EnclosingElement getEnclosingElement() {
- return null;
- }
-
- @Override
- public SourceInfo getNameLocation() {
- return sourceInfo;
- }
-
- @Override
- public final SourceInfo getSourceInfo() {
- return sourceInfo;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698