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

Side by Side Diff: test/cctest/compiler/instruction-selector-tester.h

Issue 470593002: Unify MachineType and RepType. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_ 5 #ifndef V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_
6 #define V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_ 6 #define V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 class InstructionSelectorTester : public HandleAndZoneScope, 24 class InstructionSelectorTester : public HandleAndZoneScope,
25 public RawMachineAssembler { 25 public RawMachineAssembler {
26 public: 26 public:
27 enum Mode { kTargetMode, kInternalMode }; 27 enum Mode { kTargetMode, kInternalMode };
28 28
29 static const int kParameterCount = 3; 29 static const int kParameterCount = 3;
30 static MachineType* BuildParameterArray(Zone* zone) { 30 static MachineType* BuildParameterArray(Zone* zone) {
31 MachineType* array = zone->NewArray<MachineType>(kParameterCount); 31 MachineType* array = zone->NewArray<MachineType>(kParameterCount);
32 for (int i = 0; i < kParameterCount; ++i) { 32 for (int i = 0; i < kParameterCount; ++i) {
33 array[i] = kMachineWord32; 33 array[i] = kMachInt32;
34 } 34 }
35 return array; 35 return array;
36 } 36 }
37 37
38 InstructionSelectorTester() 38 InstructionSelectorTester()
39 : RawMachineAssembler( 39 : RawMachineAssembler(
40 new (main_zone()) Graph(main_zone()), new (main_zone()) 40 new (main_zone()) Graph(main_zone()),
41 MachineCallDescriptorBuilder(kMachineWord32, kParameterCount, 41 new (main_zone()) MachineCallDescriptorBuilder(
42 BuildParameterArray(main_zone())), 42 kMachInt32, kParameterCount, BuildParameterArray(main_zone())),
43 MachineOperatorBuilder::pointer_rep()) {} 43 MachineOperatorBuilder::pointer_rep()) {}
44 44
45 void SelectInstructions(CpuFeature feature) { 45 void SelectInstructions(CpuFeature feature) {
46 SelectInstructions(InstructionSelector::Features(feature)); 46 SelectInstructions(InstructionSelector::Features(feature));
47 } 47 }
48 48
49 void SelectInstructions(CpuFeature feature1, CpuFeature feature2) { 49 void SelectInstructions(CpuFeature feature1, CpuFeature feature2) {
50 SelectInstructions(InstructionSelector::Features(feature1, feature2)); 50 SelectInstructions(InstructionSelector::Features(feature1, feature2));
51 } 51 }
52 52
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 CHECK_EQ(InstructionOperand::UNALLOCATED, val->kind()); 118 CHECK_EQ(InstructionOperand::UNALLOCATED, val->kind());
119 CHECK_EQ(UnallocatedOperand::cast(exp)->virtual_register(), 119 CHECK_EQ(UnallocatedOperand::cast(exp)->virtual_register(),
120 UnallocatedOperand::cast(val)->virtual_register()); 120 UnallocatedOperand::cast(val)->virtual_register());
121 } 121 }
122 122
123 } // namespace compiler 123 } // namespace compiler
124 } // namespace internal 124 } // namespace internal
125 } // namespace v8 125 } // namespace v8
126 126
127 #endif // V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_ 127 #endif // V8_CCTEST_COMPILER_INSTRUCTION_SELECTOR_TEST_H_
OLDNEW
« no previous file with comments | « test/cctest/compiler/graph-builder-tester.h ('k') | test/cctest/compiler/test-branch-combine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698