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

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

Issue 9700019: Use NodeElement to access Node in Resolver (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/Elements.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Elements.java b/compiler/java/com/google/dart/compiler/resolver/Elements.java
index 1611acf46f3b0324b4793a9189a55328f6a6f08f..bb58dc57d512cba5f317bd18107c6caa2e932cfd 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Elements.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Elements.java
@@ -117,11 +117,11 @@ public class Elements {
return new SuperElementImplementation(node, cls);
}
- static void addConstructor(ClassElement cls, ConstructorElement constructor) {
+ static void addConstructor(ClassElement cls, ConstructorNodeElement constructor) {
((ClassElementImplementation) cls).addConstructor(constructor);
}
- static void addField(EnclosingElement holder, FieldElement field) {
+ static void addField(EnclosingElement holder, FieldNodeElement field) {
if (ElementKind.of(holder).equals(ElementKind.CLASS)) {
((ClassElementImplementation) holder).addField(field);
} else if (ElementKind.of(holder).equals(ElementKind.LIBRARY)) {
@@ -132,7 +132,7 @@ public class Elements {
}
@VisibleForTesting
- public static void addMethod(EnclosingElement holder, MethodElement method) {
+ public static void addMethod(EnclosingElement holder, MethodNodeElement method) {
if (ElementKind.of(holder).equals(ElementKind.CLASS)) {
((ClassElementImplementation) holder).addMethod(method);
} else if (ElementKind.of(holder).equals(ElementKind.LIBRARY)) {
@@ -158,13 +158,12 @@ public class Elements {
return MethodElementImplementation.fromFunctionExpression(node, modifiers);
}
- @VisibleForTesting
- public static MethodElement methodFromMethodNode(DartMethodDefinition node,
+ public static MethodNodeElement methodFromMethodNode(DartMethodDefinition node,
EnclosingElement holder) {
return MethodElementImplementation.fromMethodNode(node, holder);
}
- static ConstructorElement constructorFromMethodNode(DartMethodDefinition node,
+ static ConstructorNodeElement constructorFromMethodNode(DartMethodDefinition node,
String name,
ClassElement declaringClass,
ClassElement constructorType) {

Powered by Google App Engine
This is Rietveld 408576698