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

Unified Diff: pkg/compiler/lib/src/js_emitter/type_test_registry.dart

Issue 2981543002: Handle type variable test and typed list literal. (Closed)
Patch Set: Updated cf. comment Created 3 years, 5 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
« no previous file with comments | « pkg/compiler/lib/src/common_elements.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/type_test_registry.dart
diff --git a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
index b6d7c76fe843e5e04064677731c26a30992edafa..363164c0b613b67967de56d3d825c1cd30c90b62 100644
--- a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
+++ b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
@@ -9,7 +9,6 @@ import '../common_elements.dart';
import '../elements/elements.dart' show MethodElement;
import '../elements/entities.dart';
import '../elements/types.dart' show DartType;
-import '../elements/resolution_types.dart' show ResolutionTypeVariableType;
import '../elements/types.dart';
import '../js_backend/runtime_types.dart'
show
@@ -47,10 +46,11 @@ class TypeTestRegistry {
Iterable<ClassEntity> get classesUsingTypeVariableTests {
if (cachedClassesUsingTypeVariableTests == null) {
cachedClassesUsingTypeVariableTests = _codegenWorldBuilder.isChecks
- .where((DartType t) => t is ResolutionTypeVariableType)
- .map((DartType _v) {
- ResolutionTypeVariableType v = _v;
- return v.element.enclosingClass;
+ .where((DartType t) =>
+ t is TypeVariableType && t.element.typeDeclaration is ClassEntity)
+ .map<ClassEntity>((DartType _v) {
+ TypeVariableType v = _v;
+ return v.element.typeDeclaration;
}).toList();
}
return cachedClassesUsingTypeVariableTests;
@@ -168,6 +168,7 @@ class TypeTestRegistry {
liveMembers.where((MemberEntity element) {
return canBeReflectedAsFunction(element) && canBeReified(element);
}).forEach((_function) {
+ // TODO(redemption): Support entities.
MethodElement function = _function;
FunctionType type = function.type;
for (ClassEntity cls in _rtiChecks.getReferencedClasses(type)) {
« no previous file with comments | « pkg/compiler/lib/src/common_elements.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698