| Index: src/arm/ic-arm.cc
|
| diff --git a/src/arm/ic-arm.cc b/src/arm/ic-arm.cc
|
| index 731c4719e79146ec3a99c3c1e9472f16bba98eb8..8749eea5b247ccc1f1a80562f302112f5653cc2a 100644
|
| --- a/src/arm/ic-arm.cc
|
| +++ b/src/arm/ic-arm.cc
|
| @@ -868,10 +868,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -Object* KeyedLoadIC_Miss(Arguments args);
|
| -
|
| -
|
| -void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
| +void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, bool force_generic) {
|
| // ---------- S t a t e --------------
|
| // -- lr : return address
|
| // -- r0 : key
|
| @@ -883,8 +880,11 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
|
|
| __ Push(r1, r0);
|
|
|
| - ExternalReference ref =
|
| - ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
|
| + // Perform tail call to the entry.
|
| + ExternalReference ref = force_generic
|
| + ? ExternalReference(IC_Utility(kKeyedLoadIC_MissForceGeneric), isolate)
|
| + : ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
|
| +
|
| __ TailCallExternalReference(ref, 2, 1);
|
| }
|
|
|
| @@ -1075,7 +1075,7 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
|
| char_at_generator.GenerateSlow(masm, call_helper);
|
|
|
| __ bind(&miss);
|
| - GenerateMiss(masm);
|
| + GenerateMiss(masm, false);
|
| }
|
|
|
|
|
| @@ -1115,11 +1115,30 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
|
| 1);
|
|
|
| __ bind(&slow);
|
| - GenerateMiss(masm);
|
| + GenerateMiss(masm, false);
|
| +}
|
| +
|
| +
|
| +void KeyedStoreIC::GenerateMiss(MacroAssembler* masm, bool force_generic) {
|
| + // ---------- S t a t e --------------
|
| + // -- r0 : value
|
| + // -- r1 : key
|
| + // -- r2 : receiver
|
| + // -- lr : return address
|
| + // -----------------------------------
|
| +
|
| + // Push receiver, key and value for runtime call.
|
| + __ Push(r2, r1, r0);
|
| +
|
| + ExternalReference ref = force_generic
|
| + ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric),
|
| + masm->isolate())
|
| + : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
|
| + __ TailCallExternalReference(ref, 3, 1);
|
| }
|
|
|
|
|
| -void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
|
| +void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) {
|
| // ---------- S t a t e --------------
|
| // -- r0 : value
|
| // -- r1 : key
|
| @@ -1130,8 +1149,10 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
|
| // Push receiver, key and value for runtime call.
|
| __ Push(r2, r1, r0);
|
|
|
| + // The slow case calls into the runtime to complete the store without causing
|
| + // an IC miss that would otherwise cause a transition to the generic stub.
|
| ExternalReference ref =
|
| - ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
|
| + ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate());
|
| __ TailCallExternalReference(ref, 3, 1);
|
| }
|
|
|
|
|