Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: runtime/vm/object.cc

Issue 2922913004: Add Dart_Save/LoadCompilationTrace. (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698