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 b2ce5203c511d096b7f300c290100aea80418d26..7e2f6ee7b1eb5c9d3074b9574df771c679be9012 100644 |
| --- a/src/ia32/lithium-codegen-ia32.cc |
| +++ b/src/ia32/lithium-codegen-ia32.cc |
| @@ -804,7 +804,7 @@ void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) { |
| ASSERT(environment->HasBeenRegistered()); |
| int id = environment->deoptimization_index(); |
| ASSERT(info()->IsOptimizing() || info()->IsStub()); |
| - Deoptimizer::BailoutType bailout_type = frame_is_built_ |
| + Deoptimizer::BailoutType bailout_type = info()->IsOptimizing() |
|
ulan
2012/12/28 15:40:49
Maybe negate this and use info()->IsStub() to make
danno
2012/12/28 17:38:41
Done.
|
| ? Deoptimizer::EAGER |
| : Deoptimizer::LAZY; |
| Address entry = Deoptimizer::GetDeoptimizationEntry(id, bailout_type); |
| @@ -2640,7 +2640,6 @@ void LCodeGen::DoReturn(LReturn* instr) { |
| __ bind(&no_padding); |
| } |
| if (info()->IsStub()) { |
| - __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| __ Ret(); |
| } else { |
| __ Ret((GetParameterCount() + 1) * kPointerSize, ecx); |
| @@ -3375,7 +3374,12 @@ void LCodeGen::DoThisFunction(LThisFunction* instr) { |
| void LCodeGen::DoContext(LContext* instr) { |
| Register result = ToRegister(instr->result()); |
| - __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| + if (info()->IsOptimizing()) { |
| + __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| + } else { |
| + // If there is no frame, the context must be in esi. |
| + ASSERT(result.is(esi)); |
| + } |
| } |