| Index: src/types.cc
|
| diff --git a/src/types.cc b/src/types.cc
|
| index e269582ca0293b73b68009c39ed129ec0e7a6c81..95ad4ca689b65218239dfb140421f258e92598c5 100644
|
| --- a/src/types.cc
|
| +++ b/src/types.cc
|
| @@ -271,7 +271,7 @@ int TypeImpl<Config>::GlbBitset() {
|
|
|
| // Most precise _current_ type of a value (usually its class).
|
| template<class Config>
|
| -typename TypeImpl<Config>::TypeHandle TypeImpl<Config>::OfCurrently(
|
| +typename TypeImpl<Config>::TypeHandle TypeImpl<Config>::NowOf(
|
| i::Handle<i::Object> value, Region* region) {
|
| if (value->IsSmi() ||
|
| i::HeapObject::cast(*value)->map()->instance_type() == HEAP_NUMBER_TYPE ||
|
| @@ -326,7 +326,7 @@ bool TypeImpl<Config>::SlowIs(TypeImpl* that) {
|
|
|
|
|
| template<class Config>
|
| -bool TypeImpl<Config>::IsCurrently(TypeImpl* that) {
|
| +bool TypeImpl<Config>::NowIs(TypeImpl* that) {
|
| return this->Is(that) ||
|
| (this->IsConstant() && that->IsClass() &&
|
| this->AsConstant()->IsHeapObject() &&
|
| @@ -378,6 +378,23 @@ bool TypeImpl<Config>::Maybe(TypeImpl* that) {
|
|
|
|
|
| template<class Config>
|
| +bool TypeImpl<Config>::Contains(i::Object* value) {
|
| + if (this->IsConstant()) {
|
| + return *this->AsConstant() == value;
|
| + }
|
| + return Config::from_bitset(LubBitset(value))->Is(this);
|
| +}
|
| +
|
| +
|
| +template<class Config>
|
| +bool TypeImpl<Config>::NowContains(i::Object* value) {
|
| + return this->Contains(value) ||
|
| + (this->IsClass() && value->IsHeapObject() &&
|
| + *this->AsClass() == i::HeapObject::cast(value)->map());
|
| +}
|
| +
|
| +
|
| +template<class Config>
|
| bool TypeImpl<Config>::InUnion(UnionedHandle unioned, int current_size) {
|
| ASSERT(!this->IsUnion());
|
| for (int i = 0; i < current_size; ++i) {
|
|
|