Index: dart/sdk/lib/_internal/lib/js_mirrors.dart |
diff --git a/dart/sdk/lib/_internal/lib/js_mirrors.dart b/dart/sdk/lib/_internal/lib/js_mirrors.dart |
index a3dbfc6dee8df23dc78b1e6caf9fdd6540a4ebc7..ada54164b34276d916628106432f730312dba25f 100644 |
--- a/dart/sdk/lib/_internal/lib/js_mirrors.dart |
+++ b/dart/sdk/lib/_internal/lib/js_mirrors.dart |
@@ -562,8 +562,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
if (method.isGetter) { |
// TODO(ahe): This is a hack to remove getters corresponding to a field. |
- String name = n(method.simpleName); |
- if (fields[s(name)] != null) continue; |
+ if (fields[method.simpleName] != null) continue; |
result[method.simpleName] = method; |
} |
@@ -756,12 +755,17 @@ class JsVariableMirror extends JsDeclarationMirror implements VariableMirror { |
accessorName = accessorName.substring(0, divider); |
jsName = accessorName.substring(divider + 1); |
} |
- var unmangledName = |
- (isStatic ? mangledGlobalNames : mangledNames)[accessorName]; |
+ var unmangledName; |
+ if (isStatic) { |
+ unmangledName = mangledGlobalNames[accessorName]; |
+ } else { |
+ String getterPrefix = JS('String', 'init.getterPrefix'); |
+ unmangledName = mangledNames['$getterPrefix$accessorName']; |
+ } |
if (unmangledName == null) unmangledName = accessorName; |
if (!hasSetter) { |
// TODO(ahe): This is a hack to handle checked setters in checked mode. |
- var setterName = s('$accessorName='); |
+ var setterName = s('$unmangledName='); |
for (JsMethodMirror method in owner._methods) { |
if (method.simpleName == setterName) { |
isFinal = false; |