Commit 277be506 authored by titzer's avatar titzer Committed by Commit bot

Remove Type::Array bit and replace with Type::GlobalObject

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27749}
parent 8c98cc07
......@@ -22,7 +22,6 @@ HType HType::FromType(typename T::TypeHandle type) {
if (type->Is(T::String())) return HType::String();
if (type->Is(T::Boolean())) return HType::Boolean();
if (type->Is(T::Undefined())) return HType::Undefined();
if (type->Is(T::Array())) return HType::JSArray();
if (type->Is(T::Object())) return HType::JSObject();
if (type->Is(T::Receiver())) return HType::JSReceiver();
return HType::Tagged();
......
......@@ -178,7 +178,7 @@ TypeImpl<Config>::BitsetType::Lub(TypeImpl* type) {
if (type->IsConstant()) return type->AsConstant()->Bound()->AsBitset();
if (type->IsRange()) return type->AsRange()->Bound();
if (type->IsContext()) return kInternal & kTaggedPointer;
if (type->IsArray()) return kArray;
if (type->IsArray()) return kOtherObject;
if (type->IsFunction()) return kOtherObject; // TODO(rossberg): kFunction
UNREACHABLE();
return kNone;
......@@ -234,10 +234,10 @@ TypeImpl<Config>::BitsetType::Lub(i::Map* map) {
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
case JS_GENERATOR_OBJECT_TYPE:
case JS_MODULE_TYPE:
case JS_GLOBAL_OBJECT_TYPE:
case JS_BUILTINS_OBJECT_TYPE:
case JS_GLOBAL_PROXY_TYPE:
case JS_ARRAY_BUFFER_TYPE:
case JS_ARRAY_TYPE:
case JS_TYPED_ARRAY_TYPE:
case JS_DATA_VIEW_TYPE:
case JS_SET_TYPE:
......@@ -248,8 +248,8 @@ TypeImpl<Config>::BitsetType::Lub(i::Map* map) {
case JS_WEAK_SET_TYPE:
if (map->is_undetectable()) return kUndetectable;
return kOtherObject;
case JS_ARRAY_TYPE:
return kArray;
case JS_GLOBAL_OBJECT_TYPE:
return kGlobalObject;
case JS_FUNCTION_TYPE:
return kOtherObject; // TODO(rossberg): there should be a Function type.
case JS_REGEXP_TYPE:
......
......@@ -208,7 +208,7 @@ namespace internal {
V(InternalizedString, 1u << 13 | REPRESENTATION(kTaggedPointer)) \
V(OtherString, 1u << 14 | REPRESENTATION(kTaggedPointer)) \
V(Undetectable, 1u << 15 | REPRESENTATION(kTaggedPointer)) \
V(Array, 1u << 16 | REPRESENTATION(kTaggedPointer)) \
V(GlobalObject, 1u << 16 | REPRESENTATION(kTaggedPointer)) \
V(OtherObject, 1u << 17 | REPRESENTATION(kTaggedPointer)) \
V(Proxy, 1u << 18 | REPRESENTATION(kTaggedPointer)) \
V(Internal, 1u << 19 | REPRESENTATION(kTagged | kUntagged)) \
......@@ -228,7 +228,7 @@ namespace internal {
V(NumberOrString, kNumber | kString) \
V(PlainPrimitive, kNumberOrString | kBoolean | kNull | kUndefined) \
V(Primitive, kSymbol | kPlainPrimitive) \
V(DetectableObject, kArray | kOtherObject) \
V(DetectableObject, kGlobalObject | kOtherObject) \
V(DetectableReceiver, kDetectableObject | kProxy) \
V(Detectable, kDetectableReceiver | kNumber | kName) \
V(Object, kDetectableObject | kUndetectable) \
......
......@@ -433,7 +433,7 @@ void AstTyper::VisitArrayLiteral(ArrayLiteral* expr) {
RECURSE(Visit(value));
}
NarrowType(expr, Bounds(Type::Array(zone())));
NarrowType(expr, Bounds(Type::Object(zone())));
}
......
This diff is collapsed.
......@@ -76,6 +76,7 @@ class Types {
uninitialized = isolate->factory()->uninitialized_value();
SmiConstant = Type::Constant(smi, region);
Signed32Constant = Type::Constant(signed32, region);
ObjectConstant1 = Type::Constant(object1, region);
ObjectConstant2 = Type::Constant(object2, region);
ArrayConstant = Type::Constant(array, region);
......
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