Index: src/x64/ic-x64.cc |
diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc |
index 4ba197889a1ed453963f68b0a5d266a19fc55cb0..f05e6a2479ee21befc8c8d241912e975ab8dd0e0 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 |
@@ -1456,8 +1458,30 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
__ 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, 3, 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); |
} |