Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 93ad49ce7a1d48d62baa1493e3ae2889d312a642..e8deb62c9b7dd8088a14887dcfdb7448f55202ca 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -13477,12 +13477,16 @@ void Code::DisableDartCode() const { |
void Code::DisableStubCode() const { |
+#if !defined(TARGET_ARCH_DBC) |
ASSERT(Thread::Current()->IsMutatorThread()); |
ASSERT(IsAllocationStubCode()); |
ASSERT(instructions() == active_instructions()); |
const Code& new_code = |
Code::Handle(StubCode::FixAllocationStubTarget_entry()->code()); |
SetActiveInstructions(new_code.instructions()); |
+#else |
+ UNIMPLEMENTED(); |
+#endif |
} |
@@ -14639,7 +14643,9 @@ bool Instance::IsInstanceOf(const AbstractType& other, |
Zone* zone = Thread::Current()->zone(); |
const Class& cls = Class::Handle(zone, clazz()); |
if (cls.IsClosureClass()) { |
- if (other.IsObjectType() || other.IsDartFunctionType()) { |
+ if (other.IsObjectType() || |
+ other.IsDartFunctionType() || |
+ other.IsDartClosureType()) { |
return true; |
} |
Function& other_signature = Function::Handle(zone); |
@@ -15409,6 +15415,12 @@ bool AbstractType::IsDartFunctionType() const { |
} |
+bool AbstractType::IsDartClosureType() const { |
+ return HasResolvedTypeClass() && |
+ (type_class() == Isolate::Current()->object_store()->closure_class()); |
+} |
+ |
+ |
bool AbstractType::TypeTest(TypeTestKind test_kind, |
const AbstractType& other, |
Error* bound_error, |