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

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

Issue 2366363002: Move remaining functionality from ClassWorld to ClosedWorld (Closed)
Patch Set: Created 4 years, 2 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 '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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 if (elements == null) return null; 918 if (elements == null) return null;
919 return elements 919 return elements
920 .where((element) => classesMixedIntoInterceptedClasses 920 .where((element) => classesMixedIntoInterceptedClasses
921 .contains(element.enclosingClass)) 921 .contains(element.enclosingClass))
922 .toSet(); 922 .toSet();
923 }); 923 });
924 924
925 if (elements == null) return false; 925 if (elements == null) return false;
926 if (elements.isEmpty) return false; 926 if (elements.isEmpty) return false;
927 return elements.any((element) { 927 return elements.any((element) {
928 return selector.applies(element, this) && 928 return selector.applies(element) &&
929 (mask == null || 929 (mask == null ||
930 mask.canHit(element, selector, compiler.closedWorld)); 930 mask.canHit(element, selector, compiler.closedWorld));
931 }); 931 });
932 } 932 }
933 933
934 /// True if the given class is an internal class used for type inference 934 /// True if the given class is an internal class used for type inference
935 /// and never exists at runtime. 935 /// and never exists at runtime.
936 bool isCompileTimeOnlyClass(ClassElement class_) { 936 bool isCompileTimeOnlyClass(ClassElement class_) {
937 return class_ == helpers.jsPositiveIntClass || 937 return class_ == helpers.jsPositiveIntClass ||
938 class_ == helpers.jsUInt32Class || 938 class_ == helpers.jsUInt32Class ||
(...skipping 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after
3250 3250
3251 @override 3251 @override
3252 void onImpactUsed(ImpactUseCase impactUse) { 3252 void onImpactUsed(ImpactUseCase impactUse) {
3253 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { 3253 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) {
3254 // TODO(johnniwinther): Allow emptying when serialization has been 3254 // TODO(johnniwinther): Allow emptying when serialization has been
3255 // performed. 3255 // performed.
3256 resolution.emptyCache(); 3256 resolution.emptyCache();
3257 } 3257 }
3258 } 3258 }
3259 } 3259 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698