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

Side by Side Diff: pkg/compiler/lib/src/world.dart

Issue 3002313002: Use KernelTypeGraphBuilder in KernelInferrerEngine (Closed)
Patch Set: Updated cf. comments. Created 3 years, 3 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/universe/resolution_world_builder.dart ('k') | no next file » | 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 dart2js.world; 5 library dart2js.world;
6 6
7 import 'common.dart'; 7 import 'common.dart';
8 import 'constants/constant_system.dart'; 8 import 'constants/constant_system.dart';
9 import 'common_elements.dart' show CommonElements, ElementEnvironment; 9 import 'common_elements.dart' show CommonElements, ElementEnvironment;
10 import 'elements/entities.dart'; 10 import 'elements/entities.dart';
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 CommonElements get commonElements; 57 CommonElements get commonElements;
58 58
59 CommonMasks get commonMasks; 59 CommonMasks get commonMasks;
60 60
61 ConstantSystem get constantSystem; 61 ConstantSystem get constantSystem;
62 62
63 RuntimeTypesNeed get rtiNeed; 63 RuntimeTypesNeed get rtiNeed;
64 64
65 Iterable<ClassEntity> get liveNativeClasses; 65 Iterable<ClassEntity> get liveNativeClasses;
66 66
67 Iterable<MemberEntity> get processedMembers;
68
67 /// Returns `true` if [cls] is either directly or indirectly instantiated. 69 /// Returns `true` if [cls] is either directly or indirectly instantiated.
68 bool isInstantiated(ClassEntity cls); 70 bool isInstantiated(ClassEntity cls);
69 71
70 /// Returns `true` if [cls] is directly instantiated. This means that at 72 /// Returns `true` if [cls] is directly instantiated. This means that at
71 /// runtime instances of exactly [cls] are assumed to exist. 73 /// runtime instances of exactly [cls] are assumed to exist.
72 bool isDirectlyInstantiated(ClassEntity cls); 74 bool isDirectlyInstantiated(ClassEntity cls);
73 75
74 /// Returns `true` if [cls] is abstractly instantiated. This means that at 76 /// Returns `true` if [cls] is abstractly instantiated. This means that at
75 /// runtime instances of [cls] or unknown subclasses of [cls] are assumed to 77 /// runtime instances of [cls] or unknown subclasses of [cls] are assumed to
76 /// exist. 78 /// exist.
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 // TODO(johnniwinther): Can this be derived from [ClassSet]s? 456 // TODO(johnniwinther): Can this be derived from [ClassSet]s?
455 final Set<ClassEntity> _implementedClasses; 457 final Set<ClassEntity> _implementedClasses;
456 458
457 final Iterable<MemberEntity> liveInstanceMembers; 459 final Iterable<MemberEntity> liveInstanceMembers;
458 460
459 /// Members that are written either directly or through a setter selector. 461 /// Members that are written either directly or through a setter selector.
460 final Iterable<MemberEntity> assignedInstanceMembers; 462 final Iterable<MemberEntity> assignedInstanceMembers;
461 463
462 final Iterable<ClassEntity> liveNativeClasses; 464 final Iterable<ClassEntity> liveNativeClasses;
463 465
466 final Iterable<MemberEntity> processedMembers;
467
464 ClosedWorldBase( 468 ClosedWorldBase(
465 this.elementEnvironment, 469 this.elementEnvironment,
466 this.dartTypes, 470 this.dartTypes,
467 this.commonElements, 471 this.commonElements,
468 this.constantSystem, 472 this.constantSystem,
469 this.nativeData, 473 this.nativeData,
470 this.interceptorData, 474 this.interceptorData,
471 this.backendUsage, 475 this.backendUsage,
472 Set<ClassEntity> implementedClasses, 476 Set<ClassEntity> implementedClasses,
473 this.liveNativeClasses, 477 this.liveNativeClasses,
474 this.liveInstanceMembers, 478 this.liveInstanceMembers,
475 this.assignedInstanceMembers, 479 this.assignedInstanceMembers,
480 this.processedMembers,
476 Set<TypedefEntity> allTypedefs, 481 Set<TypedefEntity> allTypedefs,
477 this.mixinUses, 482 this.mixinUses,
478 this.typesImplementedBySubclasses, 483 this.typesImplementedBySubclasses,
479 Map<ClassEntity, ClassHierarchyNode> classHierarchyNodes, 484 Map<ClassEntity, ClassHierarchyNode> classHierarchyNodes,
480 Map<ClassEntity, ClassSet> classSets) 485 Map<ClassEntity, ClassSet> classSets)
481 : this._implementedClasses = implementedClasses, 486 : this._implementedClasses = implementedClasses,
482 this._allTypedefs = allTypedefs, 487 this._allTypedefs = allTypedefs,
483 this._classHierarchyNodes = classHierarchyNodes, 488 this._classHierarchyNodes = classHierarchyNodes,
484 this._classSets = classSets { 489 this._classSets = classSets {
485 _commonMasks = new CommonMasks(this); 490 _commonMasks = new CommonMasks(this);
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 ConstantSystem constantSystem, 1204 ConstantSystem constantSystem,
1200 NativeData nativeData, 1205 NativeData nativeData,
1201 InterceptorData interceptorData, 1206 InterceptorData interceptorData,
1202 BackendUsage backendUsage, 1207 BackendUsage backendUsage,
1203 ResolutionWorldBuilder resolutionWorldBuilder, 1208 ResolutionWorldBuilder resolutionWorldBuilder,
1204 RuntimeTypesNeedBuilder rtiNeedBuilder, 1209 RuntimeTypesNeedBuilder rtiNeedBuilder,
1205 Set<ClassEntity> implementedClasses, 1210 Set<ClassEntity> implementedClasses,
1206 Iterable<ClassEntity> liveNativeClasses, 1211 Iterable<ClassEntity> liveNativeClasses,
1207 Iterable<MemberEntity> liveInstanceMembers, 1212 Iterable<MemberEntity> liveInstanceMembers,
1208 Iterable<MemberEntity> assignedInstanceMembers, 1213 Iterable<MemberEntity> assignedInstanceMembers,
1214 Iterable<MemberEntity> processedMembers,
1209 Set<TypedefEntity> allTypedefs, 1215 Set<TypedefEntity> allTypedefs,
1210 Map<ClassEntity, Set<ClassEntity>> mixinUses, 1216 Map<ClassEntity, Set<ClassEntity>> mixinUses,
1211 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses, 1217 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses,
1212 Map<ClassEntity, ClassHierarchyNode> classHierarchyNodes, 1218 Map<ClassEntity, ClassHierarchyNode> classHierarchyNodes,
1213 Map<ClassEntity, ClassSet> classSets}) 1219 Map<ClassEntity, ClassSet> classSets})
1214 : super( 1220 : super(
1215 elementEnvironment, 1221 elementEnvironment,
1216 dartTypes, 1222 dartTypes,
1217 commonElements, 1223 commonElements,
1218 constantSystem, 1224 constantSystem,
1219 nativeData, 1225 nativeData,
1220 interceptorData, 1226 interceptorData,
1221 backendUsage, 1227 backendUsage,
1222 implementedClasses, 1228 implementedClasses,
1223 liveNativeClasses, 1229 liveNativeClasses,
1224 liveInstanceMembers, 1230 liveInstanceMembers,
1225 assignedInstanceMembers, 1231 assignedInstanceMembers,
1232 processedMembers,
1226 allTypedefs, 1233 allTypedefs,
1227 mixinUses, 1234 mixinUses,
1228 typesImplementedBySubclasses, 1235 typesImplementedBySubclasses,
1229 classHierarchyNodes, 1236 classHierarchyNodes,
1230 classSets) { 1237 classSets) {
1231 computeRtiNeed(resolutionWorldBuilder, rtiNeedBuilder, 1238 computeRtiNeed(resolutionWorldBuilder, rtiNeedBuilder,
1232 enableTypeAssertions: options.enableTypeAssertions); 1239 enableTypeAssertions: options.enableTypeAssertions);
1233 } 1240 }
1234 1241
1235 bool checkClass(ClassElement cls) => cls.isDeclaration; 1242 bool checkClass(ClassElement cls) => cls.isDeclaration;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 void computeRtiNeed(ResolutionWorldBuilder resolutionWorldBuilder, 1360 void computeRtiNeed(ResolutionWorldBuilder resolutionWorldBuilder,
1354 RuntimeTypesNeedBuilder rtiNeedBuilder, 1361 RuntimeTypesNeedBuilder rtiNeedBuilder,
1355 {bool enableTypeAssertions}) { 1362 {bool enableTypeAssertions}) {
1356 _rtiNeed = rtiNeedBuilder.computeRuntimeTypesNeed( 1363 _rtiNeed = rtiNeedBuilder.computeRuntimeTypesNeed(
1357 resolutionWorldBuilder, this, 1364 resolutionWorldBuilder, this,
1358 enableTypeAssertions: enableTypeAssertions); 1365 enableTypeAssertions: enableTypeAssertions);
1359 } 1366 }
1360 1367
1361 RuntimeTypesNeed get rtiNeed => _rtiNeed; 1368 RuntimeTypesNeed get rtiNeed => _rtiNeed;
1362 } 1369 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/resolution_world_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698