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

Unified Diff: src/interpreter/bytecode-peephole-optimizer.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-label.h ('k') | src/interpreter/bytecode-peephole-optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-peephole-optimizer.h
diff --git a/src/interpreter/bytecode-peephole-optimizer.h b/src/interpreter/bytecode-peephole-optimizer.h
index e7ebd20cdcea63a077f42b693e36757abd57af3b..22e47030ac234badb0b3aaf8579244de5c103f77 100644
--- a/src/interpreter/bytecode-peephole-optimizer.h
+++ b/src/interpreter/bytecode-peephole-optimizer.h
@@ -24,11 +24,17 @@ class BytecodePeepholeOptimizer final : public BytecodePipelineStage,
// BytecodePipelineStage interface.
void Write(BytecodeNode* node) override;
- size_t FlushForOffset() override;
- void FlushBasicBlock() override;
+ void WriteJump(BytecodeNode* node, BytecodeLabel* label) override;
+ void BindLabel(BytecodeLabel* label) override;
+ void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override;
+ Handle<BytecodeArray> ToBytecodeArray(
+ int fixed_register_count, int parameter_count,
+ Handle<FixedArray> handler_table) override;
private:
+ BytecodeNode* OptimizeAndEmitLast(BytecodeNode* current);
BytecodeNode* Optimize(BytecodeNode* current);
+ void Flush();
void TryToRemoveLastExpressionPosition(const BytecodeNode* const current);
bool TransformLastAndCurrentBytecodes(BytecodeNode* const current);
@@ -54,7 +60,6 @@ class BytecodePeepholeOptimizer final : public BytecodePipelineStage,
ConstantArrayBuilder* constant_array_builder_;
BytecodePipelineStage* next_stage_;
BytecodeNode last_;
- bool last_is_discardable_;
DISALLOW_COPY_AND_ASSIGN(BytecodePeepholeOptimizer);
};
« no previous file with comments | « src/interpreter/bytecode-label.h ('k') | src/interpreter/bytecode-peephole-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698