Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: test/cctest/test-types.cc

Issue 571913002: moar printf (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/hydrogen-types.h" 7 #include "src/hydrogen-types.h"
8 #include "src/isolate-inl.h" 8 #include "src/isolate-inl.h"
9 #include "src/types.h" 9 #include "src/types.h"
10 #include "test/cctest/cctest.h" 10 #include "test/cctest/cctest.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 (Rep::AsBitset(type1) & Rep::AsBitset(type2) & Rep::AsBitset(mask))); 402 (Rep::AsBitset(type1) & Rep::AsBitset(type2) & Rep::AsBitset(mask)));
403 } 403 }
404 } 404 }
405 405
406 void Bitset() { 406 void Bitset() {
407 // None and Any are bitsets. 407 // None and Any are bitsets.
408 CHECK(this->IsBitset(T.None)); 408 CHECK(this->IsBitset(T.None));
409 CHECK(this->IsBitset(T.Any)); 409 CHECK(this->IsBitset(T.Any));
410 410
411 CHECK(bitset(0) == this->AsBitset(T.None)); 411 CHECK(bitset(0) == this->AsBitset(T.None));
412 printf("[BitSet] %p == %p\n", 412 printf("[BitSet] %p (%p) == %p (%p)\n",
413 reinterpret_cast<void*>(bitset(0xfffffffeu)), 413 reinterpret_cast<void*>(bitset(0xfffffffeu)),
414 reinterpret_cast<void*>(this->AsBitset(T.Any))); 414 reinterpret_cast<void*>(HeapType::Any()),
415 reinterpret_cast<void*>(this->AsBitset(T.Any)),
416 reinterpret_cast<void*>(*T.Any));
415 CHECK(bitset(0xfffffffeu) == this->AsBitset(T.Any)); 417 CHECK(bitset(0xfffffffeu) == this->AsBitset(T.Any));
416 418
417 // Union(T1, T2) is bitset for bitsets T1,T2 419 // Union(T1, T2) is bitset for bitsets T1,T2
418 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) { 420 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) {
419 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) { 421 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) {
420 TypeHandle type1 = *it1; 422 TypeHandle type1 = *it1;
421 TypeHandle type2 = *it2; 423 TypeHandle type2 = *it2;
422 TypeHandle union12 = T.Union(type1, type2); 424 TypeHandle union12 = T.Union(type1, type2);
423 CHECK(!(this->IsBitset(type1) && this->IsBitset(type2)) || 425 CHECK(!(this->IsBitset(type1) && this->IsBitset(type2)) ||
424 this->IsBitset(union12)); 426 this->IsBitset(union12));
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 } 1821 }
1820 } 1822 }
1821 }; 1823 };
1822 1824
1823 typedef Tests<Type, Type*, Zone, ZoneRep> ZoneTests; 1825 typedef Tests<Type, Type*, Zone, ZoneRep> ZoneTests;
1824 typedef Tests<HeapType, Handle<HeapType>, Isolate, HeapRep> HeapTests; 1826 typedef Tests<HeapType, Handle<HeapType>, Isolate, HeapRep> HeapTests;
1825 1827
1826 1828
1827 TEST(BitsetType) { 1829 TEST(BitsetType) {
1828 CcTest::InitializeVM(); 1830 CcTest::InitializeVM();
1829 ZoneTests().Bitset(); 1831 // ZoneTests().Bitset();
1830 HeapTests().Bitset(); 1832 HeapTests().Bitset();
1831 } 1833 }
1832 1834
1833 1835
1834 TEST(ClassType) { 1836 TEST(ClassType) {
1835 CcTest::InitializeVM(); 1837 CcTest::InitializeVM();
1836 ZoneTests().Class(); 1838 ZoneTests().Class();
1837 HeapTests().Class(); 1839 HeapTests().Class();
1838 } 1840 }
1839 1841
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 ZoneTests().Convert<HeapType, Handle<HeapType>, Isolate, HeapRep>(); 1973 ZoneTests().Convert<HeapType, Handle<HeapType>, Isolate, HeapRep>();
1972 HeapTests().Convert<Type, Type*, Zone, ZoneRep>(); 1974 HeapTests().Convert<Type, Type*, Zone, ZoneRep>();
1973 } 1975 }
1974 1976
1975 1977
1976 TEST(HTypeFromType) { 1978 TEST(HTypeFromType) {
1977 CcTest::InitializeVM(); 1979 CcTest::InitializeVM();
1978 ZoneTests().HTypeFromType(); 1980 ZoneTests().HTypeFromType();
1979 HeapTests().HTypeFromType(); 1981 HeapTests().HTypeFromType();
1980 } 1982 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698