| 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 9786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9797 // loading. Once all outstanding load requests have completed, the embedder | 9797 // loading. Once all outstanding load requests have completed, the embedder |
| 9798 // will call the core library to: | 9798 // will call the core library to: |
| 9799 // - invalidate dependent code of this prefix; | 9799 // - invalidate dependent code of this prefix; |
| 9800 // - mark this prefixes as loaded; | 9800 // - mark this prefixes as loaded; |
| 9801 // - complete the future associated with this prefix. | 9801 // - complete the future associated with this prefix. |
| 9802 const Library& deferred_lib = Library::Handle(GetLibrary(0)); | 9802 const Library& deferred_lib = Library::Handle(GetLibrary(0)); |
| 9803 if (deferred_lib.Loaded()) { | 9803 if (deferred_lib.Loaded()) { |
| 9804 this->set_is_loaded(); | 9804 this->set_is_loaded(); |
| 9805 return true; | 9805 return true; |
| 9806 } else if (deferred_lib.LoadNotStarted()) { | 9806 } else if (deferred_lib.LoadNotStarted()) { |
| 9807 Isolate* isolate = Isolate::Current(); |
| 9808 Api::Scope api_scope(isolate); |
| 9807 deferred_lib.SetLoadRequested(); | 9809 deferred_lib.SetLoadRequested(); |
| 9808 Isolate* isolate = Isolate::Current(); | |
| 9809 const String& lib_url = String::Handle(isolate, deferred_lib.url()); | 9810 const String& lib_url = String::Handle(isolate, deferred_lib.url()); |
| 9810 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); | 9811 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); |
| 9811 handler(Dart_kImportTag, | 9812 handler(Dart_kImportTag, |
| 9812 Api::NewHandle(isolate, importer()), | 9813 Api::NewHandle(isolate, importer()), |
| 9813 Api::NewHandle(isolate, lib_url.raw())); | 9814 Api::NewHandle(isolate, lib_url.raw())); |
| 9814 } else { | 9815 } else { |
| 9815 // Another load request is in flight. | 9816 // Another load request is in flight. |
| 9816 ASSERT(deferred_lib.LoadRequested()); | 9817 ASSERT(deferred_lib.LoadRequested()); |
| 9817 } | 9818 } |
| 9818 return false; // Load request not yet completed. | 9819 return false; // Load request not yet completed. |
| (...skipping 9345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19164 return tag_label.ToCString(); | 19165 return tag_label.ToCString(); |
| 19165 } | 19166 } |
| 19166 | 19167 |
| 19167 | 19168 |
| 19168 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 19169 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 19169 Instance::PrintJSONImpl(stream, ref); | 19170 Instance::PrintJSONImpl(stream, ref); |
| 19170 } | 19171 } |
| 19171 | 19172 |
| 19172 | 19173 |
| 19173 } // namespace dart | 19174 } // namespace dart |
| OLD | NEW |