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

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

Issue 171041: Use root array to load roots in generated ARM code.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 4 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 | « no previous file | src/arm/cfg-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/builtins-arm.cc
===================================================================
--- src/arm/builtins-arm.cc (revision 2686)
+++ src/arm/builtins-arm.cc (working copy)
@@ -214,9 +214,13 @@
// Enter an internal frame.
__ EnterInternalFrame();
- // Setup the context from the function argument.
+ // Set up the context from the function argument.
__ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
+ // Set up the roots register.
+ ExternalReference roots_address = ExternalReference::roots_address();
+ __ mov(r10, Operand(roots_address));
+
// Push the function and the receiver onto the stack.
__ push(r1);
__ push(r2);
@@ -239,7 +243,7 @@
// Initialize all JavaScript callee-saved registers, since they will be seen
// by the garbage collector as part of handlers.
- __ mov(r4, Operand(Factory::undefined_value()));
+ __ LoadRoot(r4, Heap::kUndefinedValueRootIndex);
__ mov(r5, Operand(r4));
__ mov(r6, Operand(r4));
__ mov(r7, Operand(r4));
@@ -282,7 +286,7 @@
{ Label done;
__ tst(r0, Operand(r0));
__ b(ne, &done);
- __ mov(r2, Operand(Factory::undefined_value()));
+ __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
__ push(r2);
__ add(r0, r0, Operand(1));
__ bind(&done);
@@ -323,10 +327,10 @@
__ tst(r2, Operand(kSmiTagMask));
__ b(eq, &call_to_object);
- __ mov(r3, Operand(Factory::null_value()));
+ __ LoadRoot(r3, Heap::kNullValueRootIndex);
__ cmp(r2, r3);
__ b(eq, &use_global_receiver);
- __ mov(r3, Operand(Factory::undefined_value()));
+ __ LoadRoot(r3, Heap::kUndefinedValueRootIndex);
__ cmp(r2, r3);
__ b(eq, &use_global_receiver);
@@ -492,10 +496,10 @@
__ ldr(r0, MemOperand(fp, kRecvOffset));
__ tst(r0, Operand(kSmiTagMask));
__ b(eq, &call_to_object);
- __ mov(r1, Operand(Factory::null_value()));
+ __ LoadRoot(r1, Heap::kNullValueRootIndex);
__ cmp(r0, r1);
__ b(eq, &use_global_receiver);
- __ mov(r1, Operand(Factory::undefined_value()));
+ __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
__ cmp(r0, r1);
__ b(eq, &use_global_receiver);
@@ -665,7 +669,7 @@
// r1: function
// r2: expected number of arguments
// r3: code entry to call
- __ mov(ip, Operand(Factory::undefined_value()));
+ __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
__ sub(r2, fp, Operand(r2, LSL, kPointerSizeLog2));
__ sub(r2, r2, Operand(4 * kPointerSize)); // Adjust for frame.
« no previous file with comments | « no previous file | src/arm/cfg-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698