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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/become.h" 10 #include "vm/become.h"
(...skipping 10832 matching lines...) Expand 10 before | Expand all | Expand 10 after
10843 String& private_name = String::Handle(zone, PrivateName(name)); 10843 String& private_name = String::Handle(zone, PrivateName(name));
10844 const Object& obj = Object::Handle(LookupLocalObject(private_name)); 10844 const Object& obj = Object::Handle(LookupLocalObject(private_name));
10845 if (obj.IsClass()) { 10845 if (obj.IsClass()) {
10846 return Class::Cast(obj).raw(); 10846 return Class::Cast(obj).raw();
10847 } 10847 }
10848 } 10848 }
10849 return Class::null(); 10849 return Class::null();
10850 } 10850 }
10851 10851
10852 10852
10853 // Mixin applications can have multiple private keys from different libraries.
10854 RawClass* Library::SlowLookupClassAllowMultiPartPrivate(
10855 const String& name) const {
10856 Array& dict = Array::Handle(dictionary());
10857 Object& entry = Object::Handle();
10858 String& cls_name = String::Handle();
10859 for (intptr_t i = 0; i < dict.Length(); i++) {
10860 entry = dict.At(i);
10861 if (entry.IsClass()) {
10862 cls_name = Class::Cast(entry).Name();
10863 // Warning: comparison is not symmetric.
10864 if (String::EqualsIgnoringPrivateKey(cls_name, name)) {
10865 return Class::Cast(entry).raw();
10866 }
10867 }
10868 }
10869 return Class::null();
10870 }
10871
10872
10853 RawLibraryPrefix* Library::LookupLocalLibraryPrefix(const String& name) const { 10873 RawLibraryPrefix* Library::LookupLocalLibraryPrefix(const String& name) const {
10854 const Object& obj = Object::Handle(LookupLocalObject(name)); 10874 const Object& obj = Object::Handle(LookupLocalObject(name));
10855 if (obj.IsLibraryPrefix()) { 10875 if (obj.IsLibraryPrefix()) {
10856 return LibraryPrefix::Cast(obj).raw(); 10876 return LibraryPrefix::Cast(obj).raw();
10857 } 10877 }
10858 return LibraryPrefix::null(); 10878 return LibraryPrefix::null();
10859 } 10879 }
10860 10880
10861 10881
10862 void Library::set_toplevel_class(const Class& value) const { 10882 void Library::set_toplevel_class(const Class& value) const {
(...skipping 12491 matching lines...) Expand 10 before | Expand all | Expand 10 after
23354 return UserTag::null(); 23374 return UserTag::null();
23355 } 23375 }
23356 23376
23357 23377
23358 const char* UserTag::ToCString() const { 23378 const char* UserTag::ToCString() const {
23359 const String& tag_label = String::Handle(label()); 23379 const String& tag_label = String::Handle(label());
23360 return tag_label.ToCString(); 23380 return tag_label.ToCString();
23361 } 23381 }
23362 23382
23363 } // namespace dart 23383 } // namespace dart
OLDNEW
« 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