Commit ee9f7f89 authored by dcarney@chromium.org's avatar dcarney@chromium.org

Revert "More tests for Union & Intersect"

This reverts r20684.

TBR=rossberg@chromium.org

BUG=

Review URL: https://codereview.chromium.org/235133002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c5eaf807
......@@ -306,9 +306,6 @@ bool TypeImpl<Config>::SlowIs(TypeImpl* that) {
template<class Config>
bool TypeImpl<Config>::NowIs(TypeImpl* that) {
// TODO(rossberg): this is incorrect for
// Union(Constant(V), T)->NowIs(Class(M))
// but fuzzing does not cover that!
DisallowHeapAllocation no_allocation;
if (this->IsConstant()) {
i::Object* object = *this->AsConstant();
......@@ -438,12 +435,12 @@ typename TypeImpl<Config>::TypeHandle TypeImpl<Config>::Union(
size += (type2->IsUnion() ? Config::struct_length(type2->AsUnion()) : 1);
}
int bitset = type1->GlbBitset() | type2->GlbBitset();
if (bitset != kNone) ++size;
if (IsInhabited(bitset)) ++size;
ASSERT(size >= 1);
StructHandle unioned = Config::struct_create(kUnionTag, size, region);
size = 0;
if (bitset != kNone) {
if (IsInhabited(bitset)) {
Config::struct_set(unioned, size++, Config::from_bitset(bitset, region));
}
size = ExtendUnion(unioned, type1, size);
......@@ -514,12 +511,12 @@ typename TypeImpl<Config>::TypeHandle TypeImpl<Config>::Intersect(
type2->IsUnion() ? Config::struct_length(type2->AsUnion()) : 1);
}
int bitset = type1->GlbBitset() & type2->GlbBitset();
if (bitset != kNone) ++size;
if (IsInhabited(bitset)) ++size;
ASSERT(size >= 1);
StructHandle unioned = Config::struct_create(kUnionTag, size, region);
size = 0;
if (bitset != kNone) {
if (IsInhabited(bitset)) {
Config::struct_set(unioned, size++, Config::from_bitset(bitset, region));
}
size = ExtendIntersection(unioned, type1, type2, size);
......
......@@ -101,11 +101,11 @@ namespace internal {
// PROPERTIES
//
// Various formal properties hold for constructors, operators, and predicates
// over types. For example, constructors are injective, subtyping is a complete
// partial order, union and intersection satisfy the usual algebraic properties.
// over types. For example, constructors are injective, subtyping is a partial
// order, and union and intersection satisfy the usual algebraic properties.
//
// See test/cctest/test-types.cc for a comprehensive executable specification,
// especially with respect to the properties of the more exotic 'temporal'
// especially with respect to the proeprties of the more exotic 'temporal'
// constructors and predicates (those prefixed 'Now').
//
// IMPLEMENTATION
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment