Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 322479dec60715085633e4642ff18b3c31d5ae29..670246c0ee702385363d429fd2b1ce07711f8510 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -160,6 +160,8 @@ 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); |
if (locals_count == 1) { |
__ PushRoot(Heap::kUndefinedValueRootIndex); |
} else if (locals_count > 1) { |