| Index: test/cctest/test-types.cc
|
| diff --git a/test/cctest/test-types.cc b/test/cctest/test-types.cc
|
| index c30be77420f2103f20ee9b8d68127838b4b12d96..e564c6c0808ab20f29d0fde37b12380d55343dcf 100644
|
| --- a/test/cctest/test-types.cc
|
| +++ b/test/cctest/test-types.cc
|
| @@ -590,6 +590,8 @@ struct Tests : Rep {
|
| }
|
|
|
| void MinMax() {
|
| + Factory* fac = isolate->factory();
|
| +
|
| // If b is regular numeric bitset, then Range(b->Min(), b->Max())->Is(b).
|
| // TODO(neis): Need to ignore representation for this to be true.
|
| /*
|
| @@ -608,8 +610,7 @@ struct Tests : Rep {
|
| // If b is regular numeric bitset, then b->Min() and b->Max() are integers.
|
| for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) {
|
| TypeHandle type = *it;
|
| - if (this->IsBitset(type) && type->Is(T.Number) &&
|
| - !type->Is(T.None) && !type->Is(T.NaN)) {
|
| + if (this->IsBitset(type) && type->Is(T.Number) && !type->Is(T.NaN)) {
|
| CHECK(IsInteger(type->Min()) && IsInteger(type->Max()));
|
| }
|
| }
|
| @@ -637,6 +638,15 @@ struct Tests : Rep {
|
| CHECK(lub->Min() <= type->Min() && type->Max() <= lub->Max());
|
| }
|
| }
|
| +
|
| + // Rangification: If T->Is(Range(-inf,+inf)) and !T->Is(None), then
|
| + // T->Is(Range(T->Min(), T->Max())).
|
| + for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) {
|
| + TypeHandle type = *it;
|
| + CHECK(!(type->Is(T.Integer) && !type->Is(T.None)) ||
|
| + type->Is(T.Range(fac->NewNumber(type->Min()),
|
| + fac->NewNumber(type->Max()))));
|
| + }
|
| }
|
|
|
| void BitsetGlb() {
|
|
|