Index: src/interpreter/bytecode-peephole-optimizer.h |
diff --git a/src/interpreter/bytecode-peephole-optimizer.h b/src/interpreter/bytecode-peephole-optimizer.h |
index 19813958cd8ff56d83bb33f7e3d2943b08aa4243..338aeb406d48e70ab7ea554191947ba38157e28b 100644 |
--- a/src/interpreter/bytecode-peephole-optimizer.h |
+++ b/src/interpreter/bytecode-peephole-optimizer.h |
@@ -29,10 +29,17 @@ class BytecodePeepholeOptimizer final : public BytecodePipelineStage, |
private: |
BytecodeNode* Optimize(BytecodeNode* current); |
- void UpdateCurrentBytecode(BytecodeNode* const current); |
- bool CanElideCurrent(const BytecodeNode* const current) const; |
+ bool SimpleSubstitution(BytecodeNode* const current); |
+ bool CanElideCurrent(const BytecodeNode* const current); |
bool CanElideLast(const BytecodeNode* const current) const; |
+ // Simple substitution methods. |
+ void RewriteLastLoadAndStar(Bytecode new_bytecode, |
+ BytecodeNode* const current); |
+ bool RemoveToBooleanFromJump(BytecodeNode* const current); |
+ bool ChangeLdaToLdr(BytecodeNode* const current); |
+ bool ChangeLdarMovToLdarStar(BytecodeNode* const current); |
+ |
void InvalidateLast(); |
bool LastIsValid() const; |
void SetLast(const BytecodeNode* const node); |