Index: src/ic/arm64/handler-compiler-arm64.cc |
diff --git a/src/ic/arm64/handler-compiler-arm64.cc b/src/ic/arm64/handler-compiler-arm64.cc |
index 4f50a610314b121cb1a05859fb4d3d7306c23a15..47a450d15c082de9eb890a004826a6871243fb4c 100644 |
--- a/src/ic/arm64/handler-compiler-arm64.cc |
+++ b/src/ic/arm64/handler-compiler-arm64.cc |
@@ -198,11 +198,17 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall( |
call_data_undefined = true; |
__ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
} else { |
- __ Ldr(data, |
- FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
- __ Ldr(data, |
- FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
- __ Ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
+ if (optimization.is_constant_call()) { |
+ __ Ldr(data, |
+ FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
+ __ Ldr(data, |
+ FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
+ __ Ldr(data, |
+ FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
+ } else { |
+ __ Ldr(data, |
+ FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset)); |
+ } |
__ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); |
} |
@@ -221,7 +227,8 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall( |
__ Mov(api_function_address, ref); |
// Jump to stub. |
- CallApiAccessorStub stub(isolate, is_store, call_data_undefined); |
+ CallApiAccessorStub stub(isolate, is_store, call_data_undefined, |
+ !optimization.is_constant_call()); |
__ TailCallStub(&stub); |
} |