| 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; | 9 import '../common/codegen.dart' show CodegenRegistry; |
| 10 import '../common/names.dart'; | 10 import '../common/names.dart'; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 case MemberKind.constructor: | 163 case MemberKind.constructor: |
| 164 ir.Constructor constructor = definition.node; | 164 ir.Constructor constructor = definition.node; |
| 165 _targetFunction = constructor.function; | 165 _targetFunction = constructor.function; |
| 166 buildConstructor(constructor); | 166 buildConstructor(constructor); |
| 167 break; | 167 break; |
| 168 case MemberKind.constructorBody: | 168 case MemberKind.constructorBody: |
| 169 ir.Constructor constructor = definition.node; | 169 ir.Constructor constructor = definition.node; |
| 170 _targetFunction = constructor.function; | 170 _targetFunction = constructor.function; |
| 171 buildConstructorBody(constructor); | 171 buildConstructorBody(constructor); |
| 172 break; | 172 break; |
| 173 case MemberKind.closureField: |
| 174 failedAt(targetElement, "Unexpected closure field: $targetElement"); |
| 175 break; |
| 173 } | 176 } |
| 174 assert(graph.isValid()); | 177 assert(graph.isValid()); |
| 175 if (_targetFunction != null) { | 178 if (_targetFunction != null) { |
| 176 _ensureDefaultArgumentValues(_targetFunction); | 179 _ensureDefaultArgumentValues(_targetFunction); |
| 177 } | 180 } |
| 178 return graph; | 181 return graph; |
| 179 }); | 182 }); |
| 180 } | 183 } |
| 181 | 184 |
| 182 void _ensureDefaultArgumentValues(ir.FunctionNode function) { | 185 void _ensureDefaultArgumentValues(ir.FunctionNode function) { |
| (...skipping 3470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3653 enterBlock.setBlockFlow( | 3656 enterBlock.setBlockFlow( |
| 3654 new HTryBlockInformation( | 3657 new HTryBlockInformation( |
| 3655 kernelBuilder.wrapStatementGraph(bodyGraph), | 3658 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 3656 exception, | 3659 exception, |
| 3657 kernelBuilder.wrapStatementGraph(catchGraph), | 3660 kernelBuilder.wrapStatementGraph(catchGraph), |
| 3658 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3661 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 3659 exitBlock); | 3662 exitBlock); |
| 3660 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3663 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 3661 } | 3664 } |
| 3662 } | 3665 } |
| OLD | NEW |