Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
index 7e364c094b0b6bf319dfd1934609c1a740583e22..048874b62ac8c80d130b7286347daed64628b18a 100644 |
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
@@ -1722,7 +1722,9 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
// property should not be mangled. |
push(new js.PropertyAccess.field(pop(), 'length'), node); |
} else { |
- String name = backend.namer.getName(node.element); |
+ String name = node.element.isNative() |
ngeoffray
2012/11/28 20:31:23
Move this in the namer? It would avoid the code du
|
+ ? node.element.nativeName() |
+ : backend.namer.getName(node.element); |
push(new js.PropertyAccess.field(pop(), name), node); |
HType receiverHType = types[node.receiver]; |
DartType type = receiverHType.computeType(compiler); |
@@ -1734,7 +1736,9 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
} |
visitFieldSet(HFieldSet node) { |
- String name = backend.namer.getName(node.element); |
+ String name = node.element.isNative() |
+ ? node.element.nativeName() |
+ : backend.namer.getName(node.element); |
DartType type = types[node.receiver].computeType(compiler); |
if (type != null) { |
// Field setters in the generative constructor body are handled in a |