Index: src/arm/ic-arm.cc |
=================================================================== |
--- src/arm/ic-arm.cc (revision 3816) |
+++ src/arm/ic-arm.cc (working copy) |
@@ -438,7 +438,7 @@ |
StubCache::GenerateProbe(masm, flags, r0, r2, r3, no_reg); |
// Cache miss: Jump to runtime. |
- Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); |
+ GenerateMiss(masm); |
} |
@@ -482,16 +482,11 @@ |
// Cache miss: Restore receiver from stack and jump to runtime. |
__ bind(&miss); |
- Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); |
+ GenerateMiss(masm); |
} |
void LoadIC::GenerateMiss(MacroAssembler* masm) { |
- Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); |
-} |
- |
- |
-void LoadIC::Generate(MacroAssembler* masm, const ExternalReference& f) { |
// ----------- S t a t e ------------- |
// -- r2 : name |
// -- lr : return address |
@@ -502,7 +497,7 @@ |
__ stm(db_w, sp, r2.bit() | r3.bit()); |
// Perform tail call to the entry. |
- __ TailCallRuntime(f, 2, 1); |
+ __ TailCallRuntime(ExternalReference(IC_Utility(kLoadIC_Miss)), 2, 1); |
} |
@@ -530,11 +525,20 @@ |
void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
- Generate(masm, ExternalReference(IC_Utility(kKeyedLoadIC_Miss))); |
+ // ---------- S t a t e -------------- |
+ // -- lr : return address |
+ // -- sp[0] : key |
+ // -- sp[4] : receiver |
+ // ----------------------------------- |
+ |
+ __ ldm(ia, sp, r2.bit() | r3.bit()); |
+ __ stm(db_w, sp, r2.bit() | r3.bit()); |
+ |
+ __ TailCallRuntime(ExternalReference(IC_Utility(kKeyedLoadIC_Miss)), 2, 1); |
} |
-void KeyedLoadIC::Generate(MacroAssembler* masm, const ExternalReference& f) { |
+void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
// ---------- S t a t e -------------- |
// -- lr : return address |
// -- sp[0] : key |
@@ -544,7 +548,7 @@ |
__ ldm(ia, sp, r2.bit() | r3.bit()); |
__ stm(db_w, sp, r2.bit() | r3.bit()); |
- __ TailCallRuntime(f, 2, 1); |
+ __ TailCallRuntime(ExternalReference(Runtime::kGetProperty), 2, 1); |
} |
@@ -597,10 +601,7 @@ |
// Slow case: Push extra copies of the arguments (2). |
__ bind(&slow); |
__ IncrementCounter(&Counters::keyed_load_generic_slow, 1, r0, r1); |
- __ ldm(ia, sp, r0.bit() | r1.bit()); |
- __ stm(db_w, sp, r0.bit() | r1.bit()); |
- // Do tail-call to runtime routine. |
- __ TailCallRuntime(ExternalReference(Runtime::kGetProperty), 2, 1); |
+ GenerateRuntimeGetProperty(masm); |
// Fast case: Do the load. |
__ bind(&fast); |
@@ -634,8 +635,7 @@ |
} |
-void KeyedStoreIC::Generate(MacroAssembler* masm, |
- const ExternalReference& f) { |
+void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
// ---------- S t a t e -------------- |
// -- r0 : value |
// -- lr : return address |
@@ -646,10 +646,24 @@ |
__ ldm(ia, sp, r2.bit() | r3.bit()); |
__ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); |
- __ TailCallRuntime(f, 3, 1); |
+ __ TailCallRuntime(ExternalReference(IC_Utility(kKeyedStoreIC_Miss)), 3, 1); |
} |
+void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { |
+ // ---------- S t a t e -------------- |
+ // -- r0 : value |
+ // -- lr : return address |
+ // -- sp[0] : key |
+ // -- sp[1] : receiver |
+ // ----------------------------------- |
+ __ ldm(ia, sp, r1.bit() | r3.bit()); // r0 == value, r1 == key, r3 == object |
+ __ stm(db_w, sp, r0.bit() | r1.bit() | r3.bit()); |
+ |
+ __ TailCallRuntime(ExternalReference(Runtime::kSetProperty), 3, 1); |
+} |
+ |
+ |
void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { |
// ---------- S t a t e -------------- |
// -- r0 : value |
@@ -701,12 +715,9 @@ |
__ b(lo, &fast); |
- // Slow case: Push extra copies of the arguments (3). |
+ // Slow case: |
__ bind(&slow); |
- __ ldm(ia, sp, r1.bit() | r3.bit()); // r0 == value, r1 == key, r3 == object |
- __ stm(db_w, sp, r0.bit() | r1.bit() | r3.bit()); |
- // Do tail-call to runtime routine. |
- __ TailCallRuntime(ExternalReference(Runtime::kSetProperty), 3, 1); |
+ GenerateRuntimeSetProperty(masm); |
// Extra capacity case: Check if there is extra capacity to |
// perform the store and update the length. Used for adding one |