| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } else { | 192 } else { |
| 193 buildConstructor(target); | 193 buildConstructor(target); |
| 194 } | 194 } |
| 195 } else if (target is ir.FunctionExpression) { | 195 } else if (target is ir.FunctionExpression) { |
| 196 _targetFunction = (target as ir.FunctionExpression).function; | 196 _targetFunction = (target as ir.FunctionExpression).function; |
| 197 buildFunctionNode(_targetFunction); | 197 buildFunctionNode(_targetFunction); |
| 198 } else if (target is ir.FunctionDeclaration) { | 198 } else if (target is ir.FunctionDeclaration) { |
| 199 _targetFunction = (target as ir.FunctionDeclaration).function; | 199 _targetFunction = (target as ir.FunctionDeclaration).function; |
| 200 buildFunctionNode(_targetFunction); | 200 buildFunctionNode(_targetFunction); |
| 201 } else { | 201 } else { |
| 202 throw 'No case implemented to handle target: $target'; | 202 throw 'No case implemented to handle target: $target for $targetElement'; |
| 203 } | 203 } |
| 204 assert(graph.isValid()); | 204 assert(graph.isValid()); |
| 205 return graph; | 205 return graph; |
| 206 } | 206 } |
| 207 | 207 |
| 208 void buildField(ir.Field field) { | 208 void buildField(ir.Field field) { |
| 209 openFunction(); | 209 openFunction(); |
| 210 if (field.initializer != null) { | 210 if (field.initializer != null) { |
| 211 field.initializer.accept(this); | 211 field.initializer.accept(this); |
| 212 HInstruction fieldValue = pop(); | 212 HInstruction fieldValue = pop(); |
| (...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3253 enterBlock.setBlockFlow( | 3253 enterBlock.setBlockFlow( |
| 3254 new HTryBlockInformation( | 3254 new HTryBlockInformation( |
| 3255 kernelBuilder.wrapStatementGraph(bodyGraph), | 3255 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 3256 exception, | 3256 exception, |
| 3257 kernelBuilder.wrapStatementGraph(catchGraph), | 3257 kernelBuilder.wrapStatementGraph(catchGraph), |
| 3258 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3258 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 3259 exitBlock); | 3259 exitBlock); |
| 3260 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3260 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 3261 } | 3261 } |
| 3262 } | 3262 } |
| OLD | NEW |