Index: src/interpreter/bytecode-peephole-optimizer.h |
diff --git a/src/interpreter/bytecode-peephole-optimizer.h b/src/interpreter/bytecode-peephole-optimizer.h |
index 4f2cd1895d88f212ee49abc58b4efb37ea4c1e8e..82c593fbc4e28acae3d4a03a37e07e3a782d5bb1 100644 |
--- a/src/interpreter/bytecode-peephole-optimizer.h |
+++ b/src/interpreter/bytecode-peephole-optimizer.h |
@@ -29,12 +29,20 @@ class BytecodePeepholeOptimizer final : public BytecodePipelineStage, |
private: |
BytecodeNode* Optimize(BytecodeNode* current); |
- void UpdateLastAndCurrentBytecodes(BytecodeNode* const current); |
+ void TryToRemoveLastExpressionPosition(const BytecodeNode* const current); |
+ bool UpdateLastAndCurrentBytecodes(BytecodeNode* const current); |
bool CanElideCurrent(const BytecodeNode* const current) const; |
bool CanElideLast(const BytecodeNode* const current) const; |
bool CanElideLastBasedOnSourcePosition( |
const BytecodeNode* const current) const; |
+ // Simple substitution methods. |
+ void ChangeLoadStarToLdrLdar(Bytecode new_bytecode, |
rmcilroy
2016/05/24 10:53:56
This is a helper function for ChangeLoadToLdr, not
oth
2016/05/24 13:37:12
Done modulo the name of the internal function keep
|
+ BytecodeNode* const current); |
+ bool RemoveToBooleanFromJump(BytecodeNode* const current); |
+ bool RemoveToBooleanFromLogicalNot(BytecodeNode* const current); |
+ bool ChangeLoadToLdr(BytecodeNode* const current); |
rmcilroy
2016/05/24 10:53:56
nit - ChangeLdaToLdr ?
oth
2016/05/24 13:37:12
Done.
|
+ |
void InvalidateLast(); |
bool LastIsValid() const; |
void SetLast(const BytecodeNode* const node); |