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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 14079003: Implement Symbol correctly in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index ea348f71dfc4f73529f7d843c12eb66ba32f06be..b608a2f5a05d9342d80778900e9bc9dcb1ec9f72 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -3342,6 +3342,15 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
}
FunctionElement functionElement = constructor;
constructor = functionElement.redirectionTarget;
+ final bool isSymbolConstructor =
+ functionElement == compiler.symbolConstructor;
+
+ if (isSymbolConstructor) {
+ // TODO(ahe): Don't simply use head.
+ constructor = constructor.getEnclosingClass().constructors.head;
ahe 2013/04/18 11:34:44 Will fix before submitting.
+ selector = new Selector.call(const SourceString('validate'), null, 1);
+ }
+
// TODO(5346): Try to avoid the need for calling [declaration] before
// creating an [HStatic].
HInstruction target = new HStatic(constructor.declaration);

Powered by Google App Engine
This is Rietveld 408576698