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

Unified Diff: pkg/compiler/lib/src/js_backend/runtime_types.dart

Issue 2569733002: Even less reliance on Compiler.closedWorld (Closed)
Patch Set: Updated cf. comments. Created 4 years 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/js_backend/runtime_types.dart
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 590e99f5ec32df5bb9d23de9eceed7dd7bda07bf..c8bc0a43283fcf63b28eab98541e701d4d9cf540 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -34,7 +34,8 @@ abstract class RuntimeTypes {
Set<ClassElement> getClassesUsedInSubstitutions(
JavaScriptBackend backend, TypeChecks checks);
- void computeClassesNeedingRti();
+ void computeClassesNeedingRti(
+ ResolutionWorldBuilder resolverWorld, ClosedWorld closedWorld);
/// Compute the required type checkes and substitutions for the given
/// instantitated and checked classes.
@@ -214,7 +215,8 @@ class _RuntimeTypes implements RuntimeTypes {
}
@override
- void computeClassesNeedingRti() {
+ void computeClassesNeedingRti(
+ ResolutionWorldBuilder resolverWorld, ClosedWorld closedWorld) {
// Find the classes that need runtime type information. Such
// classes are:
// (1) used in a is check with type variables,
@@ -227,7 +229,7 @@ class _RuntimeTypes implements RuntimeTypes {
classesNeedingRti.add(cls);
// TODO(ngeoffray): This should use subclasses, not subtypes.
- compiler.closedWorld.forEachStrictSubtypeOf(cls, (ClassElement sub) {
+ closedWorld.forEachStrictSubtypeOf(cls, (ClassElement sub) {
potentiallyAddForRti(sub);
});
@@ -240,7 +242,7 @@ class _RuntimeTypes implements RuntimeTypes {
}
Set<ClassElement> classesUsingTypeVariableTests = new Set<ClassElement>();
- compiler.resolverWorld.isChecks.forEach((DartType type) {
+ resolverWorld.isChecks.forEach((DartType type) {
if (type.isTypeVariable) {
TypeVariableElement variable = type.element;
// GENERIC_METHODS: When generic method support is complete enough to
« no previous file with comments | « pkg/compiler/lib/src/js_backend/patch_resolver.dart ('k') | pkg/compiler/lib/src/kernel/kernel_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698