| Index: frog/leg/ssa/optimize.dart
|
| ===================================================================
|
| --- frog/leg/ssa/optimize.dart (revision 5905)
|
| +++ frog/leg/ssa/optimize.dart (working copy)
|
| @@ -21,6 +21,8 @@
|
| void optimize(WorkItem work, HGraph graph) {
|
| measure(() {
|
| List<OptimizationPhase> phases = <OptimizationPhase>[
|
| + new SsaTypePropagator(compiler, false),
|
| + new SsaCheckInserter(compiler),
|
| new SsaConstantFolder(compiler),
|
| new SsaRedundantPhiEliminator(),
|
| new SsaDeadPhiEliminator(),
|
| @@ -38,7 +40,7 @@
|
| // types non-speculatively. For example, it propagates the type
|
| // array for a call to the List constructor.
|
| List<OptimizationPhase> phases = <OptimizationPhase>[
|
| - new SsaTypePropagator(compiler),
|
| + new SsaTypePropagator(compiler, true),
|
| new SsaTypeGuardBuilder(compiler, work),
|
| new SsaCheckInserter(compiler)];
|
| runPhases(graph, phases);
|
| @@ -99,7 +101,7 @@
|
| // must update the type of this instruction manually. Later
|
| // phases can then optimize this instruction based on its
|
| // type.
|
| - replacement.updateType();
|
| + replacement.type = instruction.type;
|
| }
|
| instruction = next;
|
| }
|
| @@ -297,6 +299,7 @@
|
|
|
| void visitIndex(HIndex node) {
|
| if (!node.builtin) return;
|
| + if (node.index is HBoundsCheck) return;
|
| HInstruction index = insertIntegerCheck(node, node.index);
|
| index = insertBoundsCheck(node, node.receiver, index);
|
| HIndex newInstruction = new HIndex(node.target, node.receiver, index);
|
| @@ -307,6 +310,7 @@
|
|
|
| void visitIndexAssign(HIndexAssign node) {
|
| if (!node.builtin) return;
|
| + if (node.index is HBoundsCheck) return;
|
| HInstruction index = insertIntegerCheck(node, node.index);
|
| index = insertBoundsCheck(node, node.receiver, index);
|
| HIndexAssign newInstruction =
|
|
|