OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "src/compiler/types.h" | 7 #include "src/compiler/types.h" |
8 #include "src/crankshaft/hydrogen-types.h" | 8 #include "src/crankshaft/hydrogen-types.h" |
9 #include "src/factory.h" | 9 #include "src/factory.h" |
10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 typedef Types::ValueVector::iterator ValueIterator; | 38 typedef Types::ValueVector::iterator ValueIterator; |
39 | 39 |
40 Isolate* isolate; | 40 Isolate* isolate; |
41 HandleScope scope; | 41 HandleScope scope; |
42 Zone zone; | 42 Zone zone; |
43 Types T; | 43 Types T; |
44 | 44 |
45 Tests() | 45 Tests() |
46 : isolate(CcTest::InitIsolateOnce()), | 46 : isolate(CcTest::InitIsolateOnce()), |
47 scope(isolate), | 47 scope(isolate), |
48 zone(isolate->allocator()), | 48 zone(isolate->allocator(), ZONE_NAME), |
49 T(&zone, isolate, isolate->random_number_generator()) {} | 49 T(&zone, isolate, isolate->random_number_generator()) {} |
50 | 50 |
51 bool IsBitset(Type* type) { return type->IsBitsetForTesting(); } | 51 bool IsBitset(Type* type) { return type->IsBitsetForTesting(); } |
52 bool IsUnion(Type* type) { return type->IsUnionForTesting(); } | 52 bool IsUnion(Type* type) { return type->IsUnionForTesting(); } |
53 BitsetType::bitset AsBitset(Type* type) { return type->AsBitsetForTesting(); } | 53 BitsetType::bitset AsBitset(Type* type) { return type->AsBitsetForTesting(); } |
54 UnionType* AsUnion(Type* type) { return type->AsUnionForTesting(); } | 54 UnionType* AsUnion(Type* type) { return type->AsUnionForTesting(); } |
55 | 55 |
56 bool Equal(Type* type1, Type* type2) { | 56 bool Equal(Type* type1, Type* type2) { |
57 return type1->Equals(type2) && | 57 return type1->Equals(type2) && |
58 this->IsBitset(type1) == this->IsBitset(type2) && | 58 this->IsBitset(type1) == this->IsBitset(type2) && |
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 | 1106 |
1107 TEST(Union3) { Tests().Union3(); } | 1107 TEST(Union3) { Tests().Union3(); } |
1108 | 1108 |
1109 TEST(Union4) { Tests().Union4(); } | 1109 TEST(Union4) { Tests().Union4(); } |
1110 | 1110 |
1111 TEST(Intersect) { Tests().Intersect(); } | 1111 TEST(Intersect) { Tests().Intersect(); } |
1112 | 1112 |
1113 TEST(Distributivity) { Tests().Distributivity(); } | 1113 TEST(Distributivity) { Tests().Distributivity(); } |
1114 | 1114 |
1115 TEST(GetRange) { Tests().GetRange(); } | 1115 TEST(GetRange) { Tests().GetRange(); } |
OLD | NEW |