| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index 7e396e1fcfee6dac77c13150c57098dc5f7740ce..92be1b51f4a9b89844f5a4f77c7cb668ec522062 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -364,6 +364,56 @@ void NewStringAddStub::InitializeInterfaceDescriptor(
|
| }
|
|
|
|
|
| +void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
|
| + static Register registers[] = { edi, // JSFunction
|
| + esi, // context
|
| + eax, // actual number of arguments
|
| + ebx, // expected number of arguments
|
| + };
|
| + static Representation representations[] = {
|
| + Representation::Tagged(), // JSFunction
|
| + Representation::Tagged(), // context
|
| + Representation::Integer32(), // actual number of arguments
|
| + Representation::Integer32(), // expected number of arguments
|
| + };
|
| + descriptor->register_param_count_ = 4;
|
| + descriptor->register_params_ = registers;
|
| + descriptor->param_representations_ = representations;
|
| + }
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::KeyedCall);
|
| + static Register registers[] = { esi, // context
|
| + ecx, // key
|
| + };
|
| + static Representation representations[] = {
|
| + Representation::Tagged(), // context
|
| + Representation::Tagged(), // key
|
| + };
|
| + descriptor->register_param_count_ = 2;
|
| + descriptor->register_params_ = registers;
|
| + descriptor->param_representations_ = representations;
|
| + }
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::NamedCall);
|
| + static Register registers[] = { esi, // context
|
| + ecx, // name
|
| + };
|
| + static Representation representations[] = {
|
| + Representation::Tagged(), // context
|
| + Representation::Tagged(), // name
|
| + };
|
| + descriptor->register_param_count_ = 2;
|
| + descriptor->register_params_ = registers;
|
| + descriptor->param_representations_ = representations;
|
| + }
|
| +}
|
| +
|
| +
|
| #define __ ACCESS_MASM(masm)
|
|
|
|
|
| @@ -2531,11 +2581,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| // Fast-case: Just invoke the function.
|
| ParameterCount actual(argc_);
|
|
|
| - __ InvokeFunction(edi,
|
| - actual,
|
| - JUMP_FUNCTION,
|
| - NullCallWrapper(),
|
| - CALL_AS_FUNCTION);
|
| + __ InvokeFunction(edi, actual, JUMP_FUNCTION, NullCallWrapper());
|
|
|
| // Slow-case: Non-function called.
|
| __ bind(&slow);
|
| @@ -2554,7 +2600,6 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ push(ecx);
|
| __ Set(eax, Immediate(argc_ + 1));
|
| __ Set(ebx, Immediate(0));
|
| - __ SetCallKind(ecx, CALL_AS_FUNCTION);
|
| __ GetBuiltinEntry(edx, Builtins::CALL_FUNCTION_PROXY);
|
| {
|
| Handle<Code> adaptor = isolate->builtins()->ArgumentsAdaptorTrampoline();
|
| @@ -2567,7 +2612,6 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ mov(Operand(esp, (argc_ + 1) * kPointerSize), edi);
|
| __ Set(eax, Immediate(argc_));
|
| __ Set(ebx, Immediate(0));
|
| - __ SetCallKind(ecx, CALL_AS_FUNCTION);
|
| __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION);
|
| Handle<Code> adaptor = isolate->builtins()->ArgumentsAdaptorTrampoline();
|
| __ jmp(adaptor, RelocInfo::CODE_TARGET);
|
| @@ -2615,7 +2659,6 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
| __ Set(ebx, Immediate(0));
|
| Handle<Code> arguments_adaptor =
|
| masm->isolate()->builtins()->ArgumentsAdaptorTrampoline();
|
| - __ SetCallKind(ecx, CALL_AS_METHOD);
|
| __ jmp(arguments_adaptor, RelocInfo::CODE_TARGET);
|
| }
|
|
|
| @@ -5314,8 +5357,7 @@ void StubFailureTailCallTrampolineStub::Generate(MacroAssembler* masm) {
|
| __ sub(eax, Immediate(1));
|
| masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
|
| ParameterCount argument_count(eax);
|
| - __ InvokeFunction(
|
| - edi, argument_count, JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
|
| + __ InvokeFunction(edi, argument_count, JUMP_FUNCTION, NullCallWrapper());
|
| }
|
|
|
|
|
|
|