Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 6086645db3c2c08dc3706474d2e224792544a012..46a3a802233279a8ac211facdb8277f555dd3742 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -162,8 +162,6 @@ void FullCodeGenerator::Generate() { |
// the frame (that is done below). |
FrameScope frame_scope(masm_, StackFrame::MANUAL); |
- int locals_count = info->scope()->num_stack_slots(); |
- |
info->set_prologue_offset(masm_->pc_offset()); |
{ |
PredictableCodeSizeScope predictible_code_size_scope( |
@@ -179,6 +177,9 @@ void FullCodeGenerator::Generate() { |
} |
{ Comment cmnt(masm_, "[ Allocate locals"); |
+ int locals_count = info->scope()->num_stack_slots(); |
+ // Generators allocate locals, if any, in context slots. |
+ ASSERT(!info->function()->is_generator() || locals_count == 0); |
for (int i = 0; i < locals_count; i++) { |
__ push(ip); |
} |