| 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 3281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3292 } | 3292 } |
| 3293 | 3293 |
| 3294 visitTypeVariable(TypeVariable node) { | 3294 visitTypeVariable(TypeVariable node) { |
| 3295 compiler.internalError('SsaBuilder.visitTypeVariable'); | 3295 compiler.internalError('SsaBuilder.visitTypeVariable'); |
| 3296 } | 3296 } |
| 3297 | 3297 |
| 3298 HType mapInferredType(Element element) { | 3298 HType mapInferredType(Element element) { |
| 3299 if (element === builder.compiler.boolClass) return HType.BOOLEAN; | 3299 if (element === builder.compiler.boolClass) return HType.BOOLEAN; |
| 3300 if (element === builder.compiler.doubleClass) return HType.DOUBLE; | 3300 if (element === builder.compiler.doubleClass) return HType.DOUBLE; |
| 3301 if (element === builder.compiler.intClass) return HType.INTEGER; | 3301 if (element === builder.compiler.intClass) return HType.INTEGER; |
| 3302 if (element === builder.compiler.listClass) return HType.READABLE_ARRAY; | 3302 // TODO(ahe): How to map listClass to HType? |
| 3303 if (element === builder.compiler.listClass) return HType.UNKNOWN; |
| 3303 if (element === builder.compiler.nullClass) return HType.NULL; | 3304 if (element === builder.compiler.nullClass) return HType.NULL; |
| 3304 if (element === builder.compiler.stringClass) return HType.STRING; | 3305 if (element === builder.compiler.stringClass) return HType.STRING; |
| 3305 return HType.UNKNOWN; | 3306 return HType.UNKNOWN; |
| 3306 } | 3307 } |
| 3307 | 3308 |
| 3308 /** HACK HACK HACK */ | 3309 /** HACK HACK HACK */ |
| 3309 void hackAroundPossiblyAbortingBody(Node statement, void body()) { | 3310 void hackAroundPossiblyAbortingBody(Node statement, void body()) { |
| 3310 visitCondition() { | 3311 visitCondition() { |
| 3311 stack.add(graph.addConstantBool(true)); | 3312 stack.add(graph.addConstantBool(true)); |
| 3312 } | 3313 } |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3599 new HSubGraphBlockInformation(elseBranch.graph)); | 3600 new HSubGraphBlockInformation(elseBranch.graph)); |
| 3600 | 3601 |
| 3601 HBasicBlock conditionStartBlock = conditionBranch.block; | 3602 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 3602 conditionStartBlock.setBlockFlow(info, joinBlock); | 3603 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 3603 SubGraph conditionGraph = conditionBranch.graph; | 3604 SubGraph conditionGraph = conditionBranch.graph; |
| 3604 HIf branch = conditionGraph.end.last; | 3605 HIf branch = conditionGraph.end.last; |
| 3605 assert(branch is HIf); | 3606 assert(branch is HIf); |
| 3606 branch.blockInformation = conditionStartBlock.blockFlow; | 3607 branch.blockInformation = conditionStartBlock.blockFlow; |
| 3607 } | 3608 } |
| 3608 } | 3609 } |
| OLD | NEW |