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

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: Updated cf. comments. Created 7 years, 3 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 5e34fcd429b455817fa53ed143fba77260baa309..3da3d209abb718ab71f8e9cd17f08d6d3e204da2 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -4074,6 +4074,14 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
stack.add(graph.addConstantString(node.dartString, node, compiler));
}
+ void visitLiteralSymbol(LiteralSymbol 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) {
// This is a simple string with no interpolations.

Powered by Google App Engine
This is Rietveld 408576698