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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.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/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/backend_helpers.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) 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 library js_backend.backend; 5 library js_backend.backend;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
10 10
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 // constant emitter will generate a call to the createRuntimeType 824 // constant emitter will generate a call to the createRuntimeType
825 // helper so we register a use of that. 825 // helper so we register a use of that.
826 impactBuilder.registerStaticUse(new StaticUse.staticInvoke( 826 impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
827 // TODO(johnniwinther): Find the right [CallStructure]. 827 // TODO(johnniwinther): Find the right [CallStructure].
828 helpers.createRuntimeType, 828 helpers.createRuntimeType,
829 null)); 829 null));
830 } 830 }
831 } 831 }
832 } 832 }
833 833
834 void onResolutionStart(ResolutionEnqueuer enqueuer) {
835 helpers.onResolutionStart();
836
837 validateInterceptorImplementsAllObjectMethods(helpers.jsInterceptorClass);
838 // The null-interceptor must also implement *all* methods.
839 validateInterceptorImplementsAllObjectMethods(helpers.jsNullClass);
840 }
841
834 void onResolutionComplete( 842 void onResolutionComplete(
835 ClosedWorld closedWorld, ClosedWorldRefiner closedWorldRefiner) { 843 ClosedWorld closedWorld, ClosedWorldRefiner closedWorldRefiner) {
836 for (Entity entity in compiler.enqueuer.resolution.processedEntities) { 844 for (Entity entity in compiler.enqueuer.resolution.processedEntities) {
837 processAnnotations(entity, closedWorldRefiner); 845 processAnnotations(entity, closedWorldRefiner);
838 } 846 }
839 mirrorsData.computeMembersNeededForReflection( 847 mirrorsData.computeMembersNeededForReflection(
840 compiler.enqueuer.resolution.worldBuilder, closedWorld); 848 compiler.enqueuer.resolution.worldBuilder, closedWorld);
841 _backendUsage = _backendUsageBuilder.close(); 849 _backendUsage = _backendUsageBuilder.close();
842 _rtiNeed = rtiNeedBuilder.computeRuntimeTypesNeed( 850 _rtiNeed = rtiNeedBuilder.computeRuntimeTypesNeed(
843 compiler.enqueuer.resolution.worldBuilder, 851 compiler.enqueuer.resolution.worldBuilder,
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 1178
1171 // These methods are overwritten with generated versions. 1179 // These methods are overwritten with generated versions.
1172 inlineCache.markAsNonInlinable(helpers.getInterceptorMethod, 1180 inlineCache.markAsNonInlinable(helpers.getInterceptorMethod,
1173 insideLoop: true); 1181 insideLoop: true);
1174 1182
1175 specialOperatorEqClasses 1183 specialOperatorEqClasses
1176 ..add(commonElements.objectClass) 1184 ..add(commonElements.objectClass)
1177 ..add(helpers.jsInterceptorClass) 1185 ..add(helpers.jsInterceptorClass)
1178 ..add(helpers.jsNullClass); 1186 ..add(helpers.jsNullClass);
1179 1187
1180 validateInterceptorImplementsAllObjectMethods(helpers.jsInterceptorClass);
1181 // The null-interceptor must also implement *all* methods.
1182 validateInterceptorImplementsAllObjectMethods(helpers.jsNullClass);
1183
1184 return new Future.value(); 1188 return new Future.value();
1185 } 1189 }
1186 1190
1187 jsAst.Call generateIsJsIndexableCall( 1191 jsAst.Call generateIsJsIndexableCall(
1188 jsAst.Expression use1, jsAst.Expression use2) { 1192 jsAst.Expression use1, jsAst.Expression use2) {
1189 String dispatchPropertyName = embeddedNames.DISPATCH_PROPERTY_NAME; 1193 String dispatchPropertyName = embeddedNames.DISPATCH_PROPERTY_NAME;
1190 jsAst.Expression dispatchProperty = 1194 jsAst.Expression dispatchProperty =
1191 emitter.generateEmbeddedGlobalAccess(dispatchPropertyName); 1195 emitter.generateEmbeddedGlobalAccess(dispatchPropertyName);
1192 1196
1193 // We pass the dispatch property record to the isJsIndexable 1197 // We pass the dispatch property record to the isJsIndexable
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 return _backend.defaultSuperclass(element); 1627 return _backend.defaultSuperclass(element);
1624 } 1628 }
1625 1629
1626 @override 1630 @override
1627 bool isNativeClass(ClassEntity element) => 1631 bool isNativeClass(ClassEntity element) =>
1628 _backend.nativeClassData.isNativeClass(element); 1632 _backend.nativeClassData.isNativeClass(element);
1629 1633
1630 @override 1634 @override
1631 bool isForeign(Element element) => _backend.isForeign(element); 1635 bool isForeign(Element element) => _backend.isForeign(element);
1632 } 1636 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/backend_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698