| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class Interceptors { | 5 class Interceptors { |
| 6 Compiler compiler; | 6 Compiler compiler; |
| 7 Interceptors(Compiler this.compiler); | 7 Interceptors(Compiler this.compiler); |
| 8 | 8 |
| 9 SourceString mapOperatorToMethodName(Operator op) { | 9 SourceString mapOperatorToMethodName(Operator op) { |
| 10 String name = op.source.stringValue; | 10 String name = op.source.stringValue; |
| (...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 () => visit(node.thenPart), | 1571 () => visit(node.thenPart), |
| 1572 node.elsePart != null ? () => visit(node.elsePart) : null); | 1572 node.elsePart != null ? () => visit(node.elsePart) : null); |
| 1573 } | 1573 } |
| 1574 | 1574 |
| 1575 void handleIf(void visitCondition(), void visitThen(), void visitElse()) { | 1575 void handleIf(void visitCondition(), void visitThen(), void visitElse()) { |
| 1576 HBasicBlock conditionStartBlock = openNewBlock(); | 1576 HBasicBlock conditionStartBlock = openNewBlock(); |
| 1577 visitCondition(); | 1577 visitCondition(); |
| 1578 SubExpression conditionGraph = | 1578 SubExpression conditionGraph = |
| 1579 new SubExpression(conditionStartBlock, lastOpenedBlock); | 1579 new SubExpression(conditionStartBlock, lastOpenedBlock); |
| 1580 HInstruction condition = popBoolified(); | 1580 HInstruction condition = popBoolified(); |
| 1581 HIf branch = new HIf(condition, true); | 1581 HIf branch = new HIf(condition); |
| 1582 HBasicBlock conditionBlock = close(branch); | 1582 HBasicBlock conditionBlock = close(branch); |
| 1583 | 1583 |
| 1584 LocalsHandler savedLocals = new LocalsHandler.from(localsHandler); | 1584 LocalsHandler savedLocals = new LocalsHandler.from(localsHandler); |
| 1585 | 1585 |
| 1586 // The then part. | 1586 // The then part. |
| 1587 HBasicBlock thenBlock = addNewBlock(); | 1587 HBasicBlock thenBlock = addNewBlock(); |
| 1588 conditionBlock.addSuccessor(thenBlock); | 1588 conditionBlock.addSuccessor(thenBlock); |
| 1589 open(thenBlock); | 1589 open(thenBlock); |
| 1590 visitThen(); | 1590 visitThen(); |
| 1591 SubGraph thenGraph = new SubGraph(thenBlock, lastOpenedBlock); | 1591 SubGraph thenGraph = new SubGraph(thenBlock, lastOpenedBlock); |
| (...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3478 void visitNodeList(NodeList node) { | 3478 void visitNodeList(NodeList node) { |
| 3479 node.visitChildren(this); | 3479 node.visitChildren(this); |
| 3480 } | 3480 } |
| 3481 | 3481 |
| 3482 HInstruction concat(HInstruction left, HInstruction right) { | 3482 HInstruction concat(HInstruction left, HInstruction right) { |
| 3483 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); | 3483 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); |
| 3484 builder.add(instruction); | 3484 builder.add(instruction); |
| 3485 return instruction; | 3485 return instruction; |
| 3486 } | 3486 } |
| 3487 } | 3487 } |
| OLD | NEW |