Index: src/ic/arm/handler-compiler-arm.cc |
diff --git a/src/ic/arm/handler-compiler-arm.cc b/src/ic/arm/handler-compiler-arm.cc |
index 7f3e55b544dab750b60074566be7104d7fd8a7ff..b990a94b934e210e55cc0d9d1333dddcbe3ea5dd 100644 |
--- a/src/ic/arm/handler-compiler-arm.cc |
+++ b/src/ic/arm/handler-compiler-arm.cc |
@@ -256,7 +256,7 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall( |
// Abi for CallApiFunctionStub. |
Register callee = r0; |
- Register call_data = r4; |
+ Register data = r4; |
Register holder = r2; |
Register api_function_address = r1; |
@@ -282,18 +282,18 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall( |
Isolate* isolate = masm->isolate(); |
Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
- Handle<Object> call_data_obj(api_call_info->data(), isolate); |
- |
bool call_data_undefined = false; |
- // Put call_data in place. |
- if (isolate->heap()->InNewSpace(*call_data_obj)) { |
- __ Move(call_data, api_call_info); |
- __ ldr(call_data, FieldMemOperand(call_data, CallHandlerInfo::kDataOffset)); |
- } else if (call_data_obj->IsUndefined()) { |
+ // Put call data in place. |
+ if (api_call_info->data()->IsUndefined()) { |
call_data_undefined = true; |
- __ LoadRoot(call_data, Heap::kUndefinedValueRootIndex); |
+ __ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
} else { |
- __ Move(call_data, call_data_obj); |
+ __ ldr(data, |
+ FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
+ __ ldr(data, |
+ FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
+ __ ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
+ __ ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); |
} |
// Put api_function_address in place. |