| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index a74501082cffb1ea1adc406ce1093208fff1258b..e8cf3452b8b56e87a88a6159a8905f05a77a18a4 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -248,16 +248,27 @@ bool LCodeGen::GeneratePrologue() {
|
|
|
| if (info()->saves_caller_doubles()) SaveCallerDoubles();
|
| }
|
| + return !is_aborted();
|
| +}
|
| +
|
| +
|
| +void LCodeGen::DoPrologue(LPrologue* instr) {
|
| + Comment(";;; Prologue begin");
|
|
|
| // Possibly allocate a local context.
|
| - int heap_slots = info_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
|
| - if (heap_slots > 0) {
|
| + if (info_->num_heap_slots() > 0) {
|
| Comment(";;; Allocate local context");
|
| bool need_write_barrier = true;
|
| // Argument to NewContext is the function, which is still in edi.
|
| - DCHECK(!info()->scope()->is_script_scope());
|
| - if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| - FastNewContextStub stub(isolate(), heap_slots);
|
| + int slots = info_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
|
| + Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
|
| + if (info()->scope()->is_script_scope()) {
|
| + __ push(edi);
|
| + __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
|
| + __ CallRuntime(Runtime::kNewScriptContext, 2);
|
| + deopt_mode = Safepoint::kLazyDeopt;
|
| + } else if (slots <= FastNewContextStub::kMaximumSlots) {
|
| + FastNewContextStub stub(isolate(), slots);
|
| __ CallStub(&stub);
|
| // Result of FastNewContextStub is always in new space.
|
| need_write_barrier = false;
|
| @@ -265,7 +276,8 @@ bool LCodeGen::GeneratePrologue() {
|
| __ push(edi);
|
| __ CallRuntime(Runtime::kNewFunctionContext, 1);
|
| }
|
| - RecordSafepoint(Safepoint::kNoLazyDeopt);
|
| + RecordSafepoint(deopt_mode);
|
| +
|
| // Context is returned in eax. It replaces the context passed to us.
|
| // It's saved in the stack and kept live in esi.
|
| __ mov(esi, eax);
|
| @@ -302,13 +314,7 @@ bool LCodeGen::GeneratePrologue() {
|
| Comment(";;; End allocate local context");
|
| }
|
|
|
| - // Trace the call.
|
| - if (FLAG_trace && info()->IsOptimizing()) {
|
| - // We have not executed any compiled code yet, so esi still holds the
|
| - // incoming context.
|
| - __ CallRuntime(Runtime::kTraceEnter, 0);
|
| - }
|
| - return !is_aborted();
|
| + Comment(";;; Prologue end");
|
| }
|
|
|
|
|
|
|