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

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

Issue 2331033002: [interpreter] Merge {OsrPoll} with {Jump} bytecode. (Closed)
Patch Set: One more test. Created 4 years, 3 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 | « src/interpreter/control-flow-builders.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/control-flow-builders.cc
diff --git a/src/interpreter/control-flow-builders.cc b/src/interpreter/control-flow-builders.cc
index 56cd481f9cdd50c36e3cc2045a4aaa78ecf309e1..0e71b96cce7b09e1b4b4a6ac663637ddca3a1364 100644
--- a/src/interpreter/control-flow-builders.cc
+++ b/src/interpreter/control-flow-builders.cc
@@ -60,18 +60,14 @@ void LoopBuilder::LoopHeader(ZoneVector<BytecodeLabel>* additional_labels) {
}
}
-void LoopBuilder::JumpToHeader() {
+void LoopBuilder::JumpToHeader(int loop_depth) {
+ // Pass the proper loop nesting level to the backwards branch, to trigger
+ // on-stack replacement when armed for the given loop nesting depth.
+ int level = Min(loop_depth, AbstractCode::kMaxLoopNestingMarker - 1);
// 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::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_);
+ builder()->JumpLoop(&loop_header_, level);
}
void LoopBuilder::EndLoop() {
« no previous file with comments | « src/interpreter/control-flow-builders.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698