| Index: src/arm/full-codegen-arm.cc
|
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
|
| index a792d9f3d2ed33728f80f293a7b0bf4fa9052965..d7586817a31461c8081bb996705ae579de5ccd02 100644
|
| --- a/src/arm/full-codegen-arm.cc
|
| +++ b/src/arm/full-codegen-arm.cc
|
| @@ -191,17 +191,17 @@ void FullCodeGenerator::Generate() {
|
| bool function_in_register = true;
|
|
|
| // Possibly allocate a local context.
|
| - int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
|
| - if (heap_slots > 0) {
|
| + if (info->scope()->num_heap_slots() > 0) {
|
| // Argument to NewContext is the function, which is still in r1.
|
| Comment cmnt(masm_, "[ Allocate context");
|
| bool need_write_barrier = true;
|
| + int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
|
| if (info->scope()->is_script_scope()) {
|
| __ push(r1);
|
| __ Push(info->scope()->GetScopeInfo(info->isolate()));
|
| __ CallRuntime(Runtime::kNewScriptContext, 2);
|
| - } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| - FastNewContextStub stub(isolate(), heap_slots);
|
| + } else if (slots <= FastNewContextStub::kMaximumSlots) {
|
| + FastNewContextStub stub(isolate(), slots);
|
| __ CallStub(&stub);
|
| // Result of FastNewContextStub is always in new space.
|
| need_write_barrier = false;
|
|
|