Index: src/x64/ic-x64.cc |
diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc |
index 4ba197889a1ed453963f68b0a5d266a19fc55cb0..d59ee44d9d16fa00b6ea753e0ab8216f1448768f 100644 |
--- a/src/x64/ic-x64.cc |
+++ b/src/x64/ic-x64.cc |
@@ -658,7 +658,7 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) { |
char_at_generator.GenerateSlow(masm, call_helper); |
__ bind(&miss); |
- GenerateMiss(masm); |
+ GenerateMiss(masm, false); |
} |
@@ -701,7 +701,7 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { |
1); |
__ bind(&slow); |
- GenerateMiss(masm); |
+ GenerateMiss(masm, false); |
} |
@@ -1240,7 +1240,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { |
} |
-void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
+void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, bool force_generic) { |
// ----------- S t a t e ------------- |
// -- rax : key |
// -- rdx : receiver |
@@ -1256,8 +1256,10 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
__ push(rbx); // return address |
// Perform tail call to the entry. |
- ExternalReference ref |
- = ExternalReference(IC_Utility(kKeyedLoadIC_Miss), masm->isolate()); |
+ ExternalReference ref = force_generic |
+ ? ExternalReference(IC_Utility(kKeyedLoadIC_MissForceGeneric), |
+ masm->isolate()) |
+ : ExternalReference(IC_Utility(kKeyedLoadIC_Miss), masm->isolate()); |
__ TailCallExternalReference(ref, 2, 1); |
} |
@@ -1441,7 +1443,7 @@ void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
} |
-void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
+void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { |
// ----------- S t a t e ------------- |
// -- rax : value |
// -- rcx : key |
@@ -1453,11 +1455,34 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
__ push(rdx); // receiver |
__ push(rcx); // key |
__ push(rax); // value |
+ __ Push(Smi::FromInt(NONE)); // PropertyAttributes |
__ push(rbx); // return address |
// Do tail-call to runtime routine. |
- ExternalReference ref = |
- ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); |
+ ExternalReference ref(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
+ __ TailCallExternalReference(ref, 4, 1); |
+} |
+ |
+ |
+void KeyedStoreIC::GenerateMiss(MacroAssembler* masm, bool force_generic) { |
+ // ----------- S t a t e ------------- |
+ // -- rax : value |
+ // -- rcx : key |
+ // -- rdx : receiver |
+ // -- rsp[0] : return address |
+ // ----------------------------------- |
+ |
+ __ pop(rbx); |
+ __ push(rdx); // receiver |
+ __ push(rcx); // key |
+ __ push(rax); // value |
+ __ push(rbx); // return address |
+ |
+ // Do tail-call to runtime routine. |
+ ExternalReference ref = force_generic |
+ ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric), |
+ masm->isolate()) |
+ : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); |
__ TailCallExternalReference(ref, 3, 1); |
} |