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

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

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-generator.cc ('k') | src/interpreter/bytecode-label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-label.h
diff --git a/src/interpreter/bytecode-label.h b/src/interpreter/bytecode-label.h
index f10a8638a494af6b4554b148f963f89d06b33109..d96cf66d13a9dd5352224d184004b11a98dfd503 100644
--- a/src/interpreter/bytecode-label.h
+++ b/src/interpreter/bytecode-label.h
@@ -62,6 +62,18 @@ class BytecodeLabels {
void Bind(BytecodeArrayBuilder* builder);
+ void BindToLabel(BytecodeArrayBuilder* builder, const BytecodeLabel& target);
+
+ bool is_bound() const {
+ bool is_bound = !labels_.empty() && labels_.at(0).is_bound();
+ DCHECK(!is_bound ||
+ std::all_of(labels_.begin(), labels_.end(),
+ [](const BytecodeLabel& l) { return l.is_bound(); }));
+ return is_bound;
+ }
+
+ bool empty() const { return labels_.empty(); }
+
private:
ZoneVector<BytecodeLabel> labels_;
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/bytecode-label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698