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

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

Issue 2855593002: Revert "Move JsInteropAnalysis.onQueueClosed to AnnotationProcessor.processJsInteropAnnotation" (Closed)
Patch Set: Created 3 years, 7 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
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 '../common.dart'; 7 import '../common.dart';
8 import '../common/backend_api.dart' 8 import '../common/backend_api.dart'
9 show ForeignResolver, NativeRegistry, ImpactTransformer; 9 show ForeignResolver, NativeRegistry, ImpactTransformer;
10 import '../common/codegen.dart' show CodegenImpact, CodegenWorkItem; 10 import '../common/codegen.dart' show CodegenImpact, CodegenWorkItem;
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 .getThisType(commonElements.jsExtendableArrayClass); 754 .getThisType(commonElements.jsExtendableArrayClass);
755 755
756 validateInterceptorImplementsAllObjectMethods( 756 validateInterceptorImplementsAllObjectMethods(
757 commonElements.jsInterceptorClass); 757 commonElements.jsInterceptorClass);
758 // The null-interceptor must also implement *all* methods. 758 // The null-interceptor must also implement *all* methods.
759 validateInterceptorImplementsAllObjectMethods(commonElements.jsNullClass); 759 validateInterceptorImplementsAllObjectMethods(commonElements.jsNullClass);
760 } 760 }
761 761
762 /// Called when the resolution queue has been closed. 762 /// Called when the resolution queue has been closed.
763 void onResolutionEnd() { 763 void onResolutionEnd() {
764 compiler.frontEndStrategy.annotationProcesser
765 .processJsInteropAnnotations(nativeBasicData, nativeDataBuilder);
766 _backendUsage = backendUsageBuilder.close(); 764 _backendUsage = backendUsageBuilder.close();
767 _interceptorData = interceptorDataBuilder.onResolutionComplete(); 765 _interceptorData = interceptorDataBuilder.onResolutionComplete();
768 } 766 }
769 767
770 /// Called when the closed world from resolution has been computed. 768 /// Called when the closed world from resolution has been computed.
771 void onResolutionClosedWorld( 769 void onResolutionClosedWorld(
772 ClosedWorld closedWorld, ClosedWorldRefiner closedWorldRefiner) { 770 ClosedWorld closedWorld, ClosedWorldRefiner closedWorldRefiner) {
773 for (MemberEntity entity 771 for (MemberEntity entity
774 in compiler.enqueuer.resolution.processedEntities) { 772 in compiler.enqueuer.resolution.processedEntities) {
775 processAnnotations(entity, closedWorldRefiner); 773 processAnnotations(entity, closedWorldRefiner);
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 inlineCache.markAsNonInlinable(commonElements.getInterceptorMethod, 1106 inlineCache.markAsNonInlinable(commonElements.getInterceptorMethod,
1109 insideLoop: true); 1107 insideLoop: true);
1110 1108
1111 specialOperatorEqClasses 1109 specialOperatorEqClasses
1112 ..add(commonElements.objectClass) 1110 ..add(commonElements.objectClass)
1113 ..add(commonElements.jsInterceptorClass) 1111 ..add(commonElements.jsInterceptorClass)
1114 ..add(commonElements.jsNullClass); 1112 ..add(commonElements.jsNullClass);
1115 } 1113 }
1116 } 1114 }
1117 1115
1116 /// Called after the queue is closed. [onQueueEmpty] may be called multiple
1117 /// times, but [onQueueClosed] is only called once.
1118 void onQueueClosed() {
1119 jsInteropAnalysis.onQueueClosed();
1120 }
1121
1118 // TODO(johnniwinther): Create a CodegenPhase object for the backend to hold 1122 // TODO(johnniwinther): Create a CodegenPhase object for the backend to hold
1119 // data only available during code generation. 1123 // data only available during code generation.
1120 ClosedWorld _closedWorldCache; 1124 ClosedWorld _closedWorldCache;
1121 ClosedWorld get _closedWorld { 1125 ClosedWorld get _closedWorld {
1122 assert(invariant(NO_LOCATION_SPANNABLE, _closedWorldCache != null, 1126 assert(invariant(NO_LOCATION_SPANNABLE, _closedWorldCache != null,
1123 message: "ClosedWorld has not be set yet.")); 1127 message: "ClosedWorld has not be set yet."));
1124 return _closedWorldCache; 1128 return _closedWorldCache;
1125 } 1129 }
1126 1130
1127 void set _closedWorld(ClosedWorld value) { 1131 void set _closedWorld(ClosedWorld value) {
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 1450
1447 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { 1451 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) {
1448 return !selector.isGetter; 1452 return !selector.isGetter;
1449 } 1453 }
1450 1454
1451 /// Returns `true` if [member] is called from a subclass via `super`. 1455 /// Returns `true` if [member] is called from a subclass via `super`.
1452 bool isAliasedSuperMember(MemberEntity member) { 1456 bool isAliasedSuperMember(MemberEntity member) {
1453 return _aliasedSuperMembers.contains(member); 1457 return _aliasedSuperMembers.contains(member);
1454 } 1458 }
1455 } 1459 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/frontend_strategy.dart ('k') | pkg/compiler/lib/src/js_backend/js_interop_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698