Chromium Code Reviews| Index: src/arm/code-stubs-arm.cc |
| diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
| index 5c149de5c9b169b695020d3aaa6635a1f2d1ae54..fb4e16f4b1aa0741e30758d1e31feca300f1df33 100644 |
| --- a/src/arm/code-stubs-arm.cc |
| +++ b/src/arm/code-stubs-arm.cc |
| @@ -350,6 +350,67 @@ void NewStringAddStub::InitializeInterfaceDescriptor( |
| } |
| +void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| + static PlatformCallInterfaceDescriptor defaultDescriptor = |
|
Toon Verwaest
2014/01/03 07:14:07
Only use camel-case if the first letter is upperca
|
| + PlatformCallInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); |
| + |
| + static PlatformCallInterfaceDescriptor noInlineDescriptor = |
| + PlatformCallInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); |
| + |
| + { |
| + CallInterfaceDescriptor* descriptor = |
| + isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
| + static Register registers[] = { r1, // JSFunction |
| + cp, // context |
| + r5, // call kind |
| + r0, // actual number of arguments |
| + r2, // expected number of arguments |
| + }; |
| + static Representation representations[] = { |
| + Representation::Tagged(), // JSFunction |
| + Representation::Tagged(), // context |
| + Representation::Smi(), // call kind |
| + Representation::Integer32(), // actual number of arguments |
| + Representation::Integer32(), // expected number of arguments |
| + }; |
| + descriptor->register_param_count_ = 5; |
| + descriptor->register_params_ = registers; |
| + descriptor->param_representations_ = representations; |
| + descriptor->platform_specific_descriptor_ = &defaultDescriptor; |
| + } |
| + { |
| + CallInterfaceDescriptor* descriptor = |
| + isolate->call_descriptor(Isolate::KeyedCall); |
| + static Register registers[] = { cp, // context |
| + r2, // key |
| + }; |
| + static Representation representations[] = { |
| + Representation::Tagged(), // context |
| + Representation::Tagged(), // key |
| + }; |
| + descriptor->register_param_count_ = 2; |
| + descriptor->register_params_ = registers; |
| + descriptor->param_representations_ = representations; |
| + descriptor->platform_specific_descriptor_ = &noInlineDescriptor; |
| + } |
| + { |
| + CallInterfaceDescriptor* descriptor = |
| + isolate->call_descriptor(Isolate::NamedCall); |
| + static Register registers[] = { cp, // context |
| + r2, // name |
| + }; |
| + static Representation representations[] = { |
| + Representation::Tagged(), // context |
| + Representation::Tagged(), // name |
| + }; |
| + descriptor->register_param_count_ = 2; |
| + descriptor->register_params_ = registers; |
| + descriptor->param_representations_ = representations; |
| + descriptor->platform_specific_descriptor_ = &noInlineDescriptor; |
| + } |
| +} |
| + |
| + |
| #define __ ACCESS_MASM(masm) |
| @@ -3233,7 +3294,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) { |
| __ push(r1); // put proxy as additional argument |
| __ mov(r0, Operand(argc_ + 1, RelocInfo::NONE32)); |
| __ mov(r2, Operand::Zero()); |
| - __ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY); |
| + __ GetBuiltinFunction(r1, Builtins::CALL_FUNCTION_PROXY); |
| __ SetCallKind(r5, CALL_AS_METHOD); |
| { |
| Handle<Code> adaptor = |
| @@ -3247,7 +3308,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) { |
| __ str(r1, MemOperand(sp, argc_ * kPointerSize)); |
| __ mov(r0, Operand(argc_)); // Set up the number of arguments. |
| __ mov(r2, Operand::Zero()); |
| - __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); |
| + __ GetBuiltinFunction(r1, Builtins::CALL_NON_FUNCTION); |
| __ SetCallKind(r5, CALL_AS_METHOD); |
| __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), |
| RelocInfo::CODE_TARGET); |
| @@ -3284,11 +3345,11 @@ void CallConstructStub::Generate(MacroAssembler* masm) { |
| __ bind(&slow); |
| __ cmp(r3, Operand(JS_FUNCTION_PROXY_TYPE)); |
| __ b(ne, &non_function_call); |
| - __ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR); |
| + __ GetBuiltinFunction(r1, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR); |
| __ jmp(&do_call); |
| __ bind(&non_function_call); |
| - __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR); |
| + __ GetBuiltinFunction(r1, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR); |
| __ bind(&do_call); |
| // Set expected number of arguments to zero (not changing r0). |
| __ mov(r2, Operand::Zero()); |