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

Unified Diff: src/interpreter/bytecode-peephole-optimizer.h

Issue 1985753002: [interpreter] Introduce fused bytecodes for common sequences. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
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);

Powered by Google App Engine
This is Rietveld 408576698