Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index dfbae7d59574814f5a9706f4fd686de00a62faba..325d7aca7e827f64bcd304b77b88ab20d2cbc98d 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -192,17 +192,17 @@ void FullCodeGenerator::Generate() { |
bool function_in_register_x1 = true; |
- 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 x1. |
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()) { |
__ Mov(x10, Operand(info->scope()->GetScopeInfo(info->isolate()))); |
__ Push(x1, x10); |
__ 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; |