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

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

Issue 2942863002: Compile and run Hello World! (Closed)
Patch Set: Cleanup Created 3 years, 6 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_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 1409b1c3496c23b07b893523dc5f8b9be08e6251..6593fdddfdad2e926c267b01a86599a01e63fe28 100644
--- a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
+++ b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
@@ -8,12 +8,7 @@ import '../common.dart';
import '../common_elements.dart';
import '../elements/elements.dart' show ClassElement, MethodElement;
import '../elements/entities.dart';
-import '../elements/resolution_types.dart'
- show
- ResolutionDartType,
- ResolutionFunctionType,
- ResolutionInterfaceType,
- ResolutionTypeVariableType;
+import '../elements/resolution_types.dart' show ResolutionFunctionType;
import '../elements/types.dart';
import '../js_backend/runtime_types.dart'
show
@@ -34,25 +29,26 @@ class TypeTestRegistry {
* `x is Set<String>` then the ClassElement `Set` will occur once in
* [checkedClasses].
*/
- Set<ClassElement> checkedClasses;
+ Set<ClassEntity> checkedClasses;
/**
* The set of function types that checked, both explicity through tests of
* typedefs and implicitly through type annotations in checked mode.
*/
- Set<ResolutionFunctionType> checkedFunctionTypes;
+ Set<FunctionType> checkedFunctionTypes;
/// After [computeNeededClasses] this set only contains classes that are only
/// used for RTI.
Set<ClassEntity> _rtiNeededClasses;
- Iterable<ClassElement> cachedClassesUsingTypeVariableTests;
+ Iterable<ClassEntity> cachedClassesUsingTypeVariableTests;
- Iterable<ClassElement> get classesUsingTypeVariableTests {
+ Iterable<ClassEntity> get classesUsingTypeVariableTests {
if (cachedClassesUsingTypeVariableTests == null) {
cachedClassesUsingTypeVariableTests = _codegenWorldBuilder.isChecks
- .where((ResolutionDartType t) => t is ResolutionTypeVariableType)
- .map((ResolutionTypeVariableType v) => v.element.enclosingClass)
+ .where((DartType t) =>
+ t is TypeVariableType && t.element.typeDeclaration is ClassEntity)
+ .map((TypeVariableType v) => v.element.typeDeclaration)
.toList();
}
return cachedClassesUsingTypeVariableTests;
@@ -185,12 +181,12 @@ class TypeTestRegistry {
_codegenWorldBuilder, classesUsingTypeVariableTests);
_rtiChecks = rtiChecksBuilder.computeRequiredChecks(_codegenWorldBuilder);
- checkedClasses = new Set<ClassElement>();
- checkedFunctionTypes = new Set<ResolutionFunctionType>();
- _codegenWorldBuilder.isChecks.forEach((ResolutionDartType t) {
- if (t is ResolutionInterfaceType) {
+ checkedClasses = new Set<ClassEntity>();
+ checkedFunctionTypes = new Set<FunctionType>();
+ _codegenWorldBuilder.isChecks.forEach((DartType t) {
+ if (t is InterfaceType) {
checkedClasses.add(t.element);
- } else if (t is ResolutionFunctionType) {
+ } else if (t is FunctionType) {
checkedFunctionTypes.add(t);
}
});

Powered by Google App Engine
This is Rietveld 408576698