Chromium Code Reviews| Index: src/ia32/lithium-codegen-ia32.cc |
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
| index 86ac466ae8740dc46c85df4da8d887ee9a40e913..e7cdb697ca5c287db2ac68debc113e9135444045 100644 |
| --- a/src/ia32/lithium-codegen-ia32.cc |
| +++ b/src/ia32/lithium-codegen-ia32.cc |
| @@ -833,13 +833,28 @@ Operand LCodeGen::ToOperand(LOperand* op) const { |
| if (op->IsRegister()) return Operand(ToRegister(op)); |
| if (op->IsDoubleRegister()) return Operand(ToDoubleRegister(op)); |
| ASSERT(op->IsStackSlot() || op->IsDoubleStackSlot()); |
| - return Operand(ebp, StackSlotOffset(op->index())); |
| + if (NeedsEagerFrame()) { |
| + return Operand(ebp, StackSlotOffset(op->index())); |
| + } else { |
| + // Retrieve parameter without eager stack-frame relative to the |
| + // stack-pointer. |
| + ASSERT(op->index() < 0); |
| + return Operand(esp, StackSlotOffset(op->index()) - kFPOnStackSize); |
| + } |
| } |
| Operand LCodeGen::HighOperand(LOperand* op) { |
| ASSERT(op->IsDoubleStackSlot()); |
| - return Operand(ebp, StackSlotOffset(op->index()) + kPointerSize); |
| + if (NeedsEagerFrame()) { |
| + return Operand(ebp, StackSlotOffset(op->index()) + kPointerSize); |
| + } else { |
| + // Retrieve parameter without eager stack-frame relative to the |
| + // stack-pointer. |
| + ASSERT(op->index() < 0); |
| + return Operand(esp, StackSlotOffset(op->index()) |
| + - kFPOnStackSize + kPointerSize); |
| + } |
| } |
| @@ -4357,7 +4372,12 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| int arity = instr->arity(); |
| CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
| - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| + if (instr->hydrogen()->tailcall()) { |
|
danno
2013/10/02 08:49:11
this should probably be called IsTailCall()
Toon Verwaest
2013/10/02 16:28:16
Done.
|
| + if (NeedsEagerFrame()) __ leave(); |
| + __ jmp(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); |
| + } else { |
| + CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| + } |
| } |