| Index: src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| index 985a5a49de1109080a9f5f912a0110aced75778a..1d650510eb534f51edc670fb5a185351282ea874 100644
|
| --- a/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| @@ -177,15 +177,22 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
|
| deopt_mode = Safepoint::kLazyDeopt;
|
| } else {
|
| if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
|
| - FastNewFunctionContextStub stub(isolate());
|
| - __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
|
| - Immediate(slots));
|
| - __ CallStub(&stub);
|
| + if (info()->scope()->is_eval_scope()) {
|
| + FastNewEvalContextStub stub(isolate());
|
| + __ Set(FastNewEvalContextDescriptor::SlotsRegister(), slots);
|
| + __ CallStub(&stub);
|
| + } else {
|
| + FastNewFunctionContextStub stub(isolate());
|
| + __ Set(FastNewFunctionContextDescriptor::SlotsRegister(), slots);
|
| + __ CallStub(&stub);
|
| + }
|
| // Result of FastNewFunctionContextStub is always in new space.
|
| need_write_barrier = false;
|
| } else {
|
| - __ push(edi);
|
| - __ CallRuntime(Runtime::kNewFunctionContext);
|
| + __ Push(edi);
|
| + __ CallRuntime(info()->scope()->is_eval_scope()
|
| + ? Runtime::kNewEvalContext
|
| + : Runtime::kNewFunctionContext);
|
| }
|
| }
|
| RecordSafepoint(deopt_mode);
|
|
|