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

Unified Diff: pkg/compiler/lib/src/dart_types.dart

Issue 2595583002: Remove StatementType (Closed)
Patch Set: Updated cf. comment 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart_types.dart
diff --git a/pkg/compiler/lib/src/dart_types.dart b/pkg/compiler/lib/src/dart_types.dart
index 93b5ec615529d9f94172a15a99ef3d201832f1fc..b151ed99b75193dfdc0ca3a52022f190c841e35f 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -17,7 +17,6 @@ import 'util/util.dart' show equalElements;
enum TypeKind {
FUNCTION,
INTERFACE,
- STATEMENT,
TYPEDEF,
TYPE_VARIABLE,
MALFORMED_TYPE,
@@ -262,23 +261,6 @@ class MethodTypeVariableType extends TypeVariableType {
get containsMethodTypeVariableType => true;
}
-/// Internal type representing the result of analyzing a statement.
-class StatementType extends DartType {
- Element get element => null;
-
- TypeKind get kind => TypeKind.STATEMENT;
-
- String get name => 'statement';
-
- const StatementType();
-
- DartType subst(List<DartType> arguments, List<DartType> parameters) => this;
-
- accept(DartTypeVisitor visitor, var argument) {
- return visitor.visitStatementType(this, argument);
- }
-}
-
class VoidType extends DartType {
const VoidType();
@@ -952,8 +934,6 @@ abstract class DartTypeVisitor<R, A> {
R visitMalformedType(MalformedType type, A argument) => null;
- R visitStatementType(StatementType type, A argument) => null;
-
R visitInterfaceType(InterfaceType type, A argument) => null;
R visitTypedefType(TypedefType type, A argument) => null;
@@ -981,10 +961,6 @@ abstract class BaseDartTypeVisitor<R, A> extends DartTypeVisitor<R, A> {
R visitMalformedType(MalformedType type, A argument) =>
visitType(type, argument);
- @override
- R visitStatementType(StatementType type, A argument) =>
- visitType(type, argument);
-
R visitGenericType(GenericType type, A argument) => visitType(type, argument);
@override
@@ -1551,17 +1527,6 @@ class Types implements DartTypes {
// [b] is a malformed or statement type => a > b.
return 1;
}
- if (a.kind == TypeKind.STATEMENT) {
- if (b.kind == TypeKind.STATEMENT) {
- return 0;
- } else {
- // [b] is a malformed type => a > b.
- return 1;
- }
- } else if (b.kind == TypeKind.STATEMENT) {
- // [a] is a malformed type => a < b.
- return -1;
- }
assert(a.isMalformed);
assert(b.isMalformed);
// TODO(johnniwinther): Can we do this better?
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698