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

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

Issue 21511003: Support symbol literals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index 12be2f687abdea5f1bd82487b3ae575be137cba5..352f1a014b7e159fbd5e80ba5ca0e0cf0dd7bfcc 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -4055,6 +4055,14 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
void visitLiteralString(LiteralString node) {
stack.add(graph.addConstantString(node.dartString, node, compiler));
}
+
+ void visitSymbolLiteral(SymbolLiteral node) {
+ ConstantHandler handler = compiler.constantHandler;
+ ConstructedConstant constant =
+ handler.compileNodeWithDefinitions(node, elements);
+ stack.add(graph.addConstant(constant, compiler));
+ compiler.enqueuer.codegen.registerConstSymbol(node.nameString, elements);
+ }
void visitStringJuxtaposition(StringJuxtaposition node) {
if (!node.isInterpolation) {

Powered by Google App Engine
This is Rietveld 408576698