Index: src/ia32/ic-ia32.cc |
diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc |
index bde3b7e1a199486a6bdd04159e2215c69fe2bfb4..090ea401a4a26524afcc4aeceac5099899a4c217 100644 |
--- a/src/ia32/ic-ia32.cc |
+++ b/src/ia32/ic-ia32.cc |
@@ -655,7 +655,7 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) { |
char_at_generator.GenerateSlow(masm, call_helper); |
__ bind(&miss); |
- GenerateMiss(masm); |
+ GenerateMiss(masm, false); |
} |
@@ -698,7 +698,7 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { |
__ TailCallExternalReference(ref, 2, 1); |
__ bind(&slow); |
- GenerateMiss(masm); |
+ GenerateMiss(masm, false); |
} |
@@ -1222,7 +1222,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { |
} |
-void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
+void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, bool force_generic) { |
// ----------- S t a t e ------------- |
// -- eax : key |
// -- edx : receiver |
@@ -1237,8 +1237,10 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
__ push(ebx); // 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); |
} |
@@ -1430,7 +1432,7 @@ void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
} |
-void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
+void KeyedStoreIC::GenerateMiss(MacroAssembler* masm, bool force_generic) { |
// ----------- S t a t e ------------- |
// -- eax : value |
// -- ecx : key |
@@ -1445,8 +1447,30 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
__ push(ebx); |
// Do tail-call to runtime routine. |
- ExternalReference ref = |
- ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); |
+ ExternalReference ref = force_generic |
+ ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric), |
+ masm->isolate()) |
+ : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); |
+ __ TailCallExternalReference(ref, 3, 1); |
+} |
+ |
+ |
+void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { |
+ // ----------- S t a t e ------------- |
+ // -- eax : value |
+ // -- ecx : key |
+ // -- edx : receiver |
+ // -- esp[0] : return address |
+ // ----------------------------------- |
+ |
+ __ pop(ebx); |
+ __ push(edx); |
+ __ push(ecx); |
+ __ push(eax); |
+ __ push(ebx); // return address |
+ |
+ // Do tail-call to runtime routine. |
+ ExternalReference ref(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
__ TailCallExternalReference(ref, 3, 1); |
} |