| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 HGraph build() { | 129 HGraph build() { |
| 130 return reporter.withCurrentElement(localsMap.currentMember, () { | 130 return reporter.withCurrentElement(localsMap.currentMember, () { |
| 131 // TODO(het): no reason to do this here... | 131 // TODO(het): no reason to do this here... |
| 132 HInstruction.idCounter = 0; | 132 HInstruction.idCounter = 0; |
| 133 MemberDefinition definition = | 133 MemberDefinition definition = |
| 134 _elementMap.getMemberDefinition(targetElement); | 134 _elementMap.getMemberDefinition(targetElement); |
| 135 | 135 |
| 136 switch (definition.kind) { | 136 switch (definition.kind) { |
| 137 case MemberKind.regular: | 137 case MemberKind.regular: |
| 138 case MemberKind.closureField: |
| 138 case MemberKind.closureCall: | 139 case MemberKind.closureCall: |
| 139 ir.Node target = definition.node; | 140 ir.Node target = definition.node; |
| 140 if (target is ir.Procedure) { | 141 if (target is ir.Procedure) { |
| 141 _targetFunction = target.function; | 142 _targetFunction = target.function; |
| 142 buildFunctionNode(_targetFunction); | 143 buildFunctionNode(_targetFunction); |
| 143 } else if (target is ir.Field) { | 144 } else if (target is ir.Field) { |
| 144 if (handleConstantField(targetElement, registry, closedWorld)) { | 145 if (handleConstantField(targetElement, registry, closedWorld)) { |
| 145 // No code is generated for `targetElement`: All references inline | 146 // No code is generated for `targetElement`: All references inline |
| 146 // the constant value. | 147 // the constant value. |
| 147 return null; | 148 return null; |
| (...skipping 3505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3653 enterBlock.setBlockFlow( | 3654 enterBlock.setBlockFlow( |
| 3654 new HTryBlockInformation( | 3655 new HTryBlockInformation( |
| 3655 kernelBuilder.wrapStatementGraph(bodyGraph), | 3656 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 3656 exception, | 3657 exception, |
| 3657 kernelBuilder.wrapStatementGraph(catchGraph), | 3658 kernelBuilder.wrapStatementGraph(catchGraph), |
| 3658 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3659 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 3659 exitBlock); | 3660 exitBlock); |
| 3660 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3661 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 3661 } | 3662 } |
| 3662 } | 3663 } |
| OLD | NEW |