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 |