Chromium Code Reviews| 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/become.h" | 10 #include "vm/become.h" |
| (...skipping 10883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10894 } | 10894 } |
| 10895 return Class::null(); | 10895 return Class::null(); |
| 10896 } | 10896 } |
| 10897 | 10897 |
| 10898 | 10898 |
| 10899 void LibraryPrefix::set_is_loaded() const { | 10899 void LibraryPrefix::set_is_loaded() const { |
| 10900 StoreNonPointer(&raw_ptr()->is_loaded_, true); | 10900 StoreNonPointer(&raw_ptr()->is_loaded_, true); |
| 10901 } | 10901 } |
| 10902 | 10902 |
| 10903 | 10903 |
| 10904 bool LibraryPrefix::has_error() const { | |
| 10905 ASSERT(num_imports() == 1); | |
| 10906 const Library& deferred_lib = Library::Handle(GetLibrary(0)); | |
| 10907 return deferred_lib.LoadFailed(); | |
|
hausner
2016/06/07 21:47:05
I'm not sure LoadFailed() is sufficient. You need
| |
| 10908 } | |
| 10909 | |
| 10910 | |
| 10904 bool LibraryPrefix::LoadLibrary() const { | 10911 bool LibraryPrefix::LoadLibrary() const { |
| 10905 // Non-deferred prefixes are loaded. | 10912 // Non-deferred prefixes are loaded. |
| 10906 ASSERT(is_deferred_load() || is_loaded()); | 10913 ASSERT(is_deferred_load() || is_loaded()); |
| 10907 if (is_loaded()) { | 10914 if (is_loaded()) { |
| 10908 return true; // Load request has already completed. | 10915 return true; // Load request has already completed. |
| 10909 } | 10916 } |
| 10910 ASSERT(is_deferred_load()); | 10917 ASSERT(is_deferred_load()); |
| 10911 ASSERT(num_imports() == 1); | 10918 ASSERT(num_imports() == 1); |
| 10912 if (Dart::snapshot_kind() == Snapshot::kAppNoJIT) { | 10919 if (Dart::snapshot_kind() == Snapshot::kAppNoJIT) { |
| 10913 // The library list was tree-shaken away. | 10920 // The library list was tree-shaken away. |
| (...skipping 11718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 22632 return UserTag::null(); | 22639 return UserTag::null(); |
| 22633 } | 22640 } |
| 22634 | 22641 |
| 22635 | 22642 |
| 22636 const char* UserTag::ToCString() const { | 22643 const char* UserTag::ToCString() const { |
| 22637 const String& tag_label = String::Handle(label()); | 22644 const String& tag_label = String::Handle(label()); |
| 22638 return tag_label.ToCString(); | 22645 return tag_label.ToCString(); |
| 22639 } | 22646 } |
| 22640 | 22647 |
| 22641 } // namespace dart | 22648 } // namespace dart |
| OLD | NEW |