| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index ff09e287f76cfff73a251e2e92e3f63e2a1e7aa7..913c54c7fc6d1a1930e1d02ab9779a5d8b11376b 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -181,7 +181,11 @@ bool LCodeGen::GeneratePrologue() {
|
| Comment(";;; Allocate local context");
|
| bool need_write_barrier = true;
|
| // Argument to NewContext is the function, which is in r1.
|
| - if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| + if (FLAG_harmony_scoping && info()->scope()->is_global_scope()) {
|
| + __ push(r1);
|
| + __ Push(info()->scope()->GetScopeInfo());
|
| + __ CallRuntime(Runtime::kNewGlobalContext, 2);
|
| + } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| FastNewContextStub stub(isolate(), heap_slots);
|
| __ CallStub(&stub);
|
| // Result of FastNewContextStub is always in new space.
|
|
|