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

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: Address review comments 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..37829d7c3c4f4cab131939d52c1644da8e0abbb7 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -3342,6 +3342,18 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
}
FunctionElement functionElement = constructor;
constructor = functionElement.redirectionTarget;
+ final bool isSymbolConstructor =
+ functionElement == compiler.symbolConstructor;
+
+ if (isSymbolConstructor) {
+ constructor = compiler.symbolValidatedConstructor;
+ assert(invariant(node, constructor != null,
+ message: 'Constructor Symbol.validated is missing'));
+ selector = compiler.symbolValidatedConstructorSelector;
+ assert(invariant(node, selector != null,
+ message: 'Constructor Symbol.validated is missing'));
+ }
+
// 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