Lines Matching refs:that

2 // Use of this source code is governed by a BSD-style license that can be
14 // NOTE: If code is marked as being a "shortcut", this means that removing
240 // because it means that the template isn't actually parametric.
395 bool TypeImpl<Config>::SimplyEquals(TypeImpl* that) {
398 return that->IsClass()
399 && *this->AsClass()->Map() == *that->AsClass()->Map();
402 return that->IsConstant()
403 && *this->AsConstant()->Value() == *that->AsConstant()->Value();
406 return that->IsContext()
407 && this->AsContext()->Outer()->Equals(that->AsContext()->Outer());
410 return that->IsArray()
411 && this->AsArray()->Element()->Equals(that->AsArray()->Element());
414 if (!that->IsFunction()) return false;
416 FunctionType* that_fun = that->AsFunction();
432 // Check if [this] <= [that].
434 bool TypeImpl<Config>::SlowIs(TypeImpl* that) {
437 if (that->IsBitset()) {
438 return BitsetType::Is(this->BitsetLub(), that->AsBitset());
441 return BitsetType::Is(this->AsBitset(), that->BitsetGlb());
448 if (!unioned->Get(i)->Is(that)) return false;
454 if (that->IsUnion()) {
455 for (int i = 0; i < that->AsUnion()->Length(); ++i) {
456 if (this->Is(that->AsUnion()->Get(i))) return true;
462 if (that->IsRange()) {
463 return (this->IsRange() && Contains(that->AsRange(), this->AsRange()))
465 Contains(that->AsRange(), *this->AsConstant()->Value()));
468 return this->SimplyEquals(that);
473 bool TypeImpl<Config>::NowIs(TypeImpl* that) {
478 // but fuzzing does not cover that!
483 for (Iterator<i::Map> it = that->Classes(); !it.Done(); it.Advance()) {
488 return this->Is(that);
503 // Check if [this] and [that] overlap.
505 bool TypeImpl<Config>::Maybe(TypeImpl* that) {
512 if (unioned->Get(i)->Maybe(that)) return true;
518 if (that->IsUnion()) {
519 for (int i = 0; i < that->AsUnion()->Length(); ++i) {
520 if (this->Maybe(that->AsUnion()->Get(i))) return true;
525 if (!BitsetType::IsInhabited(this->BitsetLub() & that->BitsetLub()))
527 if (this->IsBitset() || that->IsBitset()) return true;
529 if (this->IsClass() != that->IsClass()) return true;
532 if (that->IsConstant()) {
533 return Contains(this->AsRange(), *that->AsConstant()->Value());
535 return that->IsRange() && Overlap(this->AsRange(), that->AsRange());
537 if (that->IsRange()) {
539 return Contains(that->AsRange(), *this->AsConstant()->Value());
541 return this->IsRange() && Overlap(this->AsRange(), that->AsRange());
544 return this->SimplyEquals(that);
669 // Remove any components that just got subsumed.