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

Unified Diff: src/interpreter/mkpeephole.cc

Issue 2795183002: [Interpreter] Move ToBoolean elision in BytecodeGenerator. (Closed)
Patch Set: tests Created 3 years, 8 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/mkpeephole.cc
diff --git a/src/interpreter/mkpeephole.cc b/src/interpreter/mkpeephole.cc
index 62d3a77e02c7faf513f1d8ff020217b6fd4785dd..ff65ee47c76a91dd8c6a5c094bb16c5453b72b02 100644
--- a/src/interpreter/mkpeephole.cc
+++ b/src/interpreter/mkpeephole.cc
@@ -122,16 +122,6 @@ PeepholeActionAndData PeepholeActionTableWriter::LookupActionAndData(
// TODO(rmcilroy): Add elide for consecutive mov to and from the same
// register.
- // Remove ToBoolean coercion from conditional jumps where possible.
- if (Bytecodes::WritesBooleanToAccumulator(last)) {
- if (Bytecodes::IsJumpIfToBoolean(current)) {
- return {PeepholeAction::kChangeJumpBytecodeAction,
- Bytecodes::GetJumpWithoutToBoolean(current)};
- } else if (current == Bytecode::kToBooleanLogicalNot) {
- return {PeepholeAction::kChangeBytecodeAction, Bytecode::kLogicalNot};
- }
- }
-
// Fuse LdaSmi followed by binary op to produce binary op with a
// immediate integer argument. This savaes on dispatches and size.
if (last == Bytecode::kLdaSmi) {
« no previous file with comments | « src/interpreter/control-flow-builders.cc ('k') | test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698