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

Unified Diff: src/interpreter/control-flow-builders.cc

Issue 2200733002: [interpreter] Elide OSR polling from fake loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Recement. 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
Index: src/interpreter/control-flow-builders.cc
diff --git a/src/interpreter/control-flow-builders.cc b/src/interpreter/control-flow-builders.cc
index 1a1d3b45a35d805993bad81cd32478ead9ddf13e..1624712425392f6addf140473ede669b059f6760 100644
--- a/src/interpreter/control-flow-builders.cc
+++ b/src/interpreter/control-flow-builders.cc
@@ -102,11 +102,21 @@ void LoopBuilder::LoopHeader(ZoneVector<BytecodeLabel>* additional_labels) {
}
}
+void LoopBuilder::JumpToHeader() {
+ // Loop must have closed form, i.e. all loop elements are within the loop,
+ // the loop header precedes the body and next elements in the loop.
+ DCHECK(loop_header_.is_bound());
+ builder()->Jump(&loop_header_);
+}
-void LoopBuilder::EndLoop() {
+void LoopBuilder::JumpToHeaderIfTrue() {
// Loop must have closed form, i.e. all loop elements are within the loop,
// the loop header precedes the body and next elements in the loop.
DCHECK(loop_header_.is_bound());
+ builder()->JumpIfTrue(&loop_header_);
+}
+
+void LoopBuilder::EndLoop() {
builder()->Bind(&loop_end_);
SetBreakTarget(loop_end_);
}
« no previous file with comments | « src/interpreter/control-flow-builders.h ('k') | test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698