Index: src/ia32/codegen-ia32.cc |
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc |
index 28ca5d0dfa5db5d613919ce9befd13c605c62702..2b48b0bc99d2bd5aeec682450b82120395ac21e9 100644 |
--- a/src/ia32/codegen-ia32.cc |
+++ b/src/ia32/codegen-ia32.cc |
@@ -209,7 +209,7 @@ void CodeGenerator::Generate(CompilationInfo* info) { |
frame_->AllocateStackSlots(); |
// Allocate the local context if needed. |
- int heap_slots = scope()->num_heap_slots(); |
+ int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
if (heap_slots > 0) { |
Comment cmnt(masm_, "[ allocate local context"); |
// Allocate local context. |