Chromium Code Reviews| Index: dart/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/dart/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
| index 9af57d76aab70d0f984a30e2e7aae83defd00a4a..be9aa628df0d43d24aedf11cfd469fa7b18862c1 100644 |
| --- a/dart/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
| +++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
| @@ -795,11 +795,6 @@ abstract class HInstruction implements Spannable { |
| void setUseGvn() { _useGvn = true; } |
| void clearUseGvn() { _useGvn = false; } |
| - void updateInput(int i, HInstruction insn) { |
| - assert(insn != null); |
| - inputs[i] = insn; |
| - } |
| - |
| /** |
| * A pure instruction is an instruction that does not have any side |
| * effect, nor any dependency. They can be moved anywhere in the |
| @@ -981,23 +976,6 @@ abstract class HInstruction implements Spannable { |
| bool isInBasicBlock() => block != null; |
| - String inputsToString() { |
| - void addAsCommaSeparated(StringBuffer buffer, List<HInstruction> list) { |
| - for (int i = 0; i < list.length; i++) { |
| - if (i != 0) buffer.write(', '); |
| - buffer.write("@${list[i].id}"); |
| - } |
| - } |
| - |
| - StringBuffer buffer = new StringBuffer(); |
| - buffer.write('('); |
| - addAsCommaSeparated(buffer, inputs); |
| - buffer.write(') - used at ['); |
| - addAsCommaSeparated(buffer, usedBy); |
| - buffer.write(']'); |
| - return buffer.toString(); |
| - } |
| - |
| bool gvnEquals(HInstruction other) { |
| assert(useGvn() && other.useGvn()); |
| // Check that the type and the sideEffects match. |
| @@ -1386,13 +1364,6 @@ class HInvokeDynamicMethod extends HInvokeDynamic { |
| String toString() => 'invoke dynamic method: $selector'; |
| accept(HVisitor visitor) => visitor.visitInvokeDynamicMethod(this); |
| - |
| - bool isIndexOperatorOnIndexablePrimitive(Compiler compiler) { |
| - return isInterceptedCall |
| - && selector.kind == SelectorKind.INDEX |
| - && selector.name == '[]' |
| - && inputs[1].isIndexablePrimitive(compiler); |
| - } |
| } |
| abstract class HInvokeDynamicField extends HInvokeDynamic { |
| @@ -1904,27 +1875,6 @@ class HLoopBranch extends HConditionalBranch { |
| : super(<HInstruction>[condition]); |
| toString() => 'loop-branch'; |
| accept(HVisitor visitor) => visitor.visitLoopBranch(this); |
| - |
| - bool isDoWhile() { |
| - return identical(kind, DO_WHILE_LOOP); |
| - } |
| - |
| - HBasicBlock computeLoopHeader() { |
| - HBasicBlock result; |
| - if (isDoWhile()) { |
| - // In case of a do/while, the successor is a block that avoids |
| - // a critical edge and branchs to the loop header. |
| - result = block.successors[0].successors[0]; |
| - } else { |
| - // For other loops, the loop header might be up the dominator |
| - // tree if the loop condition has control flow. |
| - result = block; |
| - while (!result.isLoopHeader()) result = result.dominator; |
| - } |
| - |
| - assert(result.isLoopHeader()); |
| - return result; |
| - } |
| } |
| class HConstant extends HInstruction { |
| @@ -2024,15 +1974,6 @@ class HPhi extends HInstruction { |
| input.usedBy.add(this); |
| } |
| - bool isLogicalOperator() => logicalOperatorType != IS_NOT_LOGICAL_OPERATOR; |
| - |
| - String logicalOperator() { |
| - assert(isLogicalOperator()); |
| - if (logicalOperatorType == IS_AND) return "&&"; |
| - assert(logicalOperatorType == IS_OR); |
| - return "||"; |
| - } |
| - |
| toString() => 'phi'; |
| accept(HVisitor visitor) => visitor.visitPhi(this); |
| } |
| @@ -2550,19 +2491,6 @@ class HLoopInformation { |
| workQueue.addAll(block.predecessors); |
| } |
| } |
| - |
| - HBasicBlock getLastBackEdge() { |
| - int maxId = -1; |
| - HBasicBlock result = null; |
| - for (int i = 0, length = backEdges.length; i < length; i++) { |
| - HBasicBlock current = backEdges[i]; |
| - if (current.id > maxId) { |
| - maxId = current.id; |
| - result = current; |
| - } |
| - } |
| - return result; |
| - } |
| } |
| @@ -2612,7 +2540,6 @@ abstract class HStatementInformationVisitor { |
| bool visitIfInfo(HIfBlockInformation info); |
| bool visitTryInfo(HTryBlockInformation info); |
| bool visitSwitchInfo(HSwitchBlockInformation info); |
| - bool visitSequenceInfo(HStatementSequenceInformation info); |
|
Johnni Winther
2013/12/03 11:52:31
Only remove this together with HStatementSequenceI
ahe
2013/12/04 11:45:43
Keeping these for now and I'll use it to implement
|
| // Pseudo-structure embedding a dominator-based traversal into |
| // the block-structure traversal. This will eventually go away. |
| bool visitSubGraphInfo(HSubGraphBlockInformation info); |
| @@ -2620,7 +2547,6 @@ abstract class HStatementInformationVisitor { |
| abstract class HExpressionInformationVisitor { |
| - bool visitAndOrInfo(HAndOrBlockInformation info); |
|
Johnni Winther
2013/12/03 11:52:31
Only remove this together with HAndOrBlockInformat
|
| bool visitSubExpressionInfo(HSubExpressionBlockInformation info); |
| } |
| @@ -2645,7 +2571,6 @@ class HSubGraphBlockInformation implements HStatementInformation { |
| visitor.visitSubGraphInfo(this); |
| } |
| - |
| /** |
| * Generic class wrapping a [SubExpression] as a block-information until |
| * expressions structures are handled properly. |
| @@ -2663,7 +2588,6 @@ class HSubExpressionBlockInformation implements HExpressionInformation { |
| visitor.visitSubExpressionInfo(this); |
| } |
| - |
| /** A sequence of separate statements. */ |
| class HStatementSequenceInformation implements HStatementInformation { |
| final List<HStatementInformation> statements; |
| @@ -2671,12 +2595,8 @@ class HStatementSequenceInformation implements HStatementInformation { |
| HBasicBlock get start => statements[0].start; |
| HBasicBlock get end => statements.last.end; |
| - |
| - bool accept(HStatementInformationVisitor visitor) => |
|
Johnni Winther
2013/12/03 11:52:31
Needed if HStatementSequenceInformation is needed.
|
| - visitor.visitSequenceInfo(this); |
| } |
| - |
| class HLabeledBlockInformation implements HStatementInformation { |
| final HStatementInformation body; |
| final List<LabelElement> labels; |
| @@ -2766,8 +2686,6 @@ class HLoopBlockInformation implements HStatementInformation { |
| return node.accept(const LoopTypeVisitor()); |
| } |
| - bool isDoWhile() => kind == DO_WHILE_LOOP; |
| - |
| bool accept(HStatementInformationVisitor visitor) => |
| visitor.visitLoopInfo(this); |
| } |
| @@ -2802,8 +2720,6 @@ class HAndOrBlockInformation implements HExpressionInformation { |
| HInstruction get conditionExpression { |
| return null; |
| } |
| - bool accept(HExpressionInformationVisitor visitor) => |
|
Johnni Winther
2013/12/03 11:52:31
Needed if HAndOrBlockInformation is needed.
|
| - visitor.visitAndOrInfo(this); |
| } |
| class HTryBlockInformation implements HStatementInformation { |