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

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

Issue 9692002: Step back and remove more getNode() invocations (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/ElementMap.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/ElementMap.java b/compiler/java/com/google/dart/compiler/resolver/ElementMap.java
index 04edc460a5655f570810fa96fce07ea9c6498306..314d5dffbb1d82bdee2be312f96314850b11ad27 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ElementMap.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ElementMap.java
@@ -4,9 +4,9 @@
package com.google.dart.compiler.resolver;
-import com.google.dart.compiler.ast.DartLabel;
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 java.util.ArrayList;
@@ -24,8 +24,9 @@ class ElementMap {
* with the same name.
*/
static class ElementHolder implements Element {
- private static final String INTERNAL_ONLY_ERROR = "ElementHolder should not be accessed outside this class";
-
+ private static final String INTERNAL_ONLY_ERROR =
+ "ElementHolder should not be accessed outside this class";
+
final String name;
final Element element;
ElementHolder nextHolder;
@@ -34,6 +35,11 @@ class ElementMap {
this.name = name;
this.element = element;
}
+
+ @Override
+ public SourceInfo getNameLocation() {
+ throw new AssertionError(INTERNAL_ONLY_ERROR);
+ }
@Override
public EnclosingElement getEnclosingElement() {
@@ -48,7 +54,7 @@ class ElementMap {
@Override
public Modifiers getModifiers() {
throw new AssertionError(INTERNAL_ONLY_ERROR);
- }
+ }
@Override
public String getName() {
@@ -58,27 +64,28 @@ class ElementMap {
@Override
public DartNode getNode() {
throw new AssertionError(INTERNAL_ONLY_ERROR);
- }
+ }
@Override
public String getOriginalName() {
throw new AssertionError(INTERNAL_ONLY_ERROR);
- }
+ }
@Override
public Type getType() {
throw new AssertionError(INTERNAL_ONLY_ERROR);
- }
+ }
@Override
public boolean isDynamic() {
throw new AssertionError(INTERNAL_ONLY_ERROR);
- }
+ }
@Override
- public void setNode(DartLabel node) {
+ public SourceInfo getSourceInfo() {
throw new AssertionError(INTERNAL_ONLY_ERROR);
- }
+ }
+
}
// Array indexed by hashed name ... length is always power of 2

Powered by Google App Engine
This is Rietveld 408576698