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

Unified Diff: frog/leg/elements/elements.dart

Issue 9327001: Implement super initializers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 10 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: frog/leg/elements/elements.dart
diff --git a/frog/leg/elements/elements.dart b/frog/leg/elements/elements.dart
index 3b4f479e72ca8ea02dd46d31a25269c9cbc7e3b9..af1c075b79be5d364797992a203d8d5c2834cb74 100644
--- a/frog/leg/elements/elements.dart
+++ b/frog/leg/elements/elements.dart
@@ -369,8 +369,7 @@ class FunctionElement extends Element {
ElementKind kind,
Modifiers this.modifiers,
Element enclosing)
- : super(name, kind, enclosing),
- cachedNode = node;
+ : super(name, kind, enclosing), cachedNode = node;
FunctionElement.from(SourceString name,
FunctionElement other,
@@ -562,8 +561,8 @@ class ClassElement extends ContainerElement {
return this;
}
- Element lookupLocalMember(SourceString name) {
- return localMembers[name];
+ Element lookupLocalMember(SourceString memberName) {
+ return localMembers[memberName];
}
Element lookupConstructor(SourceString className,
@@ -572,13 +571,14 @@ class ClassElement extends ContainerElement {
Element noMatch(Element)]) {
// TODO(karlklose): have a map from class names to a map of constructors
// instead of creating the name here?
- SourceString name;
+ SourceString normalizedName;
if (constructorName !== const SourceString('')) {
- name = Elements.constructConstructorName(className, constructorName);
+ normalizedName = Elements.constructConstructorName(className,
+ constructorName);
} else {
- name = className;
+ normalizedName = className;
}
- Element result = constructors[name];
+ Element result = constructors[normalizedName];
if (result === null && noMatch !== null) {
result = noMatch(lookupLocalMember(constructorName));
}
« no previous file with comments | « frog/leg/compiler.dart ('k') | frog/leg/resolver.dart » ('j') | frog/leg/ssa/builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698