Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2253033002: [interpreter] Don't assume generator functions do an initial yield. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode_expectations/Generators.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index cb133c365eb053b713b31638e1c7d23ec6716668..12743039880ba0c894d81804041a71fb8c6d61b9 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -876,7 +876,10 @@ void BytecodeGenerator::VisitGeneratorPrologue() {
BuildIndexedJump(generator_state_, 0, generator_resume_points_.size(),
generator_resume_points_);
- builder()->Bind(&regular_call);
+ builder()
+ ->Bind(&regular_call)
+ .LoadLiteral(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting))
+ .StoreAccumulatorInRegister(generator_state_);
Dan Ehrenberg 2016/08/17 13:44:34 Looks like you're doing this extra load/store for
rmcilroy 2016/08/17 13:53:40 +1
// This is a regular call. Fall through to the ordinary function prologue,
// after which we will run into the generator object creation and other extra
// code inserted by the parser.
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode_expectations/Generators.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698