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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart

Issue 24952003: Change TypeMask.base to be a ClassElement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Moar declaration. Created 7 years, 3 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: sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
index d279287cbdf60fbb92bf5c16a70590becba80138..7c8c1142c405ac742bf7c5503701986f183451b5 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
@@ -10,7 +10,7 @@ abstract class SsaTypePropagator extends HBaseVisitor
final Map<int, HInstruction> workmap = new Map<int, HInstruction>();
final List<int> worklist = new List<int>();
final Map<HInstruction, Function> pendingOptimizations =
- new Map<HInstruction, Function>();
+ new Map<HInstruction, Function>();
final Compiler compiler;
String get name => 'type propagator';
@@ -176,7 +176,7 @@ abstract class SsaTypePropagator extends HBaseVisitor
HTypeConversion converted = new HTypeConversion(
null, kind, type, input, selector);
instruction.block.addBefore(instruction, converted);
- input.replaceAllUsersDominatedBy(instruction, converted);
+ input.replaceAllUsersDominatedBy(instruction, converted);
}
bool isCheckEnoughForNsmOrAe(HInstruction instruction,
@@ -211,7 +211,7 @@ abstract class SsaTypePropagator extends HBaseVisitor
if (targets.length == 1) {
Element target = targets.first;
ClassElement cls = target.getEnclosingClass();
- HType type = new HType.nonNullSubclass(cls.rawType, compiler);
+ HType type = new HType.nonNullSubclass(cls, compiler);
// TODO(ngeoffray): We currently only optimize on primitive
// types.
if (!type.isPrimitive(compiler)) return false;
@@ -436,7 +436,7 @@ class SsaSpeculativeTypePropagator extends SsaTypePropagator {
}
return desiredType;
}
-
+
bool hasBeenSpeculativelyOptimized(HInstruction instruction) {
return savedTypes.containsKey(instruction);
}

Powered by Google App Engine
This is Rietveld 408576698