Chromium Code Reviews| Index: sdk/lib/_internal/compiler/js_lib/js_mirrors.dart |
| diff --git a/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart b/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart |
| index 5f613d37079abbf891ba64dff62a97645616f613..7a9aafac9f5003565c3110e42c5a7e31d5e17ea6 100644 |
| --- a/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart |
| +++ b/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart |
| @@ -733,6 +733,8 @@ Map<Symbol, Mirror> filterMembers(List<MethodMirror> methods, |
| } |
| // Constructors aren't 'members'. |
| if (method.isConstructor) continue; |
| + // Filter out synthetic tear-off stubs |
| + if (JS('bool', r'#.$getterStub', method._jsFunction)) continue; |
|
ahe
2014/11/25 09:33:03
Need to use r'!!#.$getterStub' to ensure that the
herhut
2014/11/25 14:03:20
Done.
|
| // Use putIfAbsent to filter-out getters corresponding to variables. |
| result.putIfAbsent(method.simpleName, () => method); |
| } |
| @@ -1664,6 +1666,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
| if (simpleName == null) continue; |
| var function = JS('', '#[#]', prototype, key); |
| if (isNoSuchMethodStub(function)) continue; |
| + if (isAliasedSuperMethod(function, key)) continue; |
| var mirror = |
| new JsMethodMirror.fromUnmangledName( |
| simpleName, function, false, false); |
| @@ -2905,6 +2908,13 @@ bool isNoSuchMethodStub(var jsFunction) { |
| return JS('bool', r'#.$reflectable == 2', jsFunction); |
| } |
| +/// Returns true if [key] is only an aliased entry for [function] in the |
| +/// prototype. |
| +bool isAliasedSuperMethod(var jsFunction, String key) { |
|
ahe
2014/11/25 09:33:03
I can imagine wanting more than one alias for a fu
herhut
2014/11/25 14:03:20
Done.
|
| + var aliasName = JS('String', r'#.$aliasName', jsFunction); |
|
ahe
2014/11/25 09:33:03
I think this has to be:
JS('String|Null', r'#.$al
herhut
2014/11/25 14:03:20
Done.
|
| + return key == aliasName; |
| +} |
| + |
| class NoSuchStaticMethodError extends Error implements NoSuchMethodError { |
| static const int MISSING_CONSTRUCTOR = 0; |
| static const int MISSING_METHOD = 1; |