| OLD | NEW |
| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 10497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10508 RawClass* LibraryPrefix::LookupClass(const String& class_name) const { | 10508 RawClass* LibraryPrefix::LookupClass(const String& class_name) const { |
| 10509 const Object& obj = Object::Handle(LookupObject(class_name)); | 10509 const Object& obj = Object::Handle(LookupObject(class_name)); |
| 10510 if (obj.IsClass()) { | 10510 if (obj.IsClass()) { |
| 10511 return Class::Cast(obj).raw(); | 10511 return Class::Cast(obj).raw(); |
| 10512 } | 10512 } |
| 10513 return Class::null(); | 10513 return Class::null(); |
| 10514 } | 10514 } |
| 10515 | 10515 |
| 10516 | 10516 |
| 10517 void LibraryPrefix::set_is_loaded() const { | 10517 void LibraryPrefix::set_is_loaded() const { |
| 10518 Isolate::Current()->IncrPrefixInvalidationGen(); |
| 10518 StoreNonPointer(&raw_ptr()->is_loaded_, true); | 10519 StoreNonPointer(&raw_ptr()->is_loaded_, true); |
| 10519 } | 10520 } |
| 10520 | 10521 |
| 10521 | 10522 |
| 10522 bool LibraryPrefix::LoadLibrary() const { | 10523 bool LibraryPrefix::LoadLibrary() const { |
| 10523 // Non-deferred prefixes are loaded. | 10524 // Non-deferred prefixes are loaded. |
| 10524 ASSERT(is_deferred_load() || is_loaded()); | 10525 ASSERT(is_deferred_load() || is_loaded()); |
| 10525 if (is_loaded()) { | 10526 if (is_loaded()) { |
| 10526 return true; // Load request has already completed. | 10527 return true; // Load request has already completed. |
| 10527 } | 10528 } |
| (...skipping 11212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21740 return UserTag::null(); | 21741 return UserTag::null(); |
| 21741 } | 21742 } |
| 21742 | 21743 |
| 21743 | 21744 |
| 21744 const char* UserTag::ToCString() const { | 21745 const char* UserTag::ToCString() const { |
| 21745 const String& tag_label = String::Handle(label()); | 21746 const String& tag_label = String::Handle(label()); |
| 21746 return tag_label.ToCString(); | 21747 return tag_label.ToCString(); |
| 21747 } | 21748 } |
| 21748 | 21749 |
| 21749 } // namespace dart | 21750 } // namespace dart |
| OLD | NEW |