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

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

Issue 2035813002: [Interpreter] Move jump processing to bytecode array writer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_fix_bytecode
Patch Set: Address comments Created 4 years, 6 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-peephole-optimizer.cc ('k') | src/interpreter/bytecode-register-optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-pipeline.h
diff --git a/src/interpreter/bytecode-pipeline.h b/src/interpreter/bytecode-pipeline.h
index 8b8d29d0c79faa7b972b744480b92892fd90e9d8..9d497cd305711fe2bb48b4c3ab483607dca23685 100644
--- a/src/interpreter/bytecode-pipeline.h
+++ b/src/interpreter/bytecode-pipeline.h
@@ -13,6 +13,7 @@ namespace v8 {
namespace internal {
namespace interpreter {
+class BytecodeLabel;
class BytecodeNode;
class BytecodeSourceInfo;
@@ -26,12 +27,26 @@ class BytecodePipelineStage {
// deferring Write() to the next stage.
virtual void Write(BytecodeNode* node) = 0;
- // Flush state for bytecode array offset calculation. Returns the
- // current size of bytecode array.
- virtual size_t FlushForOffset() = 0;
-
- // Flush state to terminate basic block.
- virtual void FlushBasicBlock() = 0;
+ // Write jump bytecode node |node| which jumps to |label| into pipeline.
+ // The node and label are only valid for the duration of the call. This call
+ // implicitly ends the current basic block so should always write to the next
+ // stage.
+ virtual void WriteJump(BytecodeNode* node, BytecodeLabel* label) = 0;
+
+ // Binds |label| to the current bytecode location. This call implicitly
+ // ends the current basic block and so any deferred bytecodes should be
+ // written to the next stage.
+ virtual void BindLabel(BytecodeLabel* label) = 0;
+
+ // Binds |label| to the location of |target|. This call implicitly
+ // ends the current basic block and so any deferred bytecodes should be
+ // written to the next stage.
+ virtual void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) = 0;
+
+ // Flush the pipeline and generate a bytecode array.
+ virtual Handle<BytecodeArray> ToBytecodeArray(
+ int fixed_register_count, int parameter_count,
+ Handle<FixedArray> handler_table) = 0;
};
// Source code position information.
« no previous file with comments | « src/interpreter/bytecode-peephole-optimizer.cc ('k') | src/interpreter/bytecode-register-optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698