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

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

Issue 2096653003: [ic] Don't pass receiver and name to LoadGlobalIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@store-name-in-metavector
Patch Set: Removed name parameter. Created 4 years, 5 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 TEST_F(BytecodeNodeTest, Constructor2) { 67 TEST_F(BytecodeNodeTest, Constructor2) {
68 uint32_t operands[] = {0x11}; 68 uint32_t operands[] = {0x11};
69 BytecodeNode node(Bytecode::kJumpIfTrue, operands[0]); 69 BytecodeNode node(Bytecode::kJumpIfTrue, operands[0]);
70 CHECK_EQ(node.bytecode(), Bytecode::kJumpIfTrue); 70 CHECK_EQ(node.bytecode(), Bytecode::kJumpIfTrue);
71 CHECK_EQ(node.operand_count(), 1); 71 CHECK_EQ(node.operand_count(), 1);
72 CHECK_EQ(node.operand(0), operands[0]); 72 CHECK_EQ(node.operand(0), operands[0]);
73 CHECK(!node.source_info().is_valid()); 73 CHECK(!node.source_info().is_valid());
74 } 74 }
75 75
76 TEST_F(BytecodeNodeTest, Constructor3) { 76 TEST_F(BytecodeNodeTest, Constructor3) {
77 uint32_t operands[] = {0x11, 0x22}; 77 uint32_t operands[] = {0x11};
78 BytecodeNode node(Bytecode::kLdaGlobal, operands[0], operands[1]); 78 BytecodeNode node(Bytecode::kLdaGlobal, operands[0]);
79 CHECK_EQ(node.bytecode(), Bytecode::kLdaGlobal); 79 CHECK_EQ(node.bytecode(), Bytecode::kLdaGlobal);
80 CHECK_EQ(node.operand_count(), 2); 80 CHECK_EQ(node.operand_count(), 1);
81 CHECK_EQ(node.operand(0), operands[0]); 81 CHECK_EQ(node.operand(0), operands[0]);
82 CHECK_EQ(node.operand(1), operands[1]);
83 CHECK(!node.source_info().is_valid()); 82 CHECK(!node.source_info().is_valid());
84 } 83 }
85 84
86 TEST_F(BytecodeNodeTest, Constructor4) { 85 TEST_F(BytecodeNodeTest, Constructor4) {
87 uint32_t operands[] = {0x11, 0x22, 0x33}; 86 uint32_t operands[] = {0x11, 0x22, 0x33};
88 BytecodeNode node(Bytecode::kLdaNamedProperty, operands[0], operands[1], 87 BytecodeNode node(Bytecode::kLdaNamedProperty, operands[0], operands[1],
89 operands[2]); 88 operands[2]);
90 CHECK_EQ(node.operand_count(), 3); 89 CHECK_EQ(node.operand_count(), 3);
91 CHECK_EQ(node.bytecode(), Bytecode::kLdaNamedProperty); 90 CHECK_EQ(node.bytecode(), Bytecode::kLdaNamedProperty);
92 CHECK_EQ(node.operand(0), operands[0]); 91 CHECK_EQ(node.operand(0), operands[0]);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 clone.set_bytecode(Bytecode::kJump, 0x01aabbcc); 176 clone.set_bytecode(Bytecode::kJump, 0x01aabbcc);
178 CHECK_EQ(clone.bytecode(), Bytecode::kJump); 177 CHECK_EQ(clone.bytecode(), Bytecode::kJump);
179 CHECK_EQ(clone.operand_count(), 1); 178 CHECK_EQ(clone.operand_count(), 1);
180 CHECK_EQ(clone.operand(0), 0x01aabbcc); 179 CHECK_EQ(clone.operand(0), 0x01aabbcc);
181 CHECK_EQ(clone.source_info(), source_info); 180 CHECK_EQ(clone.source_info(), source_info);
182 } 181 }
183 182
184 } // namespace interpreter 183 } // namespace interpreter
185 } // namespace internal 184 } // namespace internal
186 } // namespace v8 185 } // 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