| 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/crankshaft/hydrogen-types.h" | 7 #include "src/crankshaft/hydrogen-types.h" |
| 8 #include "src/types.h" | 8 #include "src/types.h" |
| 9 #include "test/cctest/cctest.h" | 9 #include "test/cctest/cctest.h" |
| 10 #include "test/cctest/types-fuzz.h" | 10 #include "test/cctest/types-fuzz.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 typedef Types::ValueVector::iterator ValueIterator; | 33 typedef Types::ValueVector::iterator ValueIterator; |
| 34 | 34 |
| 35 Isolate* isolate; | 35 Isolate* isolate; |
| 36 HandleScope scope; | 36 HandleScope scope; |
| 37 Zone zone; | 37 Zone zone; |
| 38 Types T; | 38 Types T; |
| 39 | 39 |
| 40 Tests() | 40 Tests() |
| 41 : isolate(CcTest::InitIsolateOnce()), | 41 : isolate(CcTest::InitIsolateOnce()), |
| 42 scope(isolate), | 42 scope(isolate), |
| 43 zone(), | 43 zone(isolate->allocator()), |
| 44 T(&zone, isolate, isolate->random_number_generator()) {} | 44 T(&zone, isolate, isolate->random_number_generator()) {} |
| 45 | 45 |
| 46 bool IsBitset(Type* type) { return type->IsBitsetForTesting(); } | 46 bool IsBitset(Type* type) { return type->IsBitsetForTesting(); } |
| 47 bool IsUnion(Type* type) { return type->IsUnionForTesting(); } | 47 bool IsUnion(Type* type) { return type->IsUnionForTesting(); } |
| 48 BitsetType::bitset AsBitset(Type* type) { return type->AsBitsetForTesting(); } | 48 BitsetType::bitset AsBitset(Type* type) { return type->AsBitsetForTesting(); } |
| 49 UnionType* AsUnion(Type* type) { return type->AsUnionForTesting(); } | 49 UnionType* AsUnion(Type* type) { return type->AsUnionForTesting(); } |
| 50 | 50 |
| 51 bool Equal(Type* type1, Type* type2) { | 51 bool Equal(Type* type1, Type* type2) { |
| 52 return type1->Equals(type2) && | 52 return type1->Equals(type2) && |
| 53 this->IsBitset(type1) == this->IsBitset(type2) && | 53 this->IsBitset(type1) == this->IsBitset(type2) && |
| (...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 | 1916 |
| 1917 TEST(Union4_zone) { Tests().Union4(); } | 1917 TEST(Union4_zone) { Tests().Union4(); } |
| 1918 | 1918 |
| 1919 TEST(Intersect_zone) { Tests().Intersect(); } | 1919 TEST(Intersect_zone) { Tests().Intersect(); } |
| 1920 | 1920 |
| 1921 TEST(Distributivity_zone) { Tests().Distributivity(); } | 1921 TEST(Distributivity_zone) { Tests().Distributivity(); } |
| 1922 | 1922 |
| 1923 TEST(GetRange_zone) { Tests().GetRange(); } | 1923 TEST(GetRange_zone) { Tests().GetRange(); } |
| 1924 | 1924 |
| 1925 TEST(HTypeFromType_zone) { Tests().HTypeFromType(); } | 1925 TEST(HTypeFromType_zone) { Tests().HTypeFromType(); } |
| OLD | NEW |