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

Side by Side Diff: runtime/lib/lib_prefix.dart

Issue 1211273011: Added full deferred loading semantic to precompiled/--noopt/eager-loading code (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 years, 5 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/lib/errors_patch.dart ('k') | runtime/lib/object.cc » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import "dart:async"; 5 import "dart:async";
6 import "dart:isolate"; 6 import "dart:isolate";
7 7
8 // This type corresponds to the VM-internal class LibraryPrefix. 8 // This type corresponds to the VM-internal class LibraryPrefix.
9 class _LibraryPrefix { 9 class _LibraryPrefix {
10 10
11 bool _load() native "LibraryPrefix_load"; 11 bool _load() native "LibraryPrefix_load";
12 Error _loadError() native "LibraryPrefix_loadError"; 12 Error _loadError() native "LibraryPrefix_loadError";
13 bool isLoaded() native "LibraryPrefix_isLoaded";
13 14
14 bool _invalidateDependentCode() 15 bool _invalidateDependentCode()
15 native "LibraryPrefix_invalidateDependentCode"; 16 native "LibraryPrefix_invalidateDependentCode";
16 17
17 loadLibrary() { 18 loadLibrary() {
18 var completer = _outstandingLoadRequests[this]; 19 var completer = _outstandingLoadRequests[this];
19 if (completer != null) { 20 if (completer != null) {
20 return completer.future; 21 return completer.future;
21 } 22 }
22 completer = new Completer<bool>(); 23 completer = new Completer<bool>();
(...skipping 25 matching lines...) Expand all
48 var error = prefix._loadError(); 49 var error = prefix._loadError();
49 if (error != null) { 50 if (error != null) {
50 completer.completeError(error); 51 completer.completeError(error);
51 } else { 52 } else {
52 prefix._invalidateDependentCode(); 53 prefix._invalidateDependentCode();
53 completer.complete(true); 54 completer.complete(true);
54 } 55 }
55 }); 56 });
56 _outstandingLoadRequests.clear(); 57 _outstandingLoadRequests.clear();
57 } 58 }
OLDNEW
« no previous file with comments | « runtime/lib/errors_patch.dart ('k') | runtime/lib/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698