| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index f26f0ce99bce8a467e5af7ffb479c99019755a1a..fb1d84a166d0f1eb3988b1809da24ac95851fa8d 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -170,16 +170,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 r1.
|
| - 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(r1);
|
| + __ 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;
|
| @@ -187,7 +198,8 @@ bool LCodeGen::GeneratePrologue() {
|
| __ push(r1);
|
| __ CallRuntime(Runtime::kNewFunctionContext, 1);
|
| }
|
| - RecordSafepoint(Safepoint::kNoLazyDeopt);
|
| + RecordSafepoint(deopt_mode);
|
| +
|
| // Context is returned in both r0 and cp. It replaces the context
|
| // passed to us. It's saved in the stack and kept live in cp.
|
| __ mov(cp, r0);
|
| @@ -225,13 +237,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");
|
| }
|
|
|
|
|
|
|