| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 2aed4a855b3641069f22fa154f14f837c41cefd3..12669a04e07475166a465d497b48aa05bea980a8 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -16678,6 +16678,23 @@ const char* AbstractType::ToCString() const {
|
| }
|
|
|
|
|
| +bool simpleInstanceOfType(const AbstractType& type) {
|
| + // Bail if the type is still uninstantiated at compile time.
|
| + if (!type.IsInstantiated()) return false;
|
| +
|
| + // Bail if the type is a function or a Dart Function type.
|
| + if (type.IsFunctionType() || type.IsDartFunctionType()) return false;
|
| +
|
| + ASSERT(type.HasResolvedTypeClass());
|
| + const Class& type_class = Class::Handle(type.type_class());
|
| + // Bail if the type has any type parameters.
|
| + if (type_class.IsGeneric()) return false;
|
| +
|
| + // Finally a simple class for instance of checking.
|
| + return true;
|
| +}
|
| +
|
| +
|
| RawType* Type::NullType() {
|
| return Isolate::Current()->object_store()->null_type();
|
| }
|
|
|