Commit 601e1cf0 authored by wingo@igalia.com's avatar wingo@igalia.com

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.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16203004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e13aac5f
......@@ -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));
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment