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

Unified Diff: test/cctest/types-fuzz.h

Issue 904863002: [turbofan] Separate representation type operations from the semantic types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix intersection to be pointwise Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« test/cctest/test-types.cc ('K') | « test/cctest/test-types.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/types-fuzz.h
diff --git a/test/cctest/types-fuzz.h b/test/cctest/types-fuzz.h
index 425011d4aec94a81cc6d4684de6baeb365c70ca4..1d69c2d75d11e1a5b38f85f085f0149fa7ba1048 100644
--- a/test/cctest/types-fuzz.h
+++ b/test/cctest/types-fuzz.h
@@ -45,6 +45,12 @@ class Types {
PROPER_BITSET_TYPE_LIST(DECLARE_TYPE)
#undef DECLARE_TYPE
+#define DECLARE_TYPE(name, value) \
+ Mask##name##ForTesting = Type::Mask##name##ForTesting(region); \
+ types.push_back(Mask##name##ForTesting);
+ MASK_BITSET_TYPE_LIST(DECLARE_TYPE)
+#undef DECLARE_TYPE
+
SignedSmall = Type::SignedSmall(region);
UnsignedSmall = Type::UnsignedSmall(region);
@@ -132,6 +138,10 @@ class Types {
#define DECLARE_TYPE(name, value) TypeHandle name;
PROPER_BITSET_TYPE_LIST(DECLARE_TYPE)
#undef DECLARE_TYPE
+
+#define DECLARE_TYPE(name, value) TypeHandle Mask##name##ForTesting;
+ MASK_BITSET_TYPE_LIST(DECLARE_TYPE)
+#undef DECLARE_TYPE
TypeHandle SignedSmall;
TypeHandle UnsignedSmall;
@@ -212,10 +222,19 @@ class Types {
TypeHandle Union(TypeHandle t1, TypeHandle t2) {
return Type::Union(t1, t2, region_);
}
+
TypeHandle Intersect(TypeHandle t1, TypeHandle t2) {
return Type::Intersect(t1, t2, region_);
}
+ TypeHandle ProjectRepresentation(TypeHandle t) {
rossberg 2015/02/11 12:34:11 The Type class should probably just have two metho
Jarin 2015/02/11 16:10:49 Done.
+ return Intersect(t, MaskRepresentationForTesting);
+ }
+
+ TypeHandle ProjectSemantic(TypeHandle t) {
+ return Intersect(t, MaskSemanticForTesting);
+ }
+
template<class Type2, class TypeHandle2>
TypeHandle Convert(TypeHandle2 t) {
return Type::template Convert<Type2>(t, region_);
« test/cctest/test-types.cc ('K') | « test/cctest/test-types.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698