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 10344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10355 | 10355 |
10356 | 10356 |
10357 bool LibraryPrefix::LoadLibrary() const { | 10357 bool LibraryPrefix::LoadLibrary() const { |
10358 // Non-deferred prefixes are loaded. | 10358 // Non-deferred prefixes are loaded. |
10359 ASSERT(is_deferred_load() || is_loaded()); | 10359 ASSERT(is_deferred_load() || is_loaded()); |
10360 if (is_loaded()) { | 10360 if (is_loaded()) { |
10361 return true; // Load request has already completed. | 10361 return true; // Load request has already completed. |
10362 } | 10362 } |
10363 ASSERT(is_deferred_load()); | 10363 ASSERT(is_deferred_load()); |
10364 ASSERT(num_imports() == 1); | 10364 ASSERT(num_imports() == 1); |
10365 if (Dart::IsRunningPrecompiledCode()) { | |
Florian Schneider
2016/03/01 22:53:44
Should this be just
#if defined(DART_PRECOMPILED
rmacnak
2016/03/01 23:03:29
Issue #25894
| |
10366 // The library list was tree-shaken away. | |
10367 this->set_is_loaded(); | |
10368 return true; | |
10369 } | |
10365 // This is a prefix for a deferred library. If the library is not loaded | 10370 // This is a prefix for a deferred library. If the library is not loaded |
10366 // yet and isn't being loaded, call the library tag handler to schedule | 10371 // yet and isn't being loaded, call the library tag handler to schedule |
10367 // loading. Once all outstanding load requests have completed, the embedder | 10372 // loading. Once all outstanding load requests have completed, the embedder |
10368 // will call the core library to: | 10373 // will call the core library to: |
10369 // - invalidate dependent code of this prefix; | 10374 // - invalidate dependent code of this prefix; |
10370 // - mark this prefixes as loaded; | 10375 // - mark this prefixes as loaded; |
10371 // - complete the future associated with this prefix. | 10376 // - complete the future associated with this prefix. |
10372 const Library& deferred_lib = Library::Handle(GetLibrary(0)); | 10377 const Library& deferred_lib = Library::Handle(GetLibrary(0)); |
10373 if (deferred_lib.Loaded()) { | 10378 if (deferred_lib.Loaded()) { |
10374 this->set_is_loaded(); | 10379 this->set_is_loaded(); |
(...skipping 11284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
21659 return UserTag::null(); | 21664 return UserTag::null(); |
21660 } | 21665 } |
21661 | 21666 |
21662 | 21667 |
21663 const char* UserTag::ToCString() const { | 21668 const char* UserTag::ToCString() const { |
21664 const String& tag_label = String::Handle(label()); | 21669 const String& tag_label = String::Handle(label()); |
21665 return tag_label.ToCString(); | 21670 return tag_label.ToCString(); |
21666 } | 21671 } |
21667 | 21672 |
21668 } // namespace dart | 21673 } // namespace dart |
OLD | NEW |