| Index: src/types.cc
|
| diff --git a/src/types.cc b/src/types.cc
|
| index 98592cf5c242d3e3c7739a94c8ded31dd2a60288..29a2b99d765da58e46dcf0a5d10c5fcf2e1b9272 100644
|
| --- a/src/types.cc
|
| +++ b/src/types.cc
|
| @@ -140,14 +140,6 @@ int TypeImpl<Config>::LubBitset(i::Object* value) {
|
| value->ToInt32(&i) ? (Smi::IsValid(i) ? kSignedSmall : kOtherSigned32) :
|
| value->ToUint32(&u) ? kUnsigned32 : kFloat);
|
| }
|
| - if (map->instance_type() == ODDBALL_TYPE) {
|
| - if (value->IsUndefined()) return kUndefined;
|
| - if (value->IsNull()) return kNull;
|
| - if (value->IsBoolean()) return kBoolean;
|
| - if (value->IsTheHole()) return kAny; // TODO(rossberg): kNone?
|
| - if (value->IsUninitialized()) return kNone;
|
| - UNREACHABLE();
|
| - }
|
| return LubBitset(map);
|
| }
|
|
|
| @@ -178,8 +170,18 @@ int TypeImpl<Config>::LubBitset(i::Map* map) {
|
| return kString;
|
| case SYMBOL_TYPE:
|
| return kSymbol;
|
| - case ODDBALL_TYPE:
|
| - return kOddball;
|
| + case ODDBALL_TYPE: {
|
| + Heap* heap = map->GetHeap();
|
| + if (map == heap->undefined_map()) return kUndefined;
|
| + if (map == heap->the_hole_map()) return kAny; // TODO(rossberg): kNone?
|
| + if (map == heap->null_map()) return kNull;
|
| + if (map == heap->boolean_map()) return kBoolean;
|
| + if (map == heap->uninitialized_map()) return kNone;
|
| + ASSERT(map == heap->no_interceptor_result_sentinel_map() ||
|
| + map == heap->termination_exception_map() ||
|
| + map == heap->arguments_marker_map());
|
| + return kInternal & kTaggedPtr;
|
| + }
|
| case HEAP_NUMBER_TYPE:
|
| return kFloat & kTaggedPtr;
|
| case JS_VALUE_TYPE:
|
| @@ -251,8 +253,7 @@ template<class Config>
|
| typename TypeImpl<Config>::TypeHandle TypeImpl<Config>::NowOf(
|
| i::Object* value, Region* region) {
|
| if (value->IsSmi() ||
|
| - i::HeapObject::cast(value)->map()->instance_type() == HEAP_NUMBER_TYPE ||
|
| - i::HeapObject::cast(value)->map()->instance_type() == ODDBALL_TYPE) {
|
| + i::HeapObject::cast(value)->map()->instance_type() == HEAP_NUMBER_TYPE) {
|
| return Of(value, region);
|
| }
|
| return Class(i::handle(i::HeapObject::cast(value)->map()), region);
|
|
|