| 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 3564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3575 | 3575 |
| 3576 void visitFunctionExpression(Node node) { | 3576 void visitFunctionExpression(Node node) { |
| 3577 tooDifficult = true; | 3577 tooDifficult = true; |
| 3578 } | 3578 } |
| 3579 | 3579 |
| 3580 void visitFunctionDeclaration(Node node) { | 3580 void visitFunctionDeclaration(Node node) { |
| 3581 tooDifficult = true; | 3581 tooDifficult = true; |
| 3582 } | 3582 } |
| 3583 | 3583 |
| 3584 void visitSend(Node node) { | 3584 void visitSend(Node node) { |
| 3585 Element element = elements[node]; | 3585 node.visitChildren(this); |
| 3586 // Native methods rely on the names of the arguments. If we inline they | |
| 3587 // could change. | |
| 3588 if (!Element.isInvalid(element) && element.kind == ElementKind.FOREIGN) { | |
| 3589 tooDifficult = true; | |
| 3590 } else { | |
| 3591 node.visitChildren(this); | |
| 3592 } | |
| 3593 } | 3586 } |
| 3594 | 3587 |
| 3595 visitLoop(Node node) { | 3588 visitLoop(Node node) { |
| 3596 node.visitChildren(this); | 3589 node.visitChildren(this); |
| 3597 if (seenReturn) tooDifficult = true; | 3590 if (seenReturn) tooDifficult = true; |
| 3598 } | 3591 } |
| 3599 | 3592 |
| 3600 void visitReturn(Node node) { | 3593 void visitReturn(Node node) { |
| 3601 if (seenReturn || node.getBeginToken().stringValue === 'native') { | 3594 if (seenReturn || node.getBeginToken().stringValue === 'native') { |
| 3602 tooDifficult = true; | 3595 tooDifficult = true; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3852 new HSubGraphBlockInformation(elseBranch.graph)); | 3845 new HSubGraphBlockInformation(elseBranch.graph)); |
| 3853 | 3846 |
| 3854 HBasicBlock conditionStartBlock = conditionBranch.block; | 3847 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 3855 conditionStartBlock.setBlockFlow(info, joinBlock); | 3848 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 3856 SubGraph conditionGraph = conditionBranch.graph; | 3849 SubGraph conditionGraph = conditionBranch.graph; |
| 3857 HIf branch = conditionGraph.end.last; | 3850 HIf branch = conditionGraph.end.last; |
| 3858 assert(branch is HIf); | 3851 assert(branch is HIf); |
| 3859 branch.blockInformation = conditionStartBlock.blockFlow; | 3852 branch.blockInformation = conditionStartBlock.blockFlow; |
| 3860 } | 3853 } |
| 3861 } | 3854 } |
| OLD | NEW |