Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 1306b2353f3d541912efa78c670dd8e1993f80dc..b75a1af6347872ef068b71fb5fa59383f3d24aa1 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -183,17 +183,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) { |
Comment cmnt(masm_, "[ Allocate context"); |
bool need_write_barrier = true; |
+ int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
// Argument to NewContext is the function, which is still in rdi. |
if (info->scope()->is_script_scope()) { |
__ Push(rdi); |
__ 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; |