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

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

Issue 2826673002: Remove JavaScriptBackend from ClosedWorldBase (Closed)
Patch Set: Created 3 years, 8 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 compiler.elementEnvironment.getThisType(commonElements.jsArrayClass); 764 compiler.elementEnvironment.getThisType(commonElements.jsArrayClass);
765 compiler.elementEnvironment 765 compiler.elementEnvironment
766 .getThisType(commonElements.jsExtendableArrayClass); 766 .getThisType(commonElements.jsExtendableArrayClass);
767 767
768 validateInterceptorImplementsAllObjectMethods( 768 validateInterceptorImplementsAllObjectMethods(
769 commonElements.jsInterceptorClass); 769 commonElements.jsInterceptorClass);
770 // The null-interceptor must also implement *all* methods. 770 // The null-interceptor must also implement *all* methods.
771 validateInterceptorImplementsAllObjectMethods(commonElements.jsNullClass); 771 validateInterceptorImplementsAllObjectMethods(commonElements.jsNullClass);
772 } 772 }
773 773
774 void onResolutionEnd() {
Siggi Cherem (dart-lang) 2017/04/18 15:58:05 it seems a bit confusing to have two events called
Johnni Winther 2017/04/19 09:30:33 The actually order in which these objects are crea
775 _backendUsage = backendUsageBuilder.close();
776 _interceptorData = interceptorDataBuilder.onResolutionComplete();
777 }
778
774 void onResolutionComplete( 779 void onResolutionComplete(
775 ClosedWorld closedWorld, ClosedWorldRefiner closedWorldRefiner) { 780 ClosedWorld closedWorld, ClosedWorldRefiner closedWorldRefiner) {
776 for (MemberEntity entity 781 for (MemberEntity entity
777 in compiler.enqueuer.resolution.processedEntities) { 782 in compiler.enqueuer.resolution.processedEntities) {
778 processAnnotations(entity, closedWorldRefiner); 783 processAnnotations(entity, closedWorldRefiner);
779 } 784 }
780 mirrorsDataBuilder.computeMembersNeededForReflection( 785 mirrorsDataBuilder.computeMembersNeededForReflection(
781 compiler.enqueuer.resolution.worldBuilder, closedWorld); 786 compiler.enqueuer.resolution.worldBuilder, closedWorld);
782 _backendUsage = backendUsageBuilder.close();
783 _rtiNeed = rtiNeedBuilder.computeRuntimeTypesNeed( 787 _rtiNeed = rtiNeedBuilder.computeRuntimeTypesNeed(
784 compiler.enqueuer.resolution.worldBuilder, 788 compiler.enqueuer.resolution.worldBuilder,
785 closedWorld, 789 closedWorld,
786 compiler.types, 790 compiler.types,
787 commonElements, 791 commonElements,
788 _backendUsage, 792 _backendUsage,
789 enableTypeAssertions: compiler.options.enableTypeAssertions); 793 enableTypeAssertions: compiler.options.enableTypeAssertions);
790 _interceptorData = interceptorDataBuilder.onResolutionComplete(closedWorld);
791 _oneShotInterceptorData = 794 _oneShotInterceptorData =
792 new OneShotInterceptorData(interceptorData, commonElements); 795 new OneShotInterceptorData(interceptorData, commonElements);
793 mirrorsResolutionAnalysis.onResolutionComplete(); 796 mirrorsResolutionAnalysis.onResolutionComplete();
794 } 797 }
795 798
796 void onTypeInferenceComplete(GlobalTypeInferenceResults results) { 799 void onTypeInferenceComplete(GlobalTypeInferenceResults results) {
797 noSuchMethodRegistry.onTypeInferenceComplete(results); 800 noSuchMethodRegistry.onTypeInferenceComplete(results);
798 } 801 }
799 802
800 /// Called when resolving a call to a foreign function. 803 /// Called when resolving a call to a foreign function.
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 1496
1494 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { 1497 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) {
1495 return !selector.isGetter; 1498 return !selector.isGetter;
1496 } 1499 }
1497 1500
1498 /// Returns `true` if [member] is called from a subclass via `super`. 1501 /// Returns `true` if [member] is called from a subclass via `super`.
1499 bool isAliasedSuperMember(MemberEntity member) { 1502 bool isAliasedSuperMember(MemberEntity member) {
1500 return _aliasedSuperMembers.contains(member); 1503 return _aliasedSuperMembers.contains(member);
1501 } 1504 }
1502 } 1505 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/interceptor_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698