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

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

Issue 2172233002: [interpreter] Add explicit OSR polling bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-osr-1
Patch Set: Minor cleanups. Created 4 years, 5 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
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 6c51499740581ec24bd49806ee881bdf76d08d6b..367a50983e129084403d6c03d32bfe6df568afb6 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -664,6 +664,16 @@ void BytecodeGenerator::VisitIterationHeader(IterationStatement* stmt,
stmt->yield_count(), generator_resume_points_);
builder()->Bind(&not_resuming);
}
+
+ // Insert an explicit {OsrPoll} right after the loop header, to trigger
+ // on-stack replacement when armed for the given loop nesting depth.
rmcilroy 2016/07/25 12:40:23 Should this be before the generator resume logic (
Michael Starzinger 2016/07/25 13:40:48 Done. Yes, I am not 100% sure about interaction wi
rmcilroy 2016/07/26 09:26:44 Acknowledged.
+ if (FLAG_ignition_osr) {
+ // TODO(4764): Merge this with another bytecode (e.g. {Jump} back edge).
+ // TODO(4764): Investigate interaction with generators.
+ // TODO(4764): Track and pass correct loop depth.
+ DCHECK_EQ(0, stmt->yield_count());
+ builder()->OsrPoll(0);
+ }
}
void BytecodeGenerator::VisitGeneratorPrologue() {

Powered by Google App Engine
This is Rietveld 408576698