| 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/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/compiler/instruction-selector.h" | 10 #include "src/compiler/instruction-selector.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 MachineType p2 = kMachNone, | 27 MachineType p2 = kMachNone, |
| 28 MachineType p3 = kMachNone, | 28 MachineType p3 = kMachNone, |
| 29 MachineType p4 = kMachNone) | 29 MachineType p4 = kMachNone) |
| 30 : HandleAndZoneScope(), | 30 : HandleAndZoneScope(), |
| 31 CallHelper<ReturnType>( | 31 CallHelper<ReturnType>( |
| 32 main_isolate(), | 32 main_isolate(), |
| 33 CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, p1, | 33 CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, p1, |
| 34 p2, p3, p4)), | 34 p2, p3, p4)), |
| 35 RawMachineAssembler( | 35 RawMachineAssembler( |
| 36 main_isolate(), new (main_zone()) Graph(main_zone()), | 36 main_isolate(), new (main_zone()) Graph(main_zone()), |
| 37 CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, p1, | 37 Linkage::GetSimplifiedCDescriptor( |
| 38 p2, p3, p4), | 38 main_zone(), |
| 39 CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, |
| 40 p1, p2, p3, p4)), |
| 39 kMachPtr, InstructionSelector::SupportedMachineOperatorFlags()) {} | 41 kMachPtr, InstructionSelector::SupportedMachineOperatorFlags()) {} |
| 40 | 42 |
| 41 void CheckNumber(double expected, Object* number) { | 43 void CheckNumber(double expected, Object* number) { |
| 42 CHECK(this->isolate()->factory()->NewNumber(expected)->SameValue(number)); | 44 CHECK(this->isolate()->factory()->NewNumber(expected)->SameValue(number)); |
| 43 } | 45 } |
| 44 | 46 |
| 45 void CheckString(const char* expected, Object* string) { | 47 void CheckString(const char* expected, Object* string) { |
| 46 CHECK( | 48 CHECK( |
| 47 this->isolate()->factory()->InternalizeUtf8String(expected)->SameValue( | 49 this->isolate()->factory()->InternalizeUtf8String(expected)->SameValue( |
| 48 string)); | 50 string)); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 } else { | 314 } else { |
| 313 CHECK_EQ(x, y); | 315 CHECK_EQ(x, y); |
| 314 } | 316 } |
| 315 } | 317 } |
| 316 | 318 |
| 317 } // namespace compiler | 319 } // namespace compiler |
| 318 } // namespace internal | 320 } // namespace internal |
| 319 } // namespace v8 | 321 } // namespace v8 |
| 320 | 322 |
| 321 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 323 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
| OLD | NEW |