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

Unified Diff: lib/compiler/implementation/ssa/types.dart

Issue 10911007: Rename Type to DartType to avoid conflicts with the class Type in the core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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: lib/compiler/implementation/ssa/types.dart
diff --git a/lib/compiler/implementation/ssa/types.dart b/lib/compiler/implementation/ssa/types.dart
index c2d75f2be379befddc1cc3cab95b138506fb7a4b..fd3c1906d18c21b0723bba4c49188a4d962edd4f 100644
--- a/lib/compiler/implementation/ssa/types.dart
+++ b/lib/compiler/implementation/ssa/types.dart
@@ -9,7 +9,7 @@ abstract class HType {
* Returns an [HType] that represents [type] and all types that have
* [type] as supertype.
*/
- factory HType.fromBoundedType(Type type,
+ factory HType.fromBoundedType(DartType type,
Compiler compiler,
[bool canBeNull = false]) {
Element element = type.element;
@@ -87,7 +87,7 @@ abstract class HType {
/** Alias for isReadableArray. */
bool isArray() => isReadableArray();
- abstract Type computeType(Compiler compiler);
+ abstract DartType computeType(Compiler compiler);
/**
* The intersection of two types is the intersection of its values. For
@@ -125,7 +125,7 @@ abstract class HAnalysisType extends HType {
const HAnalysisType(this.name);
String toString() => name;
- Type computeType(Compiler compiler) => null;
+ DartType computeType(Compiler compiler) => null;
}
class HUnknownType extends HAnalysisType {
@@ -158,7 +158,7 @@ class HNullType extends HPrimitiveType {
bool isNull() => true;
String toString() => 'null';
- Type computeType(Compiler compiler) => null;
+ DartType computeType(Compiler compiler) => null;
HType union(HType other) {
if (other.isConflicting()) return HType.NULL;
@@ -191,7 +191,7 @@ class HBooleanOrNullType extends HPrimitiveOrNullType {
String toString() => "boolean or null";
bool isBooleanOrNull() => true;
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.boolClass.computeType(compiler);
}
@@ -218,7 +218,7 @@ class HBooleanType extends HPrimitiveType {
bool isBoolean() => true;
String toString() => "boolean";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.boolClass.computeType(compiler);
}
@@ -244,7 +244,7 @@ class HNumberOrNullType extends HPrimitiveOrNullType {
bool isNumberOrNull() => true;
String toString() => "number or null";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.numClass.computeType(compiler);
}
@@ -275,7 +275,7 @@ class HNumberType extends HPrimitiveType {
bool isNumber() => true;
String toString() => "number";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.numClass.computeType(compiler);
}
@@ -303,7 +303,7 @@ class HIntegerOrNullType extends HNumberOrNullType {
bool isIntegerOrNull() => true;
String toString() => "integer or null";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.intClass.computeType(compiler);
}
@@ -336,7 +336,7 @@ class HIntegerType extends HNumberType {
bool isInteger() => true;
String toString() => "integer";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.intClass.computeType(compiler);
}
@@ -368,7 +368,7 @@ class HDoubleOrNullType extends HNumberOrNullType {
bool isDoubleOrNull() => true;
String toString() => "double or null";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.doubleClass.computeType(compiler);
}
@@ -401,7 +401,7 @@ class HDoubleType extends HNumberType {
bool isDouble() => true;
String toString() => "double";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.doubleClass.computeType(compiler);
}
@@ -433,7 +433,7 @@ class HIndexablePrimitiveType extends HPrimitiveType {
bool isIndexablePrimitive() => true;
String toString() => "indexable";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
// TODO(ngeoffray): Represent union types.
return null;
}
@@ -467,7 +467,7 @@ class HStringOrNullType extends HPrimitiveOrNullType {
bool isStringOrNull() => true;
String toString() => "String or null";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.stringClass.computeType(compiler);
}
@@ -512,7 +512,7 @@ class HStringType extends HIndexablePrimitiveType {
bool isString() => true;
String toString() => "String";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.stringClass.computeType(compiler);
}
@@ -543,7 +543,7 @@ class HReadableArrayType extends HIndexablePrimitiveType {
bool isReadableArray() => true;
String toString() => "readable array";
- Type computeType(Compiler compiler) {
+ DartType computeType(Compiler compiler) {
return compiler.listClass.computeType(compiler);
}
@@ -618,7 +618,7 @@ class HExtendableArrayType extends HMutableArrayType {
}
class HBoundedType extends HType {
- final Type type;
+ final DartType type;
final bool _canBeNull;
final bool _isExact;
@@ -630,14 +630,14 @@ class HBoundedType extends HType {
bool isExact() => _isExact;
- const HBoundedType(Type this.type,
+ const HBoundedType(DartType this.type,
[bool canBeNull = false, isExact = false])
: _canBeNull = canBeNull, _isExact = isExact;
- const HBoundedType.exact(Type type) : this(type, isExact: true);
- const HBoundedType.withNull(Type type) : this(type, canBeNull: true);
- const HBoundedType.nonNull(Type type) : this(type);
+ const HBoundedType.exact(DartType type) : this(type, isExact: true);
+ const HBoundedType.withNull(DartType type) : this(type, canBeNull: true);
+ const HBoundedType.nonNull(DartType type) : this(type);
- Type computeType(Compiler compiler) => type;
+ DartType computeType(Compiler compiler) => type;
Element lookupMember(SourceString name) {
if (!isExact()) return null;
@@ -695,13 +695,13 @@ class HBoundedType extends HType {
}
class HBoundedPotentialPrimitiveType extends HBoundedType {
- const HBoundedPotentialPrimitiveType(Type type, bool canBeNull)
+ const HBoundedPotentialPrimitiveType(DartType type, bool canBeNull)
: super(type, canBeNull, false);
bool canBePrimitive() => true;
}
class HBoundedPotentialPrimitiveArray extends HBoundedPotentialPrimitiveType {
- const HBoundedPotentialPrimitiveArray(Type type, bool canBeNull)
+ const HBoundedPotentialPrimitiveArray(DartType type, bool canBeNull)
: super(type, canBeNull);
HType union(HType other) {
@@ -728,7 +728,7 @@ class HBoundedPotentialPrimitiveArray extends HBoundedPotentialPrimitiveType {
}
class HBoundedPotentialPrimitiveString extends HBoundedPotentialPrimitiveType {
- const HBoundedPotentialPrimitiveString(Type type, bool canBeNull)
+ const HBoundedPotentialPrimitiveString(DartType type, bool canBeNull)
: super(type, canBeNull);
HType union(HType other) {

Powered by Google App Engine
This is Rietveld 408576698