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

Unified Diff: test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc

Issue 2485383002: [Interpreter] Remove Ldr[Named/Keyed]Property bytecodes and use Star Lookahead instead. (Closed)
Patch Set: Created 4 years, 1 month 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 | « test/unittests/interpreter/bytecode-array-builder-unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
diff --git a/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc b/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
index cec41166bf28dc15807aa7ca19fb67daf9a921a3..ee6d1478bd7dc96fa7e656d02cebbfbbf83c4671 100644
--- a/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
+++ b/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
@@ -321,57 +321,6 @@ TEST_F(BytecodePeepholeOptimizerTest, NopStatementStackCheck) {
// Tests covering BytecodePeepholeOptimizer::UpdateLastAndCurrentBytecodes().
-TEST_F(BytecodePeepholeOptimizerTest, MergeLoadICStar) {
- const uint32_t operands[] = {
- static_cast<uint32_t>(Register(31).ToOperand()), 32, 33,
- static_cast<uint32_t>(Register(256).ToOperand())};
- const int expected_operand_count = static_cast<int>(arraysize(operands));
-
- BytecodeNode first(Bytecode::kLdaNamedProperty, operands[0], operands[1],
- operands[2]);
- BytecodeNode second(Bytecode::kStar, operands[3]);
- BytecodeNode third(Bytecode::kReturn);
- optimizer()->Write(&first);
- optimizer()->Write(&second);
- CHECK_EQ(write_count(), 1);
- CHECK_EQ(last_written().bytecode(), Bytecode::kLdrNamedProperty);
- CHECK_EQ(last_written().operand_count(), expected_operand_count);
- for (int i = 0; i < expected_operand_count; ++i) {
- CHECK_EQ(last_written().operand(i), operands[i]);
- }
- optimizer()->Write(&third);
- CHECK_EQ(write_count(), 2);
- CHECK_EQ(last_written().bytecode(), Bytecode::kLdar);
- CHECK_EQ(last_written().operand(0), operands[expected_operand_count - 1]);
- Flush();
- CHECK_EQ(last_written().bytecode(), third.bytecode());
-}
-
-TEST_F(BytecodePeepholeOptimizerTest, MergeLdaKeyedPropertyStar) {
- const uint32_t operands[] = {static_cast<uint32_t>(Register(31).ToOperand()),
- 9999997,
- static_cast<uint32_t>(Register(1).ToOperand())};
- const int expected_operand_count = static_cast<int>(arraysize(operands));
-
- BytecodeNode first(Bytecode::kLdaKeyedProperty, operands[0], operands[1]);
- BytecodeNode second(Bytecode::kStar, operands[2]);
- BytecodeNode third(Bytecode::kReturn);
- optimizer()->Write(&first);
- optimizer()->Write(&second);
- CHECK_EQ(write_count(), 1);
- CHECK_EQ(last_written().bytecode(), Bytecode::kLdrKeyedProperty);
- CHECK_EQ(last_written().operand_count(), expected_operand_count);
- for (int i = 0; i < expected_operand_count; ++i) {
- CHECK_EQ(last_written().operand(i), operands[i]);
- }
- optimizer()->Write(&third);
- CHECK_EQ(write_count(), 2);
- CHECK_EQ(last_written().bytecode(), Bytecode::kLdar);
- CHECK_EQ(last_written().operand(0), operands[expected_operand_count - 1]);
- Flush();
- CHECK_EQ(last_written().bytecode(), third.bytecode());
-}
-
TEST_F(BytecodePeepholeOptimizerTest, MergeLdaGlobalStar) {
const uint32_t operands[] = {19191,
static_cast<uint32_t>(Register(1).ToOperand())};
« no previous file with comments | « test/unittests/interpreter/bytecode-array-builder-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698