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

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

Issue 2254493002: [interpreter] Use VisitForTest for loop conditions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase(line) golden file 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 | « src/interpreter/bytecode-label.h ('k') | src/interpreter/control-flow-builders.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-label.cc
diff --git a/src/interpreter/bytecode-label.cc b/src/interpreter/bytecode-label.cc
index c5c36f90ec4a9d5286b827e64053b62930354799..a12e8ab4cc8ae077c7fa4fdb0c47466b115d5518 100644
--- a/src/interpreter/bytecode-label.cc
+++ b/src/interpreter/bytecode-label.cc
@@ -11,16 +11,24 @@ namespace internal {
namespace interpreter {
BytecodeLabel* BytecodeLabels::New() {
+ DCHECK(!is_bound());
labels_.push_back(BytecodeLabel());
return &labels_.back();
}
void BytecodeLabels::Bind(BytecodeArrayBuilder* builder) {
- for (auto label : labels_) {
+ for (auto& label : labels_) {
builder->Bind(&label);
}
}
+void BytecodeLabels::BindToLabel(BytecodeArrayBuilder* builder,
+ const BytecodeLabel& target) {
+ for (auto& label : labels_) {
+ builder->Bind(target, &label);
+ }
+}
+
} // namespace interpreter
} // namespace internal
} // namespace v8
« no previous file with comments | « src/interpreter/bytecode-label.h ('k') | src/interpreter/control-flow-builders.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698