Index: src/interpreter/bytecode-peephole-optimizer.cc |
diff --git a/src/interpreter/bytecode-peephole-optimizer.cc b/src/interpreter/bytecode-peephole-optimizer.cc |
index 7ab7bc571d1501440e2b2c80cb0184b8bdb12e0a..3c8e1f9de4d9180e530b6342c9478525fb72f022 100644 |
--- a/src/interpreter/bytecode-peephole-optimizer.cc |
+++ b/src/interpreter/bytecode-peephole-optimizer.cc |
@@ -4,7 +4,6 @@ |
#include "src/interpreter/bytecode-peephole-optimizer.h" |
-#include "src/interpreter/constant-array-builder.h" |
#include "src/objects-inl.h" |
#include "src/objects.h" |
@@ -13,9 +12,8 @@ namespace internal { |
namespace interpreter { |
BytecodePeepholeOptimizer::BytecodePeepholeOptimizer( |
- ConstantArrayBuilder* constant_array_builder, |
BytecodePipelineStage* next_stage) |
- : constant_array_builder_(constant_array_builder), next_stage_(next_stage) { |
+ : next_stage_(next_stage) { |
InvalidateLast(); |
} |
@@ -83,14 +81,6 @@ void BytecodePeepholeOptimizer::SetLast(const BytecodeNode* const node) { |
last_.Clone(node); |
} |
-Handle<Object> BytecodePeepholeOptimizer::GetConstantForIndexOperand( |
- const BytecodeNode* const node, int index) const { |
- DCHECK_LE(index, node->operand_count()); |
- DCHECK_EQ(Bytecodes::GetOperandType(node->bytecode(), 0), OperandType::kIdx); |
- uint32_t index_operand = node->operand(0); |
- return constant_array_builder_->At(index_operand); |
-} |
- |
bool BytecodePeepholeOptimizer::CanElideLastBasedOnSourcePosition( |
const BytecodeNode* const current) const { |
// |
@@ -289,19 +279,6 @@ void BytecodePeepholeOptimizer:: |
} |
} |
-void BytecodePeepholeOptimizer::TransformToStarIfLoadingNameConstantAction( |
- BytecodeNode* const node, const PeepholeActionAndData* action_data) { |
- DCHECK_EQ(last()->bytecode(), Bytecode::kLdaConstant); |
- DCHECK(!Bytecodes::IsJump(node->bytecode())); |
- |
- // TODO(5203): Remove this temporary exception. |
- AllowHandleDereference allow_deref; |
- if (GetConstantForIndexOperand(last(), 0)->IsName()) { |
- node->replace_bytecode(Bytecode::kStar); |
- } |
- DefaultAction(node); |
-} |
- |
void BytecodePeepholeOptimizer::DefaultJumpAction( |
BytecodeNode* const node, const PeepholeActionAndData* action_data) { |
DCHECK(LastIsValid()); |