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

Unified Diff: pkg/compiler/lib/src/universe/codegen_world_builder.dart

Issue 2725933006: Reduce use of elements/resolution_types in enqueuer. (Closed)
Patch Set: Updated cf. comment. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/universe/codegen_world_builder.dart
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
index a8eb11b2dc2a9e48047bebc74238b91b1584753d..c0d7f985f491430515ce75b74f89dcdfe76f2662 100644
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
@@ -69,8 +69,7 @@ class CodegenWorldBuilderImpl implements CodegenWorldBuilder {
/// directly instantiated classes.
///
/// See [_directlyInstantiatedClasses].
- final Set<ResolutionDartType> _instantiatedTypes =
- new Set<ResolutionDartType>();
+ final Set<InterfaceType> _instantiatedTypes = new Set<InterfaceType>();
/// Classes implemented by directly instantiated classes.
final Set<ClassElement> _implementedClasses = new Set<ClassElement>();
@@ -168,7 +167,7 @@ class CodegenWorldBuilderImpl implements CodegenWorldBuilder {
///
/// See [directlyInstantiatedClasses].
// TODO(johnniwinther): Improve semantic precision.
- Iterable<ResolutionDartType> get instantiatedTypes => _instantiatedTypes;
+ Iterable<InterfaceType> get instantiatedTypes => _instantiatedTypes;
/// Register [type] as (directly) instantiated.
///
@@ -325,13 +324,13 @@ class CodegenWorldBuilderImpl implements CodegenWorldBuilder {
_invokedSetters.forEach(f);
}
- ResolutionDartType registerIsCheck(ResolutionDartType type) {
+ void registerIsCheck(ResolutionDartType type) {
type = type.unaliased;
// Even in checked mode, type annotations for return type and argument
// types do not imply type checks, so there should never be a check
// against the type variable of a typedef.
+ assert(!type.isTypeVariable || !type.element.enclosingElement.isTypedef);
isChecks.add(type);
- return type;
}
void _registerStaticUse(StaticUse staticUse) {
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | pkg/compiler/lib/src/universe/resolution_world_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698