| Index: src/mips64/lithium-codegen-mips64.cc
|
| diff --git a/src/mips64/lithium-codegen-mips64.cc b/src/mips64/lithium-codegen-mips64.cc
|
| index 9a68b608943b699c69ae4e8db77360c9346fec13..8168d7041ba89fec13e54b38a912625ba2a2e2a7 100644
|
| --- a/src/mips64/lithium-codegen-mips64.cc
|
| +++ b/src/mips64/lithium-codegen-mips64.cc
|
| @@ -165,16 +165,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()->scope()->num_heap_slots() > 0) {
|
| Comment(";;; Allocate local context");
|
| bool need_write_barrier = true;
|
| // Argument to NewContext is the function, which is in a1.
|
| - DCHECK(!info()->scope()->is_script_scope());
|
| - if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| - FastNewContextStub stub(isolate(), heap_slots);
|
| + int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
|
| + Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
|
| + if (info()->scope()->is_script_scope()) {
|
| + __ push(a1);
|
| + __ 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;
|
| @@ -182,7 +193,8 @@ bool LCodeGen::GeneratePrologue() {
|
| __ push(a1);
|
| __ CallRuntime(Runtime::kNewFunctionContext, 1);
|
| }
|
| - RecordSafepoint(Safepoint::kNoLazyDeopt);
|
| + RecordSafepoint(deopt_mode);
|
| +
|
| // Context is returned in both v0. It replaces the context passed to us.
|
| // It's saved in the stack and kept live in cp.
|
| __ mov(cp, v0);
|
| @@ -215,13 +227,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 cp still holds the
|
| - // incoming context.
|
| - __ CallRuntime(Runtime::kTraceEnter, 0);
|
| - }
|
| - return !is_aborted();
|
| + Comment(";;; Prologue end");
|
| }
|
|
|
|
|
|
|