| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index 6762a6c6612abca46ac0c58303cb07a430a16720..6a15e4c8f22b2702812472dc937327fbdb97db36 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.
|
|
|