| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index e76806e4f9d8b73ab727edba7b85ec693f19b07f..9ba5f87603482a0b01094db8cd9e35e19aead69e 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -178,10 +178,13 @@ void FullCodeGenerator::Generate() {
|
| // Possibly allocate a local context.
|
| int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
|
| if (heap_slots > 0) {
|
| - Comment cmnt(masm_, "[ Allocate local context");
|
| + Comment cmnt(masm_, "[ Allocate context");
|
| // Argument to NewContext is the function, which is still in edi.
|
| __ push(edi);
|
| - if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| + if (FLAG_harmony_scoping && info->scope()->is_global_scope()) {
|
| + __ Push(info->scope()->GetScopeInfo());
|
| + __ CallRuntime(Runtime::kNewGlobalContext, 2);
|
| + } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| FastNewContextStub stub(heap_slots);
|
| __ CallStub(&stub);
|
| } else {
|
|
|