| Index: runtime/vm/stub_code_ia32.cc
|
| ===================================================================
|
| --- runtime/vm/stub_code_ia32.cc (revision 15938)
|
| +++ runtime/vm/stub_code_ia32.cc (working copy)
|
| @@ -348,8 +348,7 @@
|
| __ pushl(EBX); // Closure object.
|
| __ pushl(EDX); // Arguments descriptor.
|
| __ movl(EDI, FieldAddress(EDX, ArgumentsDescriptor::count_offset()));
|
| - __ SmiUntag(EDI);
|
| - __ subl(EDI, Immediate(1)); // Arguments array length, minus the receiver.
|
| + __ SmiUntag(EDI); // Arguments array length, including the original receiver.
|
| PushArgumentsArray(assembler, (kWordSize * 6));
|
| // Stack layout explaining "(kWordSize * 6)" offset.
|
| // TOS + 0: Argument array.
|
| @@ -375,7 +374,7 @@
|
|
|
| __ Bind(&function_not_found);
|
| // The target function was not found, so invoke method
|
| - // "void noSuchMethod(function_name, args_array)".
|
| + // "dynamic noSuchMethod(InvocationMirror invocation)".
|
| // EAX: receiver.
|
| // ECX: ic-data.
|
| // EDX: arguments descriptor array.
|
| @@ -385,8 +384,7 @@
|
| __ pushl(ECX); // IC-data.
|
| __ pushl(EDX); // Arguments descriptor array.
|
| __ movl(EDI, FieldAddress(EDX, ArgumentsDescriptor::count_offset()));
|
| - __ SmiUntag(EDI);
|
| - __ subl(EDI, Immediate(1)); // Arguments array length, minus the receiver.
|
| + __ SmiUntag(EDI); // Arguments array length, including the original receiver.
|
| // See stack layout below explaining "wordSize * 7" offset.
|
| PushArgumentsArray(assembler, (kWordSize * 7));
|
|
|
| @@ -790,8 +788,7 @@
|
| __ pushl(EDI); // Non-closure object.
|
| // Load num_args.
|
| __ movl(EDI, FieldAddress(EDX, ArgumentsDescriptor::count_offset()));
|
| - __ SmiUntag(EDI);
|
| - __ subl(EDI, Immediate(1)); // Arguments array length, minus the closure.
|
| + __ SmiUntag(EDI); // Arguments array length, including the non-closure.
|
| // See stack layout below explaining "wordSize * 5" offset.
|
| PushArgumentsArray(assembler, (kWordSize * 5));
|
|
|
| @@ -1445,14 +1442,7 @@
|
| // Uses EAX, EBX, EDI as temporary registers.
|
| void StubCode::GenerateCallNoSuchMethodFunctionStub(Assembler* assembler) {
|
| // The target function was not found, so invoke method
|
| - // "void noSuchMethod(function_name, Array arguments)".
|
| - // TODO(regis): For now, we simply pass the actual arguments, both positional
|
| - // and named, as the argument array. This is not correct if out-of-order
|
| - // named arguments were passed.
|
| - // The signature of the "noSuchMethod" method has to change from
|
| - // noSuchMethod(String name, Array arguments) to something like
|
| - // noSuchMethod(InvocationMirror call).
|
| - // Also, the class NoSuchMethodError has to be modified accordingly.
|
| + // "dynamic noSuchMethod(InvocationMirror invocation)".
|
| const Immediate raw_null =
|
| Immediate(reinterpret_cast<intptr_t>(Object::null()));
|
| __ movl(EDI, FieldAddress(EDX, ArgumentsDescriptor::count_offset()));
|
| @@ -1467,7 +1457,7 @@
|
| __ pushl(EAX); // Receiver.
|
| __ pushl(ECX); // IC data array.
|
| __ pushl(EDX); // Arguments descriptor array.
|
| - __ subl(EDI, Immediate(1)); // Arguments array length, minus the receiver.
|
| + // EDI: Arguments array length, including the receiver.
|
| // See stack layout below explaining "wordSize * 10" offset.
|
| PushArgumentsArray(assembler, (kWordSize * 10));
|
|
|
|
|