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 #include <limits> | 5 #include <limits> |
6 | 6 |
7 #include "test/cctest/cctest.h" | 7 #include "test/cctest/cctest.h" |
8 #include "test/cctest/compiler/codegen-tester.h" | 8 #include "test/cctest/compiler/codegen-tester.h" |
9 #include "test/cctest/compiler/graph-builder-tester.h" | 9 #include "test/cctest/compiler/graph-builder-tester.h" |
10 #include "test/cctest/compiler/value-helper.h" | 10 #include "test/cctest/compiler/value-helper.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 void CheckFloat64Constant(Node* n, double expected) { | 55 void CheckFloat64Constant(Node* n, double expected) { |
56 Float64Matcher m(n); | 56 Float64Matcher m(n); |
57 CHECK(m.HasValue()); | 57 CHECK(m.HasValue()); |
58 CheckDoubleEq(expected, m.Value()); | 58 CheckDoubleEq(expected, m.Value()); |
59 } | 59 } |
60 | 60 |
61 void CheckFloat32Constant(Node* n, float expected) { | 61 void CheckFloat32Constant(Node* n, float expected) { |
62 CHECK_EQ(IrOpcode::kFloat32Constant, n->opcode()); | 62 CHECK_EQ(IrOpcode::kFloat32Constant, n->opcode()); |
63 float fval = OpParameter<float>(n->op()); | 63 float fval = OpParameter<float>(n->op()); |
64 CHECK_EQ(expected, fval); | 64 CheckDoubleEq(expected, fval); |
65 } | 65 } |
66 | 66 |
67 void CheckHeapConstant(Node* n, HeapObject* expected) { | 67 void CheckHeapConstant(Node* n, HeapObject* expected) { |
68 HeapObjectMatcher m(n); | 68 HeapObjectMatcher m(n); |
69 CHECK(m.HasValue()); | 69 CHECK(m.HasValue()); |
70 CHECK_EQ(expected, *m.Value()); | 70 CHECK_EQ(expected, *m.Value()); |
71 } | 71 } |
72 | 72 |
73 void CheckNumberConstant(Node* n, double expected) { | 73 void CheckNumberConstant(Node* n, double expected) { |
74 NumberMatcher m(n); | 74 NumberMatcher m(n); |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 // Word64 / Word32 shouldn't be implicitly converted. | 577 // Word64 / Word32 shouldn't be implicitly converted. |
578 r.CheckTypeError(MachineType::RepWord64(), MachineRepresentation::kWord32); | 578 r.CheckTypeError(MachineType::RepWord64(), MachineRepresentation::kWord32); |
579 r.CheckTypeError(MachineType::RepWord32(), MachineRepresentation::kWord64); | 579 r.CheckTypeError(MachineType::RepWord32(), MachineRepresentation::kWord64); |
580 r.CheckTypeError(MachineType::Int32(), MachineRepresentation::kWord64); | 580 r.CheckTypeError(MachineType::Int32(), MachineRepresentation::kWord64); |
581 r.CheckTypeError(MachineType::Uint32(), MachineRepresentation::kWord64); | 581 r.CheckTypeError(MachineType::Uint32(), MachineRepresentation::kWord64); |
582 } | 582 } |
583 | 583 |
584 } // namespace compiler | 584 } // namespace compiler |
585 } // namespace internal | 585 } // namespace internal |
586 } // namespace v8 | 586 } // namespace v8 |
OLD | NEW |