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

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

Issue 2814973003: Extract ClosedWorldRefiner implementation from ClosedWorldImpl to 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 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 7 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/backend_api.dart' 10 import '../common/backend_api.dart'
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 .getThisType(commonElements.jsExtendableArrayClass); 778 .getThisType(commonElements.jsExtendableArrayClass);
779 779
780 validateInterceptorImplementsAllObjectMethods( 780 validateInterceptorImplementsAllObjectMethods(
781 commonElements.jsInterceptorClass); 781 commonElements.jsInterceptorClass);
782 // The null-interceptor must also implement *all* methods. 782 // The null-interceptor must also implement *all* methods.
783 validateInterceptorImplementsAllObjectMethods(commonElements.jsNullClass); 783 validateInterceptorImplementsAllObjectMethods(commonElements.jsNullClass);
784 } 784 }
785 785
786 void onResolutionComplete( 786 void onResolutionComplete(
787 ClosedWorld closedWorld, ClosedWorldRefiner closedWorldRefiner) { 787 ClosedWorld closedWorld, ClosedWorldRefiner closedWorldRefiner) {
788 for (Entity entity in compiler.enqueuer.resolution.processedEntities) { 788 for (MemberEntity entity
789 in compiler.enqueuer.resolution.processedEntities) {
789 processAnnotations(entity, closedWorldRefiner); 790 processAnnotations(entity, closedWorldRefiner);
790 } 791 }
791 mirrorsDataBuilder.computeMembersNeededForReflection( 792 mirrorsDataBuilder.computeMembersNeededForReflection(
792 compiler.enqueuer.resolution.worldBuilder, closedWorld); 793 compiler.enqueuer.resolution.worldBuilder, closedWorld);
793 _backendUsage = backendUsageBuilder.close(); 794 _backendUsage = backendUsageBuilder.close();
794 _rtiNeed = rtiNeedBuilder.computeRuntimeTypesNeed( 795 _rtiNeed = rtiNeedBuilder.computeRuntimeTypesNeed(
795 compiler.enqueuer.resolution.worldBuilder, 796 compiler.enqueuer.resolution.worldBuilder,
796 closedWorld, 797 closedWorld,
797 compiler.types, 798 compiler.types,
798 commonElements, 799 commonElements,
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 Uri canonicalUri = library.canonicalUri; 1237 Uri canonicalUri = library.canonicalUri;
1237 if (canonicalUri == Uris.dart__js_helper || 1238 if (canonicalUri == Uris.dart__js_helper ||
1238 canonicalUri == Uris.dart__interceptors) { 1239 canonicalUri == Uris.dart__interceptors) {
1239 return true; 1240 return true;
1240 } 1241 }
1241 return false; 1242 return false;
1242 } 1243 }
1243 1244
1244 /// Process backend specific annotations. 1245 /// Process backend specific annotations.
1245 void processAnnotations( 1246 void processAnnotations(
1246 Element element, ClosedWorldRefiner closedWorldRefiner) { 1247 MemberElement element, ClosedWorldRefiner closedWorldRefiner) {
1247 if (element.isMalformed) { 1248 if (element.isMalformed) {
1248 // Elements that are marked as malformed during parsing or resolution 1249 // Elements that are marked as malformed during parsing or resolution
1249 // might be registered here. These should just be ignored. 1250 // might be registered here. These should just be ignored.
1250 return; 1251 return;
1251 } 1252 }
1252 1253
1253 Element implementation = element.implementation; 1254 MemberElement implementation = element.implementation;
1254 if (element.isFunction || element.isConstructor) { 1255 if (element.isFunction || element.isConstructor) {
1255 if (annotations.noInline(implementation)) { 1256 if (annotations.noInline(implementation)) {
1256 inlineCache.markAsNonInlinable(implementation); 1257 inlineCache.markAsNonInlinable(implementation);
1257 } 1258 }
1258 } 1259 }
1259 1260
1260 LibraryElement library = element.library; 1261 LibraryElement library = element.library;
1261 if (!library.isPlatformLibrary && !canLibraryUseNative(library)) return; 1262 if (!library.isPlatformLibrary && !canLibraryUseNative(library)) return;
1262 bool hasNoInline = false; 1263 bool hasNoInline = false;
1263 bool hasForceInline = false; 1264 bool hasForceInline = false;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 1610
1610 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { 1611 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) {
1611 return !selector.isGetter; 1612 return !selector.isGetter;
1612 } 1613 }
1613 1614
1614 /// Returns `true` if [member] is called from a subclass via `super`. 1615 /// Returns `true` if [member] is called from a subclass via `super`.
1615 bool isAliasedSuperMember(MemberEntity member) { 1616 bool isAliasedSuperMember(MemberEntity member) {
1616 return _aliasedSuperMembers.contains(member); 1617 return _aliasedSuperMembers.contains(member);
1617 } 1618 }
1618 } 1619 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698