Reviewers: Michael Starzinger,

Description:
Fix LoadIC calling convention on ARM

The comments in ic-arm.cc::LoadIC indicated that the receiver should be
both in a register and on the stack.  This isn't true in fact: the code
is careful to spill the receiver if needed.

This CL also fixes up a mistaken use of this convention in in
VisitYield.

[email protected]
BUG=

Please review this at https://codereview.chromium.org/16203004/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/arm/full-codegen-arm.cc
  M src/arm/ic-arm.cc


Index: src/arm/full-codegen-arm.cc
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index ee5517cf77b9800bf6ef87d8673a54a72c2fc0df..c2124e5226dc15826ddddb4c32b4eaf67715a818 100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -2041,11 +2041,9 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
       __ push(r3);                                       // iter
       __ push(r0);                                       // exception
       __ mov(r0, r3);                                    // iter
- __ push(r0); // push LoadIC state
       __ LoadRoot(r2, Heap::kthrow_stringRootIndex);     // "throw"
       Handle<Code> throw_ic = isolate()->builtins()->LoadIC_Initialize();
CallIC(throw_ic); // iter.throw in r0 - __ add(sp, sp, Operand(kPointerSize)); // drop LoadIC state
       __ jmp(&l_call);

       // try { received = yield result.value }
@@ -2071,11 +2069,9 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
       __ push(r3);                                       // iter
       __ push(r0);                                       // received
       __ mov(r0, r3);                                    // iter
- __ push(r0); // push LoadIC state
       __ LoadRoot(r2, Heap::ksend_stringRootIndex);      // "send"
       Handle<Code> send_ic = isolate()->builtins()->LoadIC_Initialize();
       CallIC(send_ic);                                   // iter.send in r0
- __ add(sp, sp, Operand(kPointerSize)); // drop LoadIC state

       // result = f.call(receiver, arg);
       __ bind(&l_call);
@@ -2103,11 +2099,9 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
       __ pop(r1);                                        // result
       __ push(r0);                                       // result.value
       __ mov(r0, r1);                                    // result
- __ push(r0); // push LoadIC state
       __ LoadRoot(r2, Heap::kdone_stringRootIndex);      // "done"
       Handle<Code> done_ic = isolate()->builtins()->LoadIC_Initialize();
CallIC(done_ic); // result.done in r0 - __ add(sp, sp, Operand(kPointerSize)); // drop LoadIC state
       Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
       CallIC(bool_ic);
       __ cmp(r0, Operand(0));
Index: src/arm/ic-arm.cc
diff --git a/src/arm/ic-arm.cc b/src/arm/ic-arm.cc
index 35a9e01d5fd5f36723caaebb9860f8f0a2677ccf..87865b2f67973dde8da1d0c7a78257e90988bdc2 100644
--- a/src/arm/ic-arm.cc
+++ b/src/arm/ic-arm.cc
@@ -651,7 +651,6 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
   //  -- r2    : name
   //  -- lr    : return address
   //  -- r0    : receiver
-  //  -- sp[0] : receiver
   // -----------------------------------

   // Probe the stub cache.
@@ -671,7 +670,6 @@ void LoadIC::GenerateNormal(MacroAssembler* masm) {
   //  -- r2    : name
   //  -- lr    : return address
   //  -- r0    : receiver
-  //  -- sp[0] : receiver
   // -----------------------------------
   Label miss;

@@ -692,7 +690,6 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
   //  -- r2    : name
   //  -- lr    : return address
   //  -- r0    : receiver
-  //  -- sp[0] : receiver
   // -----------------------------------
   Isolate* isolate = masm->isolate();

@@ -713,7 +710,6 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
   //  -- r2    : name
   //  -- lr    : return address
   //  -- r0    : receiver
-  //  -- sp[0] : receiver
   // -----------------------------------

   __ mov(r3, r0);


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to