| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 10 import '../common/names.dart'; | 10 import '../common/names.dart'; |
| (...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 add(converted); | 1158 add(converted); |
| 1159 } | 1159 } |
| 1160 stack.add(converted); | 1160 stack.add(converted); |
| 1161 } | 1161 } |
| 1162 } | 1162 } |
| 1163 | 1163 |
| 1164 void generateError( | 1164 void generateError( |
| 1165 ir.Node node, ir.Procedure procedure, String message, TypeMask typeMask) { | 1165 ir.Node node, ir.Procedure procedure, String message, TypeMask typeMask) { |
| 1166 HInstruction errorMessage = | 1166 HInstruction errorMessage = |
| 1167 graph.addConstantString(new DartString.literal(message), closedWorld); | 1167 graph.addConstantString(new DartString.literal(message), closedWorld); |
| 1168 // TODO(sra): Assocate source info from [node]. | 1168 // TODO(sra): Associate source info from [node]. |
| 1169 _pushStaticInvocation(procedure, [errorMessage], typeMask); | 1169 _pushStaticInvocation(procedure, [errorMessage], typeMask); |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 void generateTypeError(ir.Node node, String message) { | 1172 void generateTypeError(ir.Node node, String message) { |
| 1173 generateError(node, astAdapter.throwTypeError, message, | 1173 generateError(node, astAdapter.throwTypeError, message, |
| 1174 astAdapter.throwTypeErrorType); | 1174 astAdapter.throwTypeErrorType); |
| 1175 } | 1175 } |
| 1176 | 1176 |
| 1177 @override | 1177 @override |
| 1178 void visitAssertStatement(ir.AssertStatement assertStatement) { | 1178 void visitAssertStatement(ir.AssertStatement assertStatement) { |
| (...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3218 enterBlock.setBlockFlow( | 3218 enterBlock.setBlockFlow( |
| 3219 new HTryBlockInformation( | 3219 new HTryBlockInformation( |
| 3220 kernelBuilder.wrapStatementGraph(bodyGraph), | 3220 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 3221 exception, | 3221 exception, |
| 3222 kernelBuilder.wrapStatementGraph(catchGraph), | 3222 kernelBuilder.wrapStatementGraph(catchGraph), |
| 3223 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3223 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 3224 exitBlock); | 3224 exitBlock); |
| 3225 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3225 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 3226 } | 3226 } |
| 3227 } | 3227 } |
| OLD | NEW |