Index: src/ic/arm/handler-compiler-arm.cc |
diff --git a/src/ic/arm/handler-compiler-arm.cc b/src/ic/arm/handler-compiler-arm.cc |
index 5dcbd0f35c3614a28d05cca62ee80302913cafc4..3b8f10e634b1487c794b8aae194ac7596c889024 100644 |
--- a/src/ic/arm/handler-compiler-arm.cc |
+++ b/src/ic/arm/handler-compiler-arm.cc |
@@ -92,6 +92,28 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
} |
+void PropertyHandlerCompiler::PushVectorAndSlot(Register vector, |
+ Register slot) { |
+ MacroAssembler* masm = this->masm(); |
+ __ push(vector); |
+ __ push(slot); |
+} |
+ |
+ |
+void PropertyHandlerCompiler::PopVectorAndSlot(Register vector, Register slot) { |
+ MacroAssembler* masm = this->masm(); |
+ __ pop(slot); |
+ __ pop(vector); |
+} |
+ |
+ |
+void PropertyHandlerCompiler::DiscardVectorAndSlot() { |
+ MacroAssembler* masm = this->masm(); |
+ // Remove vector and slot. |
+ __ add(sp, sp, Operand(2 * kPointerSize)); |
+} |
+ |
+ |
void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( |
MacroAssembler* masm, Label* miss_label, Register receiver, |
Handle<Name> name, Register scratch0, Register scratch1) { |
@@ -484,6 +506,10 @@ void NamedLoadHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) { |
Label success; |
__ b(&success); |
__ bind(miss); |
+ if (IC::ICUseVector(kind())) { |
+ DCHECK(kind() == Code::LOAD_IC); |
+ PopVectorAndSlot(); |
+ } |
TailCallBuiltin(masm(), MissBuiltin(kind())); |
__ bind(&success); |
} |
@@ -582,6 +608,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptorWithFollowup( |
} else { |
__ Push(holder_reg, this->name()); |
} |
+ InterceptorVectorSlotPush(holder_reg); |
// Invoke an interceptor. Note: map checks from receiver to |
// interceptor's holder has been compiled before (see a caller |
// of this method.) |
@@ -599,6 +626,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptorWithFollowup( |
__ Ret(); |
__ bind(&interceptor_failed); |
+ InterceptorVectorSlotPop(holder_reg); |
__ pop(this->name()); |
__ pop(holder_reg); |
if (must_preserve_receiver_reg) { |
@@ -628,7 +656,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) { |
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
Handle<JSObject> object, Handle<Name> name, |
Handle<ExecutableAccessorInfo> callback) { |
- Register holder_reg = Frontend(receiver(), name); |
+ Register holder_reg = Frontend(name); |
__ push(receiver()); // receiver |
__ push(holder_reg); |
@@ -669,6 +697,9 @@ Register NamedStoreHandlerCompiler::value() { |
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( |
Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { |
Label miss; |
+ if (IC::ICUseVector(kind())) { |
+ PushVectorAndSlot(); |
+ } |
FrontendHeader(receiver(), name, &miss); |
// Get the value from the cell. |
@@ -685,6 +716,9 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( |
Counters* counters = isolate()->counters(); |
__ IncrementCounter(counters->named_load_global_stub(), 1, r1, r3); |
+ if (IC::ICUseVector(kind())) { |
+ DiscardVectorAndSlot(); |
+ } |
__ Ret(); |
FrontendFooter(name, &miss); |