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

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

Issue 1099703003: Treat our type objects as core.Type (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: 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
« lib/runtime/dart_runtime.js ('K') | « lib/runtime/dart_runtime.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 2f599e5573417fe8b45eed0669d0580299bb6f9c..fe26d45e42adf900c3800cc6c4211180c1dc6c95 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -1047,7 +1047,12 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
if (element.enclosingElement is CompilationUnitElement &&
(element.library != libraryInfo.library ||
element is TopLevelVariableElement && !element.isConst)) {
- return js.call('#.#', [_libraryName(element.library), name]);
+ dynamic memberName = name;
vsm 2015/04/24 00:12:11 Note: this is to map exports._foo as exports[_foo]
Jennifer Messerly 2015/04/24 00:43:14 Interesting, how is that used? Would anybody have
vsm 2015/04/24 13:25:44 Yes, I was hitting this in angular (application.js
Jennifer Messerly 2015/04/24 21:23:23 Aha, lazy top-level field. Interesting. I suppose
vsm 2015/05/01 17:24:12 Not sure I still need this with your recent change
+ if (name.startsWith('_')) {
Jennifer Messerly 2015/04/24 21:23:23 in the if body: assert(element.library == current
Jennifer Messerly 2015/04/24 21:25:13 Maybe won't need with emitMemberName suggestion th
+ memberName = _privateNames.putIfAbsent(
Jennifer Messerly 2015/04/24 21:23:23 Maybe should go through emitMemberName then, with
+ name, () => _initSymbol(new JSTemporary(name)));
+ }
+ return js.call('#.#', [_libraryName(element.library), memberName]);
}
// Unqualified class member. This could mean implicit-this, or implicit
« lib/runtime/dart_runtime.js ('K') | « lib/runtime/dart_runtime.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698