| 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 9fc50b79836fd5d187c75d30a091f6f814f8cc1e..c69e159d9803716540224ef8862e6814bfdb8b75 100644
|
| --- a/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
|
| +++ b/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
|
| @@ -991,7 +991,7 @@ class JsInstanceMirror extends JsObjectMirror implements InstanceMirror {
|
| case JSInvocationMirror.METHOD:
|
| if (namedArguments.isNotEmpty) return '$name*';
|
| int nbArgs = positionalArguments.length as int;
|
| - return "$name:$nbArgs:0";
|
| + return "$name:$nbArgs";
|
| }
|
| throw new RuntimeError("Could not compute reflective name for $name");
|
| }
|
| @@ -1685,7 +1685,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror
|
| // reflection with metadata.
|
| if (simpleName == null) continue;
|
| var function = JS('', '#[#]', prototype, key);
|
| - if (isNoSuchMethodStub(function)) continue;
|
| + if (!isOrdinaryReflectableMethod(function)) continue;
|
| if (isAliasedSuperMethod(function, key)) continue;
|
| var mirror =
|
| new JsMethodMirror.fromUnmangledName(
|
| @@ -2331,8 +2331,11 @@ class JsMethodMirror extends JsDeclarationMirror implements MethodMirror {
|
| requiredParameterCount = 0;
|
| }
|
| } else {
|
| - requiredParameterCount = int.parse(info[1]);
|
| - optionalParameterCount = int.parse(info[2]);
|
| + ReflectionInfo reflectionInfo = new ReflectionInfo(jsFunction);
|
| + requiredParameterCount = reflectionInfo.requiredParameterCount;
|
| + optionalParameterCount = reflectionInfo.optionalParameterCount;
|
| + assert(int.parse(info[1]) == requiredParameterCount
|
| + + optionalParameterCount);
|
| }
|
| return new JsMethodMirror(
|
| s(name), jsFunction, requiredParameterCount, optionalParameterCount,
|
| @@ -2959,8 +2962,10 @@ bool isReflectiveDataInPrototype(String key) {
|
| return firstChar == '*' || firstChar == '+';
|
| }
|
|
|
| -bool isNoSuchMethodStub(var jsFunction) {
|
| - return JS('bool', r'#.$reflectable == 2', jsFunction);
|
| +/// Returns `true` if [jsFunction] is an ordinary reflectable method and
|
| +/// not a (potentially reflectable) stub or otherwise non-reflectable method.
|
| +bool isOrdinaryReflectableMethod(var jsFunction) {
|
| + return JS('bool', r'#.$reflectable === 1', jsFunction);
|
| }
|
|
|
| /// Returns true if [key] is only an aliased entry for [function] in the
|
|
|