summaryrefslogtreecommitdiff
path: root/deps/v8/src/ic/x87/handler-compiler-x87.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/ic/x87/handler-compiler-x87.cc')
-rw-r--r--deps/v8/src/ic/x87/handler-compiler-x87.cc49
1 files changed, 19 insertions, 30 deletions
diff --git a/deps/v8/src/ic/x87/handler-compiler-x87.cc b/deps/v8/src/ic/x87/handler-compiler-x87.cc
index 1b25f06347..281faba3c7 100644
--- a/deps/v8/src/ic/x87/handler-compiler-x87.cc
+++ b/deps/v8/src/ic/x87/handler-compiler-x87.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"
@@ -23,6 +24,9 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
{
FrameScope scope(masm, StackFrame::INTERNAL);
+ // Save context register
+ __ push(esi);
+
if (accessor_index >= 0) {
DCHECK(!holder.is(scratch));
DCHECK(!receiver.is(scratch));
@@ -34,11 +38,11 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
receiver = scratch;
}
__ push(receiver);
- ParameterCount actual(0);
- ParameterCount expected(expected_arguments);
__ LoadAccessor(edi, holder, accessor_index, ACCESSOR_GETTER);
- __ InvokeFunction(edi, expected, actual, CALL_FUNCTION,
- CheckDebugStepCallWrapper());
+ __ Set(eax, 0);
+ __ 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.
@@ -46,7 +50,7 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
}
// Restore context register.
- __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
+ __ pop(esi);
}
__ ret(0);
}
@@ -90,7 +94,7 @@ void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup(
// Bail out if the receiver has a named interceptor or requires access checks.
__ test_b(FieldOperand(scratch0, Map::kBitFieldOffset),
- kInterceptorOrAccessCheckNeededMask);
+ Immediate(kInterceptorOrAccessCheckNeededMask));
__ j(not_zero, miss_label);
// Check that receiver is a JSObject.
@@ -158,7 +162,7 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
// Stack now matches JSFunction abi.
DCHECK(optimization.is_simple_api_call());
- // Abi for CallApiFunctionStub.
+ // Abi for CallApiCallbackStub.
Register callee = edi;
Register data = ebx;
Register holder = ecx;
@@ -220,7 +224,7 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
__ mov(api_function_address, Immediate(function_address));
// 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);
}
@@ -252,6 +256,8 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
{
FrameScope scope(masm, StackFrame::INTERNAL);
+ // Save context register
+ __ push(esi);
// Save value register, so we can restore it later.
__ push(value());
@@ -267,11 +273,11 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
}
__ push(receiver);
__ push(value());
- ParameterCount actual(1);
- ParameterCount expected(expected_arguments);
__ LoadAccessor(edi, holder, accessor_index, ACCESSOR_SETTER);
- __ InvokeFunction(edi, expected, actual, CALL_FUNCTION,
- CheckDebugStepCallWrapper());
+ __ Set(eax, 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.
@@ -280,9 +286,8 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
// We have to return the passed value, not the return value of the setter.
__ pop(eax);
-
// Restore context register.
- __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
+ __ pop(esi);
}
__ ret(0);
}
@@ -758,22 +763,6 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
}
-Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
- Handle<Name> name) {
- __ pop(scratch1()); // remove the return address
- __ push(receiver());
- __ push(this->name());
- __ push(value());
- __ push(scratch1()); // restore return address
-
- // 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();
}