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

Unified Diff: lib/compiler/implementation/ssa/optimize.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/optimize.dart
diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
index 0dae5d6913f76e9d5cdcd80595ea04f4a433e1b2..56c9f66f228068b0c42aac59d554472f23b6806c 100644
--- a/lib/compiler/implementation/ssa/optimize.dart
+++ b/lib/compiler/implementation/ssa/optimize.dart
@@ -155,7 +155,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
HInstruction input = inputs[0];
if (input.isBoolean(types)) return input;
// All values !== true are boolified to false.
- Type type = types[input].computeType(compiler);
+ DartType type = types[input].computeType(compiler);
if (type !== null && type.element !== compiler.boolClass) {
return graph.addConstantBool(false);
}
@@ -491,7 +491,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
}
HInstruction visitIs(HIs node) {
- Type type = node.typeExpression;
+ DartType type = node.typeExpression;
Element element = type.element;
if (element.kind === ElementKind.TYPE_VARIABLE) {
compiler.unimplemented("visitIs for type variables");
@@ -546,7 +546,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
} else if (expressionType.isUseful()
&& !expressionType.canBeNull()
&& !compiler.codegenWorld.rti.hasTypeArguments(type)) {
- Type receiverType = expressionType.computeType(compiler);
+ DartType receiverType = expressionType.computeType(compiler);
if (receiverType !== null) {
if (compiler.types.isSubtype(receiverType, type)) {
return graph.addConstantBool(true);
@@ -560,7 +560,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
HInstruction visitTypeConversion(HTypeConversion node) {
HInstruction value = node.inputs[0];
- Type type = types[node].computeType(compiler);
+ DartType type = types[node].computeType(compiler);
if (type.element === compiler.dynamicClass
|| type.element === compiler.objectClass) {
return value;
@@ -574,7 +574,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
HType receiverType = types[receiver];
if (!receiverType.isUseful()) return null;
if (receiverType.canBeNull()) return null;
- Type type = receiverType.computeType(compiler);
+ DartType type = receiverType.computeType(compiler);
if (type === null) return null;
return compiler.world.locateSingleField(type, selector);
}

Powered by Google App Engine
This is Rietveld 408576698