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

Unified Diff: lib/src/compiler/code_generator.dart

Issue 1915533004: Fixes #519 (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 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 | « no previous file | test/browser/language_tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/code_generator.dart
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart
index 78636a1fee364daef6630174b4d6576d594ba010..2c19b39ef6f2c7ac0a9af6e10978145d953ec503 100644
--- a/lib/src/compiler/code_generator.dart
+++ b/lib/src/compiler/code_generator.dart
@@ -3430,11 +3430,11 @@ class CodeGenerator extends GeneralizingAstVisitor
@override
visitSymbolLiteral(SymbolLiteral node) {
- JS.New emitSymbol() {
+ JS.Expression emitSymbol() {
// TODO(vsm): When we canonicalize, we need to treat private symbols
// correctly.
var name = js.string(node.components.join('.'), "'");
- return new JS.New(_emitTypeName(types.symbolType), [name]);
vsm 2016/04/22 18:23:49 Note: we need #.new to invoke the factory construc
Jennifer Messerly 2016/04/25 16:31:08 Nice. I wonder if instead of hard coding we should
+ return js.call('#.new(#)', [_emitTypeName(types.symbolType), name]);
}
return _emitConst(emitSymbol);
}
« no previous file with comments | « no previous file | test/browser/language_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698