Chromium Code Reviews| 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(); |
|
zra
2016/04/14 18:27:49
Will this be implemented, or should this be UNREAC
Vyacheslav Egorov (Google)
2016/04/18 15:56:42
Done.
|
| +#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()) { |
|
zra
2016/04/14 18:27:49
Is this a pre-existing bug? Should this fix go in
Vyacheslav Egorov (Google)
2016/04/18 15:56:42
It's only reproducible/testible on DBC because of
|
| 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, |