diff options
Diffstat (limited to 'deps/v8/src/ic/ppc/handler-compiler-ppc.cc')
-rw-r--r-- | deps/v8/src/ic/ppc/handler-compiler-ppc.cc | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/deps/v8/src/ic/ppc/handler-compiler-ppc.cc b/deps/v8/src/ic/ppc/handler-compiler-ppc.cc index 6e7d78afd3..832c25ae48 100644 --- a/deps/v8/src/ic/ppc/handler-compiler-ppc.cc +++ b/deps/v8/src/ic/ppc/handler-compiler-ppc.cc @@ -6,6 +6,7 @@ #include "src/ic/handler-compiler.h" +#include "src/api-arguments.h" #include "src/field-type.h" #include "src/ic/call-optimization.h" #include "src/ic/ic.h" @@ -28,6 +29,9 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( { FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); + // Save context register + __ push(cp); + if (accessor_index >= 0) { DCHECK(!holder.is(scratch)); DCHECK(!receiver.is(scratch)); @@ -39,11 +43,11 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( receiver = scratch; } __ push(receiver); - ParameterCount actual(0); - ParameterCount expected(expected_arguments); __ LoadAccessor(r4, holder, accessor_index, ACCESSOR_GETTER); - __ InvokeFunction(r4, expected, actual, CALL_FUNCTION, - CheckDebugStepCallWrapper()); + __ li(r3, Operand::Zero()); + __ Call(masm->isolate()->builtins()->CallFunction( + ConvertReceiverMode::kNotNullOrUndefined), + RelocInfo::CODE_TARGET); } else { // If we generate a global code snippet for deoptimization only, remember // the place to continue after deoptimization. @@ -51,7 +55,7 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( } // Restore context register. - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); + __ pop(cp); } __ Ret(); } @@ -66,8 +70,9 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( { FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); + // Save context register // Save value register, so we can restore it later. - __ push(value()); + __ Push(cp, value()); if (accessor_index >= 0) { DCHECK(!holder.is(scratch)); @@ -81,11 +86,11 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( receiver = scratch; } __ Push(receiver, value()); - ParameterCount actual(1); - ParameterCount expected(expected_arguments); __ LoadAccessor(r4, holder, accessor_index, ACCESSOR_SETTER); - __ InvokeFunction(r4, expected, actual, CALL_FUNCTION, - CheckDebugStepCallWrapper()); + __ li(r3, Operand(1)); + __ Call(masm->isolate()->builtins()->CallFunction( + ConvertReceiverMode::kNotNullOrUndefined), + RelocInfo::CODE_TARGET); } else { // If we generate a global code snippet for deoptimization only, remember // the place to continue after deoptimization. @@ -93,10 +98,8 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( } // We have to return the passed value, not the return value of the setter. - __ pop(r3); - // Restore context register. - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); + __ Pop(cp, r3); } __ Ret(); } @@ -246,7 +249,7 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall( } DCHECK(optimization.is_simple_api_call()); - // Abi for CallApiFunctionStub. + // Abi for CallApiCallbackStub. Register callee = r3; Register data = r7; Register holder = r5; @@ -315,7 +318,7 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall( __ mov(api_function_address, Operand(ref)); // Jump to stub. - CallApiAccessorStub stub(isolate, is_store, call_data_undefined, + CallApiCallbackStub stub(isolate, is_store, call_data_undefined, !optimization.is_constant_call()); __ TailCallStub(&stub); } @@ -738,18 +741,6 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( } -Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( - Handle<Name> name) { - __ Push(receiver(), this->name(), value()); - - // Do tail-call to the runtime system. - __ TailCallRuntime(Runtime::kStorePropertyWithInterceptor); - - // Return the generated code. - return GetCode(kind(), Code::FAST, name); -} - - Register NamedStoreHandlerCompiler::value() { return StoreDescriptor::ValueRegister(); } |