| Index: src/full-codegen/x64/full-codegen-x64.cc
|
| diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
|
| index 9d421607362a64e3181f08e9b66bf933d5efc20a..831e74a3c680f1f89e96d3478036ed6de1ba7a64 100644
|
| --- a/src/full-codegen/x64/full-codegen-x64.cc
|
| +++ b/src/full-codegen/x64/full-codegen-x64.cc
|
| @@ -158,7 +158,7 @@ void FullCodeGenerator::Generate() {
|
| bool function_in_register = true;
|
|
|
| // Possibly allocate a local context.
|
| - if (info->scope()->num_heap_slots() > 0) {
|
| + if (info->scope()->NeedsContext()) {
|
| Comment cmnt(masm_, "[ Allocate context");
|
| bool need_write_barrier = true;
|
| int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
|
| @@ -1163,7 +1163,7 @@ MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var,
|
| Register temp = rbx;
|
|
|
| for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) {
|
| - if (s->num_heap_slots() > 0) {
|
| + if (s->NeedsContext()) {
|
| if (s->calls_sloppy_eval()) {
|
| // Check that extension is "the hole".
|
| __ JumpIfNotRoot(ContextOperand(context, Context::EXTENSION_INDEX),
|
|
|