Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index beb3c8f8174c396948220f36f32c1a6a454f371d..40dba574cc49898fbf3aa2247c96869f595b4f50 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. |