| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index 245dcdc482acc08992b5433f9c78f0d3cd667e3d..1da678c3a99413261eee117c3d8c2d0f9e77a440 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -256,7 +256,11 @@ bool LCodeGen::GeneratePrologue() {
|
| Comment(";;; Allocate local context");
|
| bool need_write_barrier = true;
|
| // Argument to NewContext is the function, which is still in edi.
|
| - if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| + if (FLAG_harmony_scoping && info()->scope()->is_global_scope()) {
|
| + __ push(edi);
|
| + __ 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.
|
|
|