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

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

Issue 9695025: Fixes for previous CL review comments (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 5a432f9e82d528341914a7a803788629bed8c863..fed0d95c6503116dc41f9b62448ec9c4e3f8a8f5 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Elements.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Elements.java
@@ -85,7 +85,7 @@ public class Elements {
return new TypeVariableElementImplementation(name, bound);
}
- public static VariableElement variableElement(Element owner,
+ public static VariableElement variableElement(EnclosingElement owner,
DartVariable node,
String name,
Modifiers modifiers) {
@@ -99,7 +99,7 @@ public class Elements {
null);
}
- public static VariableElement parameterElement(Element owner,
+ public static VariableElement parameterElement(EnclosingElement owner,
DartParameter node,
String name,
Modifiers modifiers) {
@@ -190,7 +190,7 @@ static FieldElementImplementation fieldFromNode(DartField node,
return ClassElementImplementation.named(name);
}
- static TypeVariableElement typeVariableFromNode(DartTypeParameter node, Element element) {
+ static TypeVariableElement typeVariableFromNode(DartTypeParameter node, EnclosingElement element) {
return TypeVariableElementImplementation.fromNode(node, element);
}
@@ -342,7 +342,7 @@ static FieldElementImplementation fieldFromNode(DartField node,
}
static List<TypeVariable> makeTypeVariables(List<DartTypeParameter> parameterNodes,
- Element element) {
+ EnclosingElement element) {
if (parameterNodes == null) {
return Arrays.<TypeVariable>asList();
}
@@ -438,14 +438,6 @@ static FieldElementImplementation fieldFromNode(DartField node,
}
/**
- * @return the {@link SourceInfo} of the name name of underlying {@link Element}, or
- * {@link SourceInfo} of {@link Element} itself.
- */
- public static SourceInfo getNameLocation(Element element) {
- return element.getNameLocation();
- }
-
- /**
* @return the {@link String} which contains user-readable description of "target" {@link Element}
* location relative to "source".
*/
@@ -453,7 +445,7 @@ static FieldElementImplementation fieldFromNode(DartField node,
// Prepare "target" SourceInfo.
SourceInfo targetInfo;
{
- targetInfo = getNameLocation(target);
+ targetInfo = target.getNameLocation();
if (targetInfo == null) {
return "unknown";
}

Powered by Google App Engine
This is Rietveld 408576698