Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 64023dceafea56969aaee7bd4c30da8b8bab6aa6..fa9c9d382e4eed4d0a0551a0ed898d76d333e55a 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -14227,12 +14227,24 @@ void WeakProperty::PrintToJSONStream(JSONStream* stream, bool ref) const { |
} |
+RawClass* MirrorReference::GetClassReferent() const { |
+ ASSERT(Object::Handle(referent()).IsClass()); |
+ return Class::Cast(Object::Handle(referent())).raw(); |
+} |
+ |
+ |
RawFunction* MirrorReference::GetFunctionReferent() const { |
ASSERT(Object::Handle(referent()).IsFunction()); |
return Function::Cast(Object::Handle(referent())).raw(); |
} |
+RawLibrary* MirrorReference::GetLibraryReferent() const { |
+ ASSERT(Object::Handle(referent()).IsLibrary()); |
+ return Library::Cast(Object::Handle(referent())).raw(); |
+} |
+ |
+ |
RawMirrorReference* MirrorReference::New(Heap::Space space) { |
ASSERT(Isolate::Current()->object_store()->mirror_reference_class() |
!= Class::null()); |