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

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

Issue 794663002: Revert of Avoid number range holes in bitset types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « test/cctest/test-types.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | 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 4eac64c838b409ce0c96b1383d28dc8867c09a33..233249a4b924d223dc9f02f7a6fa868519dc457a 100644
--- a/test/cctest/types-fuzz.h
+++ b/test/cctest/types-fuzz.h
@@ -40,8 +40,13 @@
Types(Region* region, Isolate* isolate)
: region_(region), rng_(isolate->random_number_generator()) {
#define DECLARE_TYPE(name, value) \
- name = Type::name(region); \
- types.push_back(name);
+ name = Type::name(region); \
+ if (SmiValuesAre31Bits() || \
+ (!Type::name(region)->Equals(Type::OtherSigned32()) && \
+ !Type::name(region)->Equals(Type::OtherUnsigned31()))) { \
+ /* Hack: Avoid generating those empty bitset types. */ \
+ types.push_back(name); \
+ }
PROPER_BITSET_TYPE_LIST(DECLARE_TYPE)
#undef DECLARE_TYPE
@@ -128,7 +133,7 @@
Handle<i::Oddball> uninitialized;
#define DECLARE_TYPE(name, value) TypeHandle name;
- PROPER_BITSET_TYPE_LIST(DECLARE_TYPE)
+ BITSET_TYPE_LIST(DECLARE_TYPE)
#undef DECLARE_TYPE
TypeHandle ObjectClass;
@@ -233,6 +238,12 @@
int j = rng_->NextInt(n);
#define PICK_BITSET_TYPE(type, value) \
if (j-- == 0) { \
+ if (!SmiValuesAre31Bits() && \
+ (Type::type(region_)->Equals(Type::OtherSigned32()) || \
+ Type::type(region_)->Equals(Type::OtherUnsigned31()))) { \
+ /* Hack: Avoid generating those empty bitset types. */ \
+ continue; \
+ } \
TypeHandle tmp = Type::Intersect( \
result, Type::type(region_), region_); \
if (tmp->Is(Type::None()) && i != 0) { \
« no previous file with comments | « test/cctest/test-types.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698