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

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: Address comments 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
« no previous file with comments | « src/interpreter/bytecode-peephole-optimizer.h ('k') | src/interpreter/bytecode-peephole-table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « src/interpreter/bytecode-peephole-optimizer.h ('k') | src/interpreter/bytecode-peephole-table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698