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

Side by Side Diff: test/unittests/compiler/interpreter-assembler-unittest.cc

Issue 1413863010: [Interpreter] Add wide varients of bytecodes with feedback and constant pool indexes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_fixbuiltinstacklimit
Patch Set: Rebased Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 "test/unittests/compiler/interpreter-assembler-unittest.h" 5 #include "test/unittests/compiler/interpreter-assembler-unittest.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/interface-descriptors.h" 10 #include "src/interface-descriptors.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 302
303 TARGET_TEST_F(InterpreterAssemblerTest, BytecodeOperand) { 303 TARGET_TEST_F(InterpreterAssemblerTest, BytecodeOperand) {
304 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { 304 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
305 InterpreterAssemblerForTest m(this, bytecode); 305 InterpreterAssemblerForTest m(this, bytecode);
306 int number_of_operands = interpreter::Bytecodes::NumberOfOperands(bytecode); 306 int number_of_operands = interpreter::Bytecodes::NumberOfOperands(bytecode);
307 for (int i = 0; i < number_of_operands; i++) { 307 for (int i = 0; i < number_of_operands; i++) {
308 int offset = interpreter::Bytecodes::GetOperandOffset(bytecode, i); 308 int offset = interpreter::Bytecodes::GetOperandOffset(bytecode, i);
309 switch (interpreter::Bytecodes::GetOperandType(bytecode, i)) { 309 switch (interpreter::Bytecodes::GetOperandType(bytecode, i)) {
310 case interpreter::OperandType::kCount8: 310 case interpreter::OperandType::kCount8:
311 EXPECT_THAT(m.BytecodeOperandCount8(i), m.IsBytecodeOperand(offset)); 311 EXPECT_THAT(m.BytecodeOperandCount(i), m.IsBytecodeOperand(offset));
312 break; 312 break;
313 case interpreter::OperandType::kIdx8: 313 case interpreter::OperandType::kIdx8:
314 EXPECT_THAT(m.BytecodeOperandIdx8(i), m.IsBytecodeOperand(offset)); 314 EXPECT_THAT(m.BytecodeOperandIdx(i), m.IsBytecodeOperand(offset));
315 break; 315 break;
316 case interpreter::OperandType::kImm8: 316 case interpreter::OperandType::kImm8:
317 EXPECT_THAT(m.BytecodeOperandImm8(i), 317 EXPECT_THAT(m.BytecodeOperandImm(i),
318 m.IsBytecodeOperandSignExtended(offset)); 318 m.IsBytecodeOperandSignExtended(offset));
319 break; 319 break;
320 case interpreter::OperandType::kReg8: 320 case interpreter::OperandType::kReg8:
321 EXPECT_THAT(m.BytecodeOperandReg8(i), 321 EXPECT_THAT(m.BytecodeOperandReg(i),
322 m.IsBytecodeOperandSignExtended(offset)); 322 m.IsBytecodeOperandSignExtended(offset));
323 break; 323 break;
324 case interpreter::OperandType::kIdx16: 324 case interpreter::OperandType::kIdx16:
325 EXPECT_THAT(m.BytecodeOperandIdx16(i), 325 EXPECT_THAT(m.BytecodeOperandIdx(i),
326 m.IsBytecodeOperandShort(offset)); 326 m.IsBytecodeOperandShort(offset));
327 break; 327 break;
328 case interpreter::OperandType::kNone: 328 case interpreter::OperandType::kNone:
329 UNREACHABLE(); 329 UNREACHABLE();
330 break; 330 break;
331 } 331 }
332 } 332 }
333 } 333 }
334 } 334 }
335 335
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 feedback_vector, 626 feedback_vector,
627 m.IsLoad(kMachAnyTagged, load_shared_function_info_matcher, 627 m.IsLoad(kMachAnyTagged, load_shared_function_info_matcher,
628 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - 628 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset -
629 kHeapObjectTag))); 629 kHeapObjectTag)));
630 } 630 }
631 } 631 }
632 632
633 } // namespace compiler 633 } // namespace compiler
634 } // namespace internal 634 } // namespace internal
635 } // namespace v8 635 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | test/unittests/interpreter/bytecode-array-builder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698