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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 1060813008: Handle symbol literals (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Add comment Created 5 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
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index afbeb695f176f000612fd3b1258acf8bf09396d4..e9389cc8570cf1e52035355eb0a879f6af329bfb 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -2053,6 +2053,16 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
visitNullLiteral(NullLiteral node) => new JS.LiteralNull();
@override
+ visitSymbolLiteral(SymbolLiteral node) {
+ // TODO(vsm): When we canonicalize, we need to treat private symbols
+ // correctly.
+ // TODO(vsm): Make this core.Symbol instead.
+ var name = js.escapedString(node.components.join('.'));
+ var symbol = js.call('new _internal.Symbol(#)', name);
+ return js.commentExpression('Unimplemented const', symbol);
+ }
+
+ @override
visitListLiteral(ListLiteral node) {
JS.Expression list = new JS.ArrayInitializer(_visitList(node.elements));
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698