Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1908)

Unified Diff: src/arm/ic-arm.cc

Issue 1937003: Pass key in register for keyed load IC... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/ic-arm.cc
===================================================================
--- src/arm/ic-arm.cc (revision 4576)
+++ src/arm/ic-arm.cc (working copy)
@@ -682,12 +682,13 @@
void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// ---------- S t a t e --------------
// -- lr : return address
+ // -- r0 : key
// -- sp[0] : key
// -- sp[4] : receiver
// -----------------------------------
- __ ldm(ia, sp, r2.bit() | r3.bit());
- __ Push(r3, r2);
+ __ ldr(r1, MemOperand(sp, kPointerSize));
+ __ Push(r1, r0);
ExternalReference ref = ExternalReference(IC_Utility(kKeyedLoadIC_Miss));
__ TailCallExternalReference(ref, 2, 1);
@@ -697,12 +698,13 @@
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// ---------- S t a t e --------------
// -- lr : return address
+ // -- r0 : key
// -- sp[0] : key
// -- sp[4] : receiver
// -----------------------------------
- __ ldm(ia, sp, r2.bit() | r3.bit());
- __ Push(r3, r2);
+ __ ldr(r1, MemOperand(sp, kPointerSize));
+ __ Push(r1, r0);
__ TailCallRuntime(Runtime::kGetProperty, 2, 1);
}
@@ -711,13 +713,14 @@
void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
// ---------- S t a t e --------------
// -- lr : return address
+ // -- r0 : key
// -- sp[0] : key
// -- sp[4] : receiver
// -----------------------------------
Label slow, fast, check_pixel_array, check_number_dictionary;
- // Get the key and receiver object from the stack.
- __ ldm(ia, sp, r0.bit() | r1.bit());
+ // Get the object from the stack.
+ __ ldr(r1, MemOperand(sp, kPointerSize));
// Check that the object isn't a smi.
__ BranchOnSmi(r1, &slow);
@@ -790,6 +793,7 @@
// Slow case: Push extra copies of the arguments (2).
__ bind(&slow);
__ IncrementCounter(&Counters::keyed_load_generic_slow, 1, r0, r1);
+ __ ldr(r0, MemOperand(sp, 0));
GenerateRuntimeGetProperty(masm);
}
@@ -797,6 +801,7 @@
void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// ---------- S t a t e --------------
// -- lr : return address
+ // -- r0 : key
// -- sp[0] : key
// -- sp[4] : receiver
// -----------------------------------
@@ -806,8 +811,8 @@
Label slow_char_code;
Label got_char_code;
- // Get the key and receiver object from the stack.
- __ ldm(ia, sp, r0.bit() | r1.bit());
+ // Get the object from the stack.
+ __ ldr(r1, MemOperand(sp, kPointerSize));
Register object = r1;
Register index = r0;
@@ -907,13 +912,14 @@
ExternalArrayType array_type) {
// ---------- S t a t e --------------
// -- lr : return address
+ // -- r0 : key
// -- sp[0] : key
// -- sp[4] : receiver
// -----------------------------------
Label slow, failed_allocation;
- // Get the key and receiver object from the stack.
- __ ldm(ia, sp, r0.bit() | r1.bit());
+ // Get the object from the stack.
+ __ ldr(r1, MemOperand(sp, kPointerSize));
// r0: key
// r1: receiver object
@@ -1143,6 +1149,7 @@
// Slow case: Load name and receiver from stack and jump to runtime.
__ bind(&slow);
__ IncrementCounter(&Counters::keyed_load_external_array_slow, 1, r0, r1);
+ __ ldr(r0, MemOperand(sp, 0));
GenerateRuntimeGetProperty(masm);
}
@@ -1150,13 +1157,14 @@
void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// ---------- S t a t e --------------
// -- lr : return address
+ // -- r0 : key
// -- sp[0] : key
// -- sp[4] : receiver
// -----------------------------------
Label slow;
- // Get the key and receiver object from the stack.
- __ ldm(ia, sp, r0.bit() | r1.bit());
+ // Get the object from the stack.
+ __ ldr(r1, MemOperand(sp, kPointerSize));
// Check that the receiver isn't a smi.
__ BranchOnSmi(r1, &slow);
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698