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

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

Issue 2675103003: Refactor BackendHelpers to be reusageable with KernelWorldBuilder (Closed)
Patch Set: Updated cf. comments Created 3 years, 10 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/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 a1761209eae85b8c523008cb814b5b34e3f58e84..e6e5a5d4faf752bc5c0ffdd7f04806f3e228feef 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -29,7 +29,7 @@ abstract class RuntimeTypes {
Iterable<ClassElement> get classesUsingTypeVariableExpression;
void registerClassUsingTypeVariableExpression(ClassElement cls);
- void registerRtiDependency(Element element, Element dependency);
+ void registerRtiDependency(ClassElement element, ClassElement dependency);
void registerTypeVariableBoundsSubtypeCheck(
ResolutionDartType typeArgument, ResolutionDartType bound);
@@ -142,9 +142,9 @@ class _RuntimeTypes implements RuntimeTypes {
}
@override
- void registerRtiDependency(Element element, Element dependency) {
+ void registerRtiDependency(ClassElement element, ClassElement dependency) {
// We're not dealing with typedef for now.
- if (element == null || !element.isClass || !dependency.isClass) return;
+ assert(element != null);
Set<ClassElement> classes =
rtiDependencies.putIfAbsent(element, () => new Set<ClassElement>());
classes.add(dependency);

Powered by Google App Engine
This is Rietveld 408576698