| 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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 | 1100 |
| 1101 HType convertedType = new HType.fromBoundedType(type, compiler, true); | 1101 HType convertedType = new HType.fromBoundedType(type, compiler, true); |
| 1102 | 1102 |
| 1103 // No need to convert if we know the instruction has | 1103 // No need to convert if we know the instruction has |
| 1104 // [convertedType] as a bound. | 1104 // [convertedType] as a bound. |
| 1105 if (original.guaranteedType == convertedType) { | 1105 if (original.guaranteedType == convertedType) { |
| 1106 return original; | 1106 return original; |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 HInstruction instruction = | 1109 HInstruction instruction = |
| 1110 new HTypeConversion(convertedType, original, true); | 1110 new HTypeConversion.checkedModeCheck(convertedType, original); |
| 1111 add(instruction); | 1111 add(instruction); |
| 1112 return instruction; | 1112 return instruction; |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 HGraph closeFunction() { | 1115 HGraph closeFunction() { |
| 1116 // TODO(kasperl): Make this goto an implicit return. | 1116 // TODO(kasperl): Make this goto an implicit return. |
| 1117 if (!isAborted()) close(new HGoto()).addSuccessor(graph.exit); | 1117 if (!isAborted()) close(new HGoto()).addSuccessor(graph.exit); |
| 1118 graph.finalize(); | 1118 graph.finalize(); |
| 1119 return graph; | 1119 return graph; |
| 1120 } | 1120 } |
| (...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3462 void visitNodeList(NodeList node) { | 3462 void visitNodeList(NodeList node) { |
| 3463 node.visitChildren(this); | 3463 node.visitChildren(this); |
| 3464 } | 3464 } |
| 3465 | 3465 |
| 3466 HInstruction concat(HInstruction left, HInstruction right) { | 3466 HInstruction concat(HInstruction left, HInstruction right) { |
| 3467 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); | 3467 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); |
| 3468 builder.add(instruction); | 3468 builder.add(instruction); |
| 3469 return instruction; | 3469 return instruction; |
| 3470 } | 3470 } |
| 3471 } | 3471 } |
| OLD | NEW |