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

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

Issue 306353002: Fix test (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 // 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
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 // T1->Maybe(T2) implies T1, T2 inhabited 1153 // T1->Maybe(T2) implies T1, T2 inhabited
1154 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) { 1154 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) {
1155 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) { 1155 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) {
1156 TypeHandle type1 = *it1; 1156 TypeHandle type1 = *it1;
1157 TypeHandle type2 = *it2; 1157 TypeHandle type2 = *it2;
1158 CHECK(!type1->Maybe(type2) || 1158 CHECK(!type1->Maybe(type2) ||
1159 (type1->IsInhabited() && type2->IsInhabited())); 1159 (type1->IsInhabited() && type2->IsInhabited()));
1160 } 1160 }
1161 } 1161 }
1162 1162
1163 // T1->Maybe(T2) iff Intersect(T1, T2) inhabited 1163 // T1->Maybe(T2) implies Intersect(T1, T2) inhabited
1164 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) { 1164 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) {
1165 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) { 1165 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) {
1166 TypeHandle type1 = *it1; 1166 TypeHandle type1 = *it1;
1167 TypeHandle type2 = *it2; 1167 TypeHandle type2 = *it2;
1168 TypeHandle intersect12 = T.Intersect(type1, type2); 1168 TypeHandle intersect12 = T.Intersect(type1, type2);
1169 CHECK(type1->Maybe(type2) == intersect12->IsInhabited()); 1169 CHECK(!type1->Maybe(type2) || intersect12->IsInhabited());
1170 } 1170 }
1171 } 1171 }
1172 1172
1173 // T1->Is(T2) and T1 inhabited implies T1->Maybe(T2) 1173 // T1->Is(T2) and T1 inhabited implies T1->Maybe(T2)
1174 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) { 1174 for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) {
1175 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) { 1175 for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) {
1176 TypeHandle type1 = *it1; 1176 TypeHandle type1 = *it1;
1177 TypeHandle type2 = *it2; 1177 TypeHandle type2 = *it2;
1178 CHECK(!(type1->Is(type2) && type1->IsInhabited()) || 1178 CHECK(!(type1->Is(type2) && type1->IsInhabited()) ||
1179 type1->Maybe(type2)); 1179 type1->Maybe(type2));
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 ZoneTests().Convert<HeapType, Handle<HeapType>, Isolate, HeapRep>(); 1933 ZoneTests().Convert<HeapType, Handle<HeapType>, Isolate, HeapRep>();
1934 HeapTests().Convert<Type, Type*, Zone, ZoneRep>(); 1934 HeapTests().Convert<Type, Type*, Zone, ZoneRep>();
1935 } 1935 }
1936 1936
1937 1937
1938 TEST(HTypeFromType) { 1938 TEST(HTypeFromType) {
1939 CcTest::InitializeVM(); 1939 CcTest::InitializeVM();
1940 ZoneTests().HTypeFromType(); 1940 ZoneTests().HTypeFromType();
1941 HeapTests().HTypeFromType(); 1941 HeapTests().HTypeFromType();
1942 } 1942 }
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