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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend_helpers.dart

Issue 2735763002: Create ResolutionEnqueuer after library loading. (Closed)
Patch Set: Updated cf. comments. Created 3 years, 9 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 | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library dart2js.js_backend.helpers; 5 library dart2js.js_backend.helpers;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart' show Identifiers, Uris; 8 import '../common/names.dart' show Identifiers, Uris;
9 import '../common_elements.dart' show CommonElements, ElementEnvironment; 9 import '../common_elements.dart' show CommonElements, ElementEnvironment;
10 import '../elements/elements.dart' show PublicName; 10 import '../elements/elements.dart' show PublicName;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 FunctionEntity findCoreHelper(String name) => _env 87 FunctionEntity findCoreHelper(String name) => _env
88 .lookupLibraryMember(commonElements.coreLibrary, name, required: true); 88 .lookupLibraryMember(commonElements.coreLibrary, name, required: true);
89 89
90 ConstructorEntity _findConstructor(ClassEntity cls, String name) => 90 ConstructorEntity _findConstructor(ClassEntity cls, String name) =>
91 _env.lookupConstructor(cls, name, required: true); 91 _env.lookupConstructor(cls, name, required: true);
92 92
93 void onLibrariesLoaded(LoadedLibraries loadedLibraries) { 93 void onLibrariesLoaded(LoadedLibraries loadedLibraries) {
94 assert(loadedLibraries.containsLibrary(Uris.dart_core)); 94 assert(loadedLibraries.containsLibrary(Uris.dart_core));
95 assert(loadedLibraries.containsLibrary(DART_INTERCEPTORS)); 95 assert(loadedLibraries.containsLibrary(DART_INTERCEPTORS));
96 assert(loadedLibraries.containsLibrary(DART_JS_HELPER)); 96 assert(loadedLibraries.containsLibrary(DART_JS_HELPER));
97 }
97 98
99 void onResolutionStart() {
98 // TODO(johnniwinther): Avoid these. Currently needed to ensure resolution 100 // TODO(johnniwinther): Avoid these. Currently needed to ensure resolution
99 // of the classes for various queries in native behavior computation, 101 // of the classes for various queries in native behavior computation,
100 // inference and codegen. 102 // inference and codegen.
101 _env.getThisType(jsArrayClass); 103 _env.getThisType(jsArrayClass);
102 _env.getThisType(jsExtendableArrayClass); 104 _env.getThisType(jsExtendableArrayClass);
103 } 105 }
104 106
105 LibraryEntity _jsHelperLibrary; 107 LibraryEntity _jsHelperLibrary;
106 LibraryEntity get jsHelperLibrary => 108 LibraryEntity get jsHelperLibrary =>
107 _jsHelperLibrary ??= _env.lookupLibrary(DART_JS_HELPER); 109 _jsHelperLibrary ??= _env.lookupLibrary(DART_JS_HELPER);
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 /// The class for patch annotations defined in dart:_js_helper. 807 /// The class for patch annotations defined in dart:_js_helper.
806 ClassEntity get patchAnnotationClass => 808 ClassEntity get patchAnnotationClass =>
807 _patchAnnotationClass ??= _findHelperClass('_Patch'); 809 _patchAnnotationClass ??= _findHelperClass('_Patch');
808 810
809 ClassEntity _nativeAnnotationClass; 811 ClassEntity _nativeAnnotationClass;
810 812
811 /// The class for native annotations defined in dart:_js_helper. 813 /// The class for native annotations defined in dart:_js_helper.
812 ClassEntity get nativeAnnotationClass => 814 ClassEntity get nativeAnnotationClass =>
813 _nativeAnnotationClass ??= _findHelperClass('Native'); 815 _nativeAnnotationClass ??= _findHelperClass('Native');
814 } 816 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698