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

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

Issue 14646031: Implement invoke, setField, and getField (unminified). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make expando private Created 7 years, 7 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 ba26fe23147674269a9ac7c65faf7bb47c34f09e..52b2d7bad548280a59d61e912ceb3c9913c5fe9c 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -3650,6 +3650,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
visitNewExpression(NewExpression node) {
Element element = elements[node.send];
+ final bool isSymbolConstructor = element == compiler.symbolConstructor;
ngeoffray 2013/05/08 12:34:06 Remove final.
ahe 2013/05/08 21:47:53 Why?
ngeoffray 2013/05/13 10:31:40 Consistency? We never use "final" for local variab
if (!Elements.isErroneousElement(element)) {
FunctionElement function = element;
element = function.redirectionTarget;
@@ -3669,6 +3670,12 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
ConstantHandler handler = compiler.constantHandler;
Constant constant = handler.compileNodeWithDefinitions(node, elements);
stack.add(graph.addConstant(constant));
+ if (isSymbolConstructor) {
+ ConstructedConstant symbol = constant;
+ StringConstant stringConstant = symbol.fields.single;
+ String nameString = stringConstant.toDartString().slowToString();
+ compiler.enqueuer.codegen.registerConstSymbol(nameString, elements);
+ }
} else {
DartType type = elements.getType(node);
if (compiler.enableTypeAssertions && type.isMalformed) {

Powered by Google App Engine
This is Rietveld 408576698