Upgrade V8 to 5.1.281.57 DO NOT MERGE
FPIIM-449
Change-Id: Id981b686b4d587ac31697662eb98bb34be42ad90
(cherry picked from commit 3b9bc31999c9787eb726ecdbfd5796bfdec32a18)
diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/ia32/handler-compiler-ia32.cc
index 3bdddf9..132090d 100644
--- a/src/ic/ia32/handler-compiler-ia32.cc
+++ b/src/ic/ia32/handler-compiler-ia32.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 @@
{
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 @@
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 @@
}
// Restore context register.
- __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
+ __ pop(esi);
}
__ ret(0);
}
@@ -90,7 +94,7 @@
// 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 @@
// 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 @@
__ 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 @@
{
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 @@
}
__ 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 @@
// 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::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();
}