Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 0446fa78fdd2db4a346817324f257d93dfc425ef..296a26e867f866bbefed92ab62949e367cb4afc5 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -10850,6 +10850,26 @@ RawClass* Library::LookupClassAllowPrivate(const String& name) const { |
} |
+// Mixin applications can have multiple private keys from different libraries. |
+RawClass* Library::SlowLookupClassAllowMultiPartPrivate( |
+ const String& name) const { |
+ Array& dict = Array::Handle(dictionary()); |
+ Object& entry = Object::Handle(); |
+ String& cls_name = String::Handle(); |
+ for (intptr_t i = 0; i < dict.Length(); i++) { |
+ entry = dict.At(i); |
+ if (entry.IsClass()) { |
+ cls_name = Class::Cast(entry).Name(); |
+ // Warning: comparison is not symmetric. |
+ if (String::EqualsIgnoringPrivateKey(cls_name, name)) { |
+ return Class::Cast(entry).raw(); |
+ } |
+ } |
+ } |
+ return Class::null(); |
+} |
+ |
+ |
RawLibraryPrefix* Library::LookupLocalLibraryPrefix(const String& name) const { |
const Object& obj = Object::Handle(LookupLocalObject(name)); |
if (obj.IsLibraryPrefix()) { |