OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
11 // with the distribution. | 11 // with the distribution. |
12 // * Neither the name of Google Inc. nor the names of its | 12 // * Neither the name of Google Inc. nor the names of its |
13 // contributors may be used to endorse or promote products derived | 13 // contributors may be used to endorse or promote products derived |
14 // from this software without specific prior written permission. | 14 // from this software without specific prior written permission. |
15 // | 15 // |
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
| 28 #include <list> |
| 29 |
28 #include "cctest.h" | 30 #include "cctest.h" |
29 #include "types.h" | 31 #include "types.h" |
30 | 32 |
31 using namespace v8::internal; | 33 using namespace v8::internal; |
32 | 34 |
33 template<class Type, class TypeHandle, class Region> | 35 template<class Type, class TypeHandle, class Region> |
34 class Types { | 36 class Types { |
35 public: | 37 public: |
36 Types(Region* region, Isolate* isolate) : | 38 Types(Region* region, Isolate* isolate) : |
37 Representation(Type::Representation(region)), | 39 Representation(Type::Representation(region)), |
(...skipping 26 matching lines...) Expand all Loading... |
64 object2 = isolate->factory()->NewJSObjectFromMap(object_map); | 66 object2 = isolate->factory()->NewJSObjectFromMap(object_map); |
65 array = isolate->factory()->NewJSArray(20); | 67 array = isolate->factory()->NewJSArray(20); |
66 ObjectClass = Type::Class(object_map, region); | 68 ObjectClass = Type::Class(object_map, region); |
67 ArrayClass = Type::Class(array_map, region); | 69 ArrayClass = Type::Class(array_map, region); |
68 SmiConstant = Type::Constant(smi, region); | 70 SmiConstant = Type::Constant(smi, region); |
69 Signed32Constant = Type::Constant(signed32, region); | 71 Signed32Constant = Type::Constant(signed32, region); |
70 ObjectConstant1 = Type::Constant(object1, region); | 72 ObjectConstant1 = Type::Constant(object1, region); |
71 ObjectConstant2 = Type::Constant(object2, region); | 73 ObjectConstant2 = Type::Constant(object2, region); |
72 ArrayConstant1 = Type::Constant(array, region); | 74 ArrayConstant1 = Type::Constant(array, region); |
73 ArrayConstant2 = Type::Constant(array, region); | 75 ArrayConstant2 = Type::Constant(array, region); |
| 76 |
| 77 types.push_back(None); |
| 78 types.push_back(Any); |
| 79 types.push_back(Boolean); |
| 80 types.push_back(Null); |
| 81 types.push_back(Undefined); |
| 82 types.push_back(Number); |
| 83 types.push_back(SignedSmall); |
| 84 types.push_back(Signed32); |
| 85 types.push_back(Float); |
| 86 types.push_back(Name); |
| 87 types.push_back(UniqueName); |
| 88 types.push_back(String); |
| 89 types.push_back(InternalizedString); |
| 90 types.push_back(Symbol); |
| 91 types.push_back(Receiver); |
| 92 types.push_back(Object); |
| 93 types.push_back(Array); |
| 94 types.push_back(Function); |
| 95 types.push_back(Proxy); |
| 96 types.push_back(ObjectClass); |
| 97 types.push_back(ArrayClass); |
| 98 types.push_back(SmiConstant); |
| 99 types.push_back(Signed32Constant); |
| 100 types.push_back(ObjectConstant1); |
| 101 types.push_back(ObjectConstant2); |
| 102 types.push_back(ArrayConstant1); |
| 103 types.push_back(ArrayConstant2); |
| 104 for (int i = 0; i < 300; ++i) { |
| 105 types.push_back(Fuzz()); |
| 106 } |
| 107 |
| 108 objects.push_back(smi); |
| 109 objects.push_back(signed32); |
| 110 objects.push_back(object1); |
| 111 objects.push_back(object2); |
| 112 objects.push_back(array); |
74 } | 113 } |
75 | 114 |
76 TypeHandle Representation; | 115 TypeHandle Representation; |
77 TypeHandle Semantic; | 116 TypeHandle Semantic; |
78 TypeHandle None; | 117 TypeHandle None; |
79 TypeHandle Any; | 118 TypeHandle Any; |
80 TypeHandle Boolean; | 119 TypeHandle Boolean; |
81 TypeHandle Null; | 120 TypeHandle Null; |
82 TypeHandle Undefined; | 121 TypeHandle Undefined; |
83 TypeHandle Number; | 122 TypeHandle Number; |
(...skipping 23 matching lines...) Expand all Loading... |
107 | 146 |
108 Handle<i::Map> object_map; | 147 Handle<i::Map> object_map; |
109 Handle<i::Map> array_map; | 148 Handle<i::Map> array_map; |
110 | 149 |
111 Handle<i::Smi> smi; | 150 Handle<i::Smi> smi; |
112 Handle<i::HeapNumber> signed32; | 151 Handle<i::HeapNumber> signed32; |
113 Handle<i::JSObject> object1; | 152 Handle<i::JSObject> object1; |
114 Handle<i::JSObject> object2; | 153 Handle<i::JSObject> object2; |
115 Handle<i::JSArray> array; | 154 Handle<i::JSArray> array; |
116 | 155 |
| 156 typedef std::list<TypeHandle> TypeList; |
| 157 TypeList types; |
| 158 |
| 159 typedef std::list<Handle<i::Object> > ObjectList; |
| 160 ObjectList objects; |
| 161 |
| 162 TypeHandle Of(Handle<i::Object> obj) { |
| 163 return Type::Of(obj, region_); |
| 164 } |
| 165 |
| 166 TypeHandle Constant(Handle<i::Object> obj) { |
| 167 return Type::Constant(obj, region_); |
| 168 } |
| 169 |
117 TypeHandle Union(TypeHandle t1, TypeHandle t2) { | 170 TypeHandle Union(TypeHandle t1, TypeHandle t2) { |
118 return Type::Union(t1, t2, region_); | 171 return Type::Union(t1, t2, region_); |
119 } | 172 } |
120 TypeHandle Intersect(TypeHandle t1, TypeHandle t2) { | 173 TypeHandle Intersect(TypeHandle t1, TypeHandle t2) { |
121 return Type::Intersect(t1, t2, region_); | 174 return Type::Intersect(t1, t2, region_); |
122 } | 175 } |
123 | 176 |
124 template<class Type2, class TypeHandle2> | 177 template<class Type2, class TypeHandle2> |
125 TypeHandle Convert(TypeHandle2 t) { | 178 TypeHandle Convert(TypeHandle2 t) { |
126 return Type::template Convert<Type2>(t, region_); | 179 return Type::template Convert<Type2>(t, region_); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 static Isolate* ToRegion(Zone* zone, Isolate* isolate) { return isolate; } | 285 static Isolate* ToRegion(Zone* zone, Isolate* isolate) { return isolate; } |
233 }; | 286 }; |
234 | 287 |
235 | 288 |
236 template<class Type, class TypeHandle, class Region, class Rep> | 289 template<class Type, class TypeHandle, class Region, class Rep> |
237 struct Tests : Rep { | 290 struct Tests : Rep { |
238 Isolate* isolate; | 291 Isolate* isolate; |
239 HandleScope scope; | 292 HandleScope scope; |
240 Zone zone; | 293 Zone zone; |
241 Types<Type, TypeHandle, Region> T; | 294 Types<Type, TypeHandle, Region> T; |
| 295 typedef typename Types<Type, TypeHandle, Region>::TypeList::iterator |
| 296 TypeIterator; |
| 297 typedef typename Types<Type, TypeHandle, Region>::ObjectList::iterator |
| 298 ObjectIterator; |
242 | 299 |
243 Tests() : | 300 Tests() : |
244 isolate(CcTest::i_isolate()), | 301 isolate(CcTest::i_isolate()), |
245 scope(isolate), | 302 scope(isolate), |
246 zone(isolate), | 303 zone(isolate), |
247 T(Rep::ToRegion(&zone, isolate), isolate) { | 304 T(Rep::ToRegion(&zone, isolate), isolate) { |
248 } | 305 } |
249 | 306 |
250 void CheckEqual(TypeHandle type1, TypeHandle type2) { | 307 void CheckEqual(TypeHandle type1, TypeHandle type2) { |
251 CHECK_EQ(Rep::IsBitset(type1), Rep::IsBitset(type2)); | 308 CHECK_EQ(Rep::IsBitset(type1), Rep::IsBitset(type2)); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 396 |
340 CHECK(*T.smi == this->AsConstant(T.SmiConstant)); | 397 CHECK(*T.smi == this->AsConstant(T.SmiConstant)); |
341 CHECK(*T.object1 == this->AsConstant(T.ObjectConstant1)); | 398 CHECK(*T.object1 == this->AsConstant(T.ObjectConstant1)); |
342 CHECK(*T.object2 == this->AsConstant(T.ObjectConstant2)); | 399 CHECK(*T.object2 == this->AsConstant(T.ObjectConstant2)); |
343 CHECK(*T.object1 != this->AsConstant(T.ObjectConstant2)); | 400 CHECK(*T.object1 != this->AsConstant(T.ObjectConstant2)); |
344 CHECK(*T.array == this->AsConstant(T.ArrayConstant1)); | 401 CHECK(*T.array == this->AsConstant(T.ArrayConstant1)); |
345 CHECK(*T.array == this->AsConstant(T.ArrayConstant2)); | 402 CHECK(*T.array == this->AsConstant(T.ArrayConstant2)); |
346 } | 403 } |
347 | 404 |
348 void Is() { | 405 void Is() { |
| 406 // T->Is(None) implies T = None for all T |
| 407 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 408 TypeHandle type = *it; |
| 409 if (type->Is(T.None)) CheckEqual(type, T.None); |
| 410 } |
| 411 |
| 412 // None->Is(T) for all T |
| 413 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 414 TypeHandle type = *it; |
| 415 CHECK(T.None->Is(type)); |
| 416 } |
| 417 |
| 418 // Any->Is(T) implies T = Any for all T |
| 419 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 420 TypeHandle type = *it; |
| 421 if (T.Any->Is(type)) CheckEqual(type, T.Any); |
| 422 } |
| 423 |
| 424 // T->Is(Any) for all T |
| 425 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 426 TypeHandle type = *it; |
| 427 CHECK(type->Is(T.Any)); |
| 428 } |
| 429 |
349 // Reflexivity | 430 // Reflexivity |
350 CHECK(T.None->Is(T.None)); | 431 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
351 CHECK(T.Any->Is(T.Any)); | 432 TypeHandle type = *it; |
352 CHECK(T.Object->Is(T.Object)); | 433 CHECK(type->Is(type)); |
| 434 } |
353 | 435 |
354 CHECK(T.ObjectClass->Is(T.ObjectClass)); | 436 // Transitivity |
355 CHECK(T.ObjectConstant1->Is(T.ObjectConstant1)); | 437 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) { |
356 CHECK(T.ArrayConstant1->Is(T.ArrayConstant2)); | 438 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) { |
| 439 for (TypeIterator it3 = T.types.begin(); it3 != T.types.end(); ++it3) { |
| 440 TypeHandle type1 = *it1; |
| 441 TypeHandle type2 = *it2; |
| 442 TypeHandle type3 = *it3; |
| 443 CHECK(!type1->Is(type2) || |
| 444 !type2->Is(type3) || |
| 445 type1->Is(type3)); |
| 446 } |
| 447 } |
| 448 } |
357 | 449 |
358 // Symmetry and Transitivity | 450 // Symmetry and Transitivity |
359 CheckSub(T.None, T.Number); | 451 CheckSub(T.None, T.Number); |
360 CheckSub(T.None, T.Any); | 452 CheckSub(T.None, T.Any); |
361 | 453 |
362 CheckUnordered(T.Boolean, T.Null); | 454 CheckUnordered(T.Boolean, T.Null); |
363 CheckUnordered(T.Undefined, T.Null); | 455 CheckUnordered(T.Undefined, T.Null); |
364 CheckUnordered(T.Boolean, T.Undefined); | 456 CheckUnordered(T.Boolean, T.Undefined); |
365 | 457 |
366 CheckSub(T.Number, T.Any); | 458 CheckSub(T.Number, T.Any); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 CheckUnordered(T.ObjectConstant1, T.ObjectConstant2); | 505 CheckUnordered(T.ObjectConstant1, T.ObjectConstant2); |
414 CheckUnordered(T.ObjectConstant1, T.ArrayConstant1); | 506 CheckUnordered(T.ObjectConstant1, T.ArrayConstant1); |
415 | 507 |
416 CheckUnordered(T.ObjectConstant1, T.ObjectClass); | 508 CheckUnordered(T.ObjectConstant1, T.ObjectClass); |
417 CheckUnordered(T.ObjectConstant2, T.ObjectClass); | 509 CheckUnordered(T.ObjectConstant2, T.ObjectClass); |
418 CheckUnordered(T.ObjectConstant1, T.ArrayClass); | 510 CheckUnordered(T.ObjectConstant1, T.ArrayClass); |
419 CheckUnordered(T.ObjectConstant2, T.ArrayClass); | 511 CheckUnordered(T.ObjectConstant2, T.ArrayClass); |
420 CheckUnordered(T.ArrayConstant1, T.ObjectClass); | 512 CheckUnordered(T.ArrayConstant1, T.ObjectClass); |
421 } | 513 } |
422 | 514 |
| 515 void NowIs() { |
| 516 // T->NowIs(None) implies T = None for all T |
| 517 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 518 TypeHandle type = *it; |
| 519 if (type->NowIs(T.None)) CheckEqual(type, T.None); |
| 520 } |
| 521 |
| 522 // None->NowIs(T) for all T |
| 523 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 524 TypeHandle type = *it; |
| 525 CHECK(T.None->NowIs(type)); |
| 526 } |
| 527 |
| 528 // Any->NowIs(T) implies T = Any for all T |
| 529 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 530 TypeHandle type = *it; |
| 531 if (T.Any->NowIs(type)) CheckEqual(type, T.Any); |
| 532 } |
| 533 |
| 534 // T->NowIs(Any) for all T |
| 535 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 536 TypeHandle type = *it; |
| 537 CHECK(type->NowIs(T.Any)); |
| 538 } |
| 539 |
| 540 // Reflexivity |
| 541 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 542 TypeHandle type = *it; |
| 543 CHECK(type->NowIs(type)); |
| 544 } |
| 545 |
| 546 // Transitivity |
| 547 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) { |
| 548 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) { |
| 549 for (TypeIterator it3 = T.types.begin(); it3 != T.types.end(); ++it3) { |
| 550 TypeHandle type1 = *it1; |
| 551 TypeHandle type2 = *it2; |
| 552 TypeHandle type3 = *it3; |
| 553 CHECK(!type1->NowIs(type2) || |
| 554 !type2->NowIs(type3) || |
| 555 type1->NowIs(type3)); |
| 556 } |
| 557 } |
| 558 } |
| 559 |
| 560 // T1->Is(T2) implies T1->NowIs(T2) for all T1,T2 |
| 561 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) { |
| 562 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) { |
| 563 TypeHandle type1 = *it1; |
| 564 TypeHandle type2 = *it2; |
| 565 CHECK(!type1->Is(type2) || type1->NowIs(type2)); |
| 566 } |
| 567 } |
| 568 |
| 569 CHECK(T.ObjectConstant1->NowIs(T.ObjectClass)); |
| 570 CHECK(T.ObjectConstant2->NowIs(T.ObjectClass)); |
| 571 } |
| 572 |
| 573 void Contains() { |
| 574 // T->Contains(O) iff Constant(O)->Is(T) for all T,O |
| 575 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 576 for (ObjectIterator ot = T.objects.begin(); ot != T.objects.end(); ++ot) { |
| 577 TypeHandle type = *it; |
| 578 Handle<i::Object> obj = *ot; |
| 579 CHECK(type->Contains(obj) == T.Constant(obj)->Is(type)); |
| 580 } |
| 581 } |
| 582 |
| 583 // Of(O)->Is(T) implies T->Contains(O) for all T,O |
| 584 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 585 for (ObjectIterator ot = T.objects.begin(); ot != T.objects.end(); ++ot) { |
| 586 TypeHandle type = *it; |
| 587 Handle<i::Object> obj = *ot; |
| 588 CHECK(!T.Of(obj)->Is(type) || type->Contains(obj)); |
| 589 } |
| 590 } |
| 591 } |
| 592 |
423 void Maybe() { | 593 void Maybe() { |
| 594 // T->Maybe(T) for all inhabited T |
| 595 for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) { |
| 596 TypeHandle type = *it; |
| 597 CHECK(type->Maybe(type) || !type->IsInhabited()); |
| 598 } |
| 599 |
| 600 // Commutativity |
| 601 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) { |
| 602 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) { |
| 603 TypeHandle type1 = *it1; |
| 604 TypeHandle type2 = *it2; |
| 605 CHECK(type1->Maybe(type2) == type2->Maybe(type1)); |
| 606 } |
| 607 } |
| 608 |
| 609 // T1->Is(T2) implies T1->Maybe(T2) or T1 is uninhabited for all T1,T2 |
| 610 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) { |
| 611 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) { |
| 612 TypeHandle type1 = *it1; |
| 613 TypeHandle type2 = *it2; |
| 614 CHECK(!type1->Is(type2) || |
| 615 type1->Maybe(type2) || |
| 616 !type1->IsInhabited()); |
| 617 } |
| 618 } |
| 619 |
424 CheckOverlap(T.Any, T.Any, T.Semantic); | 620 CheckOverlap(T.Any, T.Any, T.Semantic); |
425 CheckOverlap(T.Object, T.Object, T.Semantic); | 621 CheckOverlap(T.Object, T.Object, T.Semantic); |
426 | 622 |
427 CheckDisjoint(T.Boolean, T.Null, T.Semantic); | 623 CheckDisjoint(T.Boolean, T.Null, T.Semantic); |
428 CheckDisjoint(T.Undefined, T.Null, T.Semantic); | 624 CheckDisjoint(T.Undefined, T.Null, T.Semantic); |
429 CheckDisjoint(T.Boolean, T.Undefined, T.Semantic); | 625 CheckDisjoint(T.Boolean, T.Undefined, T.Semantic); |
430 | 626 |
431 CheckOverlap(T.Number, T.Any, T.Semantic); | 627 CheckOverlap(T.Number, T.Any, T.Semantic); |
432 CheckOverlap(T.SignedSmall, T.Number, T.Semantic); | 628 CheckOverlap(T.SignedSmall, T.Number, T.Semantic); |
433 CheckOverlap(T.Float, T.Number, T.Semantic); | 629 CheckOverlap(T.Float, T.Number, T.Semantic); |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 } | 1057 } |
862 | 1058 |
863 | 1059 |
864 TEST(Is) { | 1060 TEST(Is) { |
865 CcTest::InitializeVM(); | 1061 CcTest::InitializeVM(); |
866 ZoneTests().Is(); | 1062 ZoneTests().Is(); |
867 HeapTests().Is(); | 1063 HeapTests().Is(); |
868 } | 1064 } |
869 | 1065 |
870 | 1066 |
| 1067 TEST(NowIs) { |
| 1068 CcTest::InitializeVM(); |
| 1069 ZoneTests().NowIs(); |
| 1070 HeapTests().NowIs(); |
| 1071 } |
| 1072 |
| 1073 |
| 1074 TEST(Contains) { |
| 1075 CcTest::InitializeVM(); |
| 1076 ZoneTests().Contains(); |
| 1077 HeapTests().Contains(); |
| 1078 } |
| 1079 |
| 1080 |
871 TEST(Maybe) { | 1081 TEST(Maybe) { |
872 CcTest::InitializeVM(); | 1082 CcTest::InitializeVM(); |
873 ZoneTests().Maybe(); | 1083 ZoneTests().Maybe(); |
874 HeapTests().Maybe(); | 1084 HeapTests().Maybe(); |
875 } | 1085 } |
876 | 1086 |
877 | 1087 |
878 TEST(Union) { | 1088 TEST(Union) { |
879 CcTest::InitializeVM(); | 1089 CcTest::InitializeVM(); |
880 ZoneTests().Union(); | 1090 ZoneTests().Union(); |
881 HeapTests().Union(); | 1091 HeapTests().Union(); |
882 } | 1092 } |
883 | 1093 |
884 | 1094 |
885 TEST(Intersect) { | 1095 TEST(Intersect) { |
886 CcTest::InitializeVM(); | 1096 CcTest::InitializeVM(); |
887 ZoneTests().Intersect(); | 1097 ZoneTests().Intersect(); |
888 HeapTests().Intersect(); | 1098 HeapTests().Intersect(); |
889 } | 1099 } |
890 | 1100 |
891 | 1101 |
892 TEST(Convert) { | 1102 TEST(Convert) { |
893 CcTest::InitializeVM(); | 1103 CcTest::InitializeVM(); |
894 ZoneTests().Convert<HeapType, Handle<HeapType>, Isolate, HeapRep>(); | 1104 ZoneTests().Convert<HeapType, Handle<HeapType>, Isolate, HeapRep>(); |
895 HeapTests().Convert<Type, Type*, Zone, ZoneRep>(); | 1105 HeapTests().Convert<Type, Type*, Zone, ZoneRep>(); |
896 } | 1106 } |
OLD | NEW |