aboutsummaryrefslogtreecommitdiff
path: root/src/ic/x87
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2016-06-02 14:46:10 +0100
committerBen Murdoch <benm@google.com>2016-06-02 14:46:10 +0100
commit3b9bc31999c9787eb726ecdbfd5796bfdec32a18 (patch)
treeb521168bf78078bea1c0a9851e6ca7099318195e /src/ic/x87
parentc007f9a1597810ec6ccf9b289e98fda574a0dde7 (diff)
downloadv8-3b9bc31999c9787eb726ecdbfd5796bfdec32a18.tar.gz
Upgrade V8 to 5.1.281.57
Change-Id: Id981b686b4d587ac31697662eb98bb34be42ad90
Diffstat (limited to 'src/ic/x87')
-rw-r--r--src/ic/x87/handler-compiler-x87.cc49
-rw-r--r--src/ic/x87/ic-x87.cc15
2 files changed, 27 insertions, 37 deletions
diff --git a/src/ic/x87/handler-compiler-x87.cc b/src/ic/x87/handler-compiler-x87.cc
index 1b25f063..281faba3 100644
--- a/src/ic/x87/handler-compiler-x87.cc
+++ b/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();
}
diff --git a/src/ic/x87/ic-x87.cc b/src/ic/x87/ic-x87.cc
index 5bbd9c58..b51045be 100644
--- a/src/ic/x87/ic-x87.cc
+++ b/src/ic/x87/ic-x87.cc
@@ -150,8 +150,9 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
__ mov(map, FieldOperand(receiver, HeapObject::kMapOffset));
// Check bit field.
- __ test_b(FieldOperand(map, Map::kBitFieldOffset),
- (1 << Map::kIsAccessCheckNeeded) | (1 << interceptor_bit));
+ __ test_b(
+ FieldOperand(map, Map::kBitFieldOffset),
+ Immediate((1 << Map::kIsAccessCheckNeeded) | (1 << interceptor_bit)));
__ j(not_zero, slow);
// Check that the object is some kind of JS object EXCEPT JS Value type. In
// the case that the object is a value-wrapper object, we enter the runtime
@@ -202,9 +203,9 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
// scratch2: map of current prototype
__ CmpInstanceType(scratch2, JS_OBJECT_TYPE);
__ j(below, slow);
- __ test_b(
- FieldOperand(scratch2, Map::kBitFieldOffset),
- (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor));
+ __ test_b(FieldOperand(scratch2, Map::kBitFieldOffset),
+ Immediate((1 << Map::kIsAccessCheckNeeded) |
+ (1 << Map::kHasIndexedInterceptor)));
__ j(not_zero, slow);
__ cmp(scratch, masm->isolate()->factory()->empty_fixed_array());
__ j(not_equal, slow);
@@ -251,7 +252,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
// bit test is enough.
STATIC_ASSERT(kNotInternalizedTag != 0);
__ test_b(FieldOperand(map, Map::kInstanceTypeOffset),
- kIsNotInternalizedMask);
+ Immediate(kIsNotInternalizedMask));
__ j(not_zero, not_unique);
__ bind(&unique);
@@ -521,7 +522,7 @@ void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm,
// Check that the receiver does not require access checks and is not observed.
// The generic stub does not perform map checks or handle observed objects.
__ test_b(FieldOperand(edi, Map::kBitFieldOffset),
- 1 << Map::kIsAccessCheckNeeded | 1 << Map::kIsObserved);
+ Immediate(1 << Map::kIsAccessCheckNeeded | 1 << Map::kIsObserved));
__ j(not_zero, &slow);
// Check that the key is a smi.
__ JumpIfNotSmi(key, &maybe_name_key);