diff options
Diffstat (limited to 'deps/v8/src/x64/stub-cache-x64.cc')
-rw-r--r-- | deps/v8/src/x64/stub-cache-x64.cc | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/deps/v8/src/x64/stub-cache-x64.cc b/deps/v8/src/x64/stub-cache-x64.cc index 41e5b8826..54d2a113a 100644 --- a/deps/v8/src/x64/stub-cache-x64.cc +++ b/deps/v8/src/x64/stub-cache-x64.cc @@ -372,7 +372,7 @@ static void PushInterceptorArguments(MacroAssembler* masm, __ push(receiver); __ push(holder); __ push(FieldOperand(kScratchRegister, InterceptorInfo::kDataOffset)); - __ PushAddress(ExternalReference::isolate_address()); + __ PushAddress(ExternalReference::isolate_address(masm->isolate())); } @@ -468,7 +468,8 @@ static void GenerateFastApiCall(MacroAssembler* masm, } else { __ Move(Operand(rsp, 3 * kPointerSize), call_data); } - __ movq(kScratchRegister, ExternalReference::isolate_address()); + __ movq(kScratchRegister, + ExternalReference::isolate_address(masm->isolate())); __ movq(Operand(rsp, 4 * kPointerSize), kScratchRegister); // Prepare arguments. @@ -621,7 +622,9 @@ class CallInterceptorCompiler BASE_EMBEDDED { CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) ? CALL_AS_FUNCTION : CALL_AS_METHOD; - __ InvokeFunction(optimization.constant_function(), arguments_, + Handle<JSFunction> fun = optimization.constant_function(); + ParameterCount expected(fun); + __ InvokeFunction(fun, expected, arguments_, JUMP_FUNCTION, NullCallWrapper(), call_kind); } @@ -1177,7 +1180,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( } else { __ Push(Handle<Object>(callback->data(), isolate())); } - __ PushAddress(ExternalReference::isolate_address()); // isolate + __ PushAddress(ExternalReference::isolate_address(isolate())); // isolate __ push(name()); // name // Save a pointer to where we pushed the arguments pointer. This will be // passed as the const ExecutableAccessorInfo& to the C++ callback. @@ -1991,8 +1994,9 @@ Handle<Code> CallStubCompiler::CompileStringFromCharCodeCall( CallKind call_kind = CallICBase::Contextual::decode(extra_state_) ? CALL_AS_FUNCTION : CALL_AS_METHOD; - __ InvokeFunction(function, arguments(), JUMP_FUNCTION, - NullCallWrapper(), call_kind); + ParameterCount expected(function); + __ InvokeFunction(function, expected, arguments(), + JUMP_FUNCTION, NullCallWrapper(), call_kind); __ bind(&miss); // rcx: function name. @@ -2106,8 +2110,9 @@ Handle<Code> CallStubCompiler::CompileMathAbsCall( CallKind call_kind = CallICBase::Contextual::decode(extra_state_) ? CALL_AS_FUNCTION : CALL_AS_METHOD; - __ InvokeFunction(function, arguments(), JUMP_FUNCTION, - NullCallWrapper(), call_kind); + ParameterCount expected(function); + __ InvokeFunction(function, expected, arguments(), + JUMP_FUNCTION, NullCallWrapper(), call_kind); __ bind(&miss); // rcx: function name. @@ -2290,8 +2295,9 @@ void CallStubCompiler::CompileHandlerBackend(Handle<JSFunction> function) { CallKind call_kind = CallICBase::Contextual::decode(extra_state_) ? CALL_AS_FUNCTION : CALL_AS_METHOD; - __ InvokeFunction(function, arguments(), JUMP_FUNCTION, - NullCallWrapper(), call_kind); + ParameterCount expected(function); + __ InvokeFunction(function, expected, arguments(), + JUMP_FUNCTION, NullCallWrapper(), call_kind); } @@ -2503,8 +2509,9 @@ void StoreStubCompiler::GenerateStoreViaSetter( __ push(rdx); __ push(rax); ParameterCount actual(1); - __ InvokeFunction(setter, actual, CALL_FUNCTION, NullCallWrapper(), - CALL_AS_METHOD); + ParameterCount expected(setter); + __ InvokeFunction(setter, expected, actual, + CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); } else { // If we generate a global code snippet for deoptimization only, remember // the place to continue after deoptimization. @@ -2723,8 +2730,9 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, // Call the JavaScript getter with the receiver on the stack. __ push(rax); ParameterCount actual(0); - __ InvokeFunction(getter, actual, CALL_FUNCTION, NullCallWrapper(), - CALL_AS_METHOD); + ParameterCount expected(getter); + __ InvokeFunction(getter, expected, actual, + CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); } else { // If we generate a global code snippet for deoptimization only, remember // the place to continue after deoptimization. |