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 part of ssa; | |
6 | |
7 class Interceptors { | 5 class Interceptors { |
8 Compiler compiler; | 6 Compiler compiler; |
9 Interceptors(Compiler this.compiler); | 7 Interceptors(Compiler this.compiler); |
10 | 8 |
11 SourceString mapOperatorToMethodName(Operator op) { | 9 SourceString mapOperatorToMethodName(Operator op) { |
12 String name = op.source.stringValue; | 10 String name = op.source.stringValue; |
13 if (identical(name, '+')) return const SourceString('add'); | 11 if (identical(name, '+')) return const SourceString('add'); |
14 if (identical(name, '-')) return const SourceString('sub'); | 12 if (identical(name, '-')) return const SourceString('sub'); |
15 if (identical(name, '*')) return const SourceString('mul'); | 13 if (identical(name, '*')) return const SourceString('mul'); |
16 if (identical(name, '/')) return const SourceString('div'); | 14 if (identical(name, '/')) return const SourceString('div'); |
(...skipping 4483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4500 new HSubGraphBlockInformation(elseBranch.graph)); | 4498 new HSubGraphBlockInformation(elseBranch.graph)); |
4501 | 4499 |
4502 HBasicBlock conditionStartBlock = conditionBranch.block; | 4500 HBasicBlock conditionStartBlock = conditionBranch.block; |
4503 conditionStartBlock.setBlockFlow(info, joinBlock); | 4501 conditionStartBlock.setBlockFlow(info, joinBlock); |
4504 SubGraph conditionGraph = conditionBranch.graph; | 4502 SubGraph conditionGraph = conditionBranch.graph; |
4505 HIf branch = conditionGraph.end.last; | 4503 HIf branch = conditionGraph.end.last; |
4506 assert(branch is HIf); | 4504 assert(branch is HIf); |
4507 branch.blockInformation = conditionStartBlock.blockFlow; | 4505 branch.blockInformation = conditionStartBlock.blockFlow; |
4508 } | 4506 } |
4509 } | 4507 } |
OLD | NEW |