Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index ac07da6d61ae45295a36321bd0dc00fdd9bc6124..8c930a793bbd61823c2002a2778f356f87d8b9a1 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -159,7 +159,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; |
@@ -1135,7 +1135,7 @@ MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
Register temp = ebx; |
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), |