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

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

Issue 2242463002: [interpreter] VisitForTest for bytecode generator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: nit 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 2f89c4806d96c60c2aa455ebab2525bd80a21a9e..f10a8638a494af6b4554b148f963f89d06b33109 100644
--- a/src/interpreter/bytecode-label.h
+++ b/src/interpreter/bytecode-label.h
@@ -5,10 +5,14 @@
#ifndef V8_INTERPRETER_BYTECODE_LABEL_H_
#define V8_INTERPRETER_BYTECODE_LABEL_H_
+#include "src/zone-containers.h"
+
namespace v8 {
namespace internal {
namespace interpreter {
+class BytecodeArrayBuilder;
+
// A label representing a branch target in a bytecode array. When a
// label is bound, it represents a known position in the bytecode
// array. For labels that are forward references there can be at most
@@ -49,6 +53,21 @@ class BytecodeLabel final {
friend class BytecodeArrayWriter;
};
+// Class representing a branch target of multiple jumps.
+class BytecodeLabels {
+ public:
+ explicit BytecodeLabels(Zone* zone) : labels_(zone) {}
+
+ BytecodeLabel* New();
+
+ void Bind(BytecodeArrayBuilder* builder);
+
+ private:
+ ZoneVector<BytecodeLabel> labels_;
+
+ DISALLOW_COPY_AND_ASSIGN(BytecodeLabels);
+};
+
} // namespace interpreter
} // namespace internal
} // namespace v8
« 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