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

Side by Side Diff: test/unittests/interpreter/bytecode-pipeline-unittest.cc

Issue 2007023003: [interpreter] Address naming inconsistencies in bytecodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0056-register-only
Patch Set: Rebase. Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/interpreter/bytecode-pipeline.h" 7 #include "src/interpreter/bytecode-pipeline.h"
8 #include "src/interpreter/bytecode-register-allocator.h" 8 #include "src/interpreter/bytecode-register-allocator.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "test/unittests/test-utils.h" 10 #include "test/unittests/test-utils.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 CHECK_EQ(node.operand_count(), 2); 85 CHECK_EQ(node.operand_count(), 2);
86 CHECK_EQ(node.operand(0), operands[0]); 86 CHECK_EQ(node.operand(0), operands[0]);
87 CHECK_EQ(node.operand(1), operands[1]); 87 CHECK_EQ(node.operand(1), operands[1]);
88 CHECK_EQ(node.operand_scale(), OperandScale::kQuadruple); 88 CHECK_EQ(node.operand_scale(), OperandScale::kQuadruple);
89 CHECK(!node.source_info().is_valid()); 89 CHECK(!node.source_info().is_valid());
90 CHECK_EQ(node.Size(), 10); 90 CHECK_EQ(node.Size(), 10);
91 } 91 }
92 92
93 TEST_F(BytecodeNodeTest, Constructor4) { 93 TEST_F(BytecodeNodeTest, Constructor4) {
94 uint32_t operands[] = {0x11, 0x22, 0x33}; 94 uint32_t operands[] = {0x11, 0x22, 0x33};
95 BytecodeNode node(Bytecode::kLoadIC, operands[0], operands[1], operands[2], 95 BytecodeNode node(Bytecode::kLdaNamedProperty, operands[0], operands[1],
96 OperandScale::kSingle); 96 operands[2], OperandScale::kSingle);
97 CHECK_EQ(node.operand_count(), 3); 97 CHECK_EQ(node.operand_count(), 3);
98 CHECK_EQ(node.bytecode(), Bytecode::kLoadIC); 98 CHECK_EQ(node.bytecode(), Bytecode::kLdaNamedProperty);
99 CHECK_EQ(node.operand(0), operands[0]); 99 CHECK_EQ(node.operand(0), operands[0]);
100 CHECK_EQ(node.operand(1), operands[1]); 100 CHECK_EQ(node.operand(1), operands[1]);
101 CHECK_EQ(node.operand(2), operands[2]); 101 CHECK_EQ(node.operand(2), operands[2]);
102 CHECK_EQ(node.operand_scale(), OperandScale::kSingle); 102 CHECK_EQ(node.operand_scale(), OperandScale::kSingle);
103 CHECK(!node.source_info().is_valid()); 103 CHECK(!node.source_info().is_valid());
104 CHECK_EQ(node.Size(), 4); 104 CHECK_EQ(node.Size(), 4);
105 } 105 }
106 106
107 TEST_F(BytecodeNodeTest, Constructor5) { 107 TEST_F(BytecodeNodeTest, Constructor5) {
108 uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc}; 108 uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 CHECK_EQ(clone.bytecode(), Bytecode::kJump); 189 CHECK_EQ(clone.bytecode(), Bytecode::kJump);
190 CHECK_EQ(clone.operand_count(), 1); 190 CHECK_EQ(clone.operand_count(), 1);
191 CHECK_EQ(clone.operand(0), 0x01aabbcc); 191 CHECK_EQ(clone.operand(0), 0x01aabbcc);
192 CHECK_EQ(clone.operand_scale(), OperandScale::kQuadruple); 192 CHECK_EQ(clone.operand_scale(), OperandScale::kQuadruple);
193 CHECK_EQ(clone.source_info(), source_info); 193 CHECK_EQ(clone.source_info(), source_info);
194 } 194 }
195 195
196 } // namespace interpreter 196 } // namespace interpreter
197 } // namespace internal 197 } // namespace internal
198 } // namespace v8 198 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698