OLD | NEW |
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_CODEGEN_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
7 | 7 |
8 #include "src/compiler/instruction-selector.h" | 8 #include "src/compiler/instruction-selector.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/compiler/raw-machine-assembler.h" | 10 #include "src/compiler/raw-machine-assembler.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 : HandleAndZoneScope(), | 28 : HandleAndZoneScope(), |
29 CallHelper<ReturnType>( | 29 CallHelper<ReturnType>( |
30 main_isolate(), | 30 main_isolate(), |
31 CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, p1, | 31 CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, p1, |
32 p2, p3, p4)), | 32 p2, p3, p4)), |
33 RawMachineAssembler( | 33 RawMachineAssembler( |
34 main_isolate(), new (main_zone()) Graph(main_zone()), | 34 main_isolate(), new (main_zone()) Graph(main_zone()), |
35 Linkage::GetSimplifiedCDescriptor( | 35 Linkage::GetSimplifiedCDescriptor( |
36 main_zone(), | 36 main_zone(), |
37 CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, | 37 CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, |
38 p1, p2, p3, p4)), | 38 p1, p2, p3, p4), |
| 39 true), |
39 MachineType::PointerRepresentation(), | 40 MachineType::PointerRepresentation(), |
40 InstructionSelector::SupportedMachineOperatorFlags()) {} | 41 InstructionSelector::SupportedMachineOperatorFlags()) {} |
41 | 42 |
42 void CheckNumber(double expected, Object* number) { | 43 void CheckNumber(double expected, Object* number) { |
43 CHECK(this->isolate()->factory()->NewNumber(expected)->SameValue(number)); | 44 CHECK(this->isolate()->factory()->NewNumber(expected)->SameValue(number)); |
44 } | 45 } |
45 | 46 |
46 void CheckString(const char* expected, Object* string) { | 47 void CheckString(const char* expected, Object* string) { |
47 CHECK( | 48 CHECK( |
48 this->isolate()->factory()->InternalizeUtf8String(expected)->SameValue( | 49 this->isolate()->factory()->InternalizeUtf8String(expected)->SameValue( |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 } else { | 552 } else { |
552 CHECK_EQ(x, y); | 553 CHECK_EQ(x, y); |
553 } | 554 } |
554 } | 555 } |
555 | 556 |
556 } // namespace compiler | 557 } // namespace compiler |
557 } // namespace internal | 558 } // namespace internal |
558 } // namespace v8 | 559 } // namespace v8 |
559 | 560 |
560 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 561 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
OLD | NEW |