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

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

Issue 2238853002: [Interpreter] Remove LdaConstant+ToName peephole optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_internalize
Patch Set: Created 4 years, 4 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.cc
diff --git a/src/interpreter/bytecode-peephole-optimizer.cc b/src/interpreter/bytecode-peephole-optimizer.cc
index 7ab7bc571d1501440e2b2c80cb0184b8bdb12e0a..432ac281ffcbe9fbba4456f4a6fdc50666841f2e 100644
--- a/src/interpreter/bytecode-peephole-optimizer.cc
+++ b/src/interpreter/bytecode-peephole-optimizer.cc
@@ -13,9 +13,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 +82,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 +280,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());

Powered by Google App Engine
This is Rietveld 408576698