| 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 localsHandler.updateLocal(parameter, argument); | 598 localsHandler.updateLocal(parameter, argument); |
| 599 } | 599 } |
| 600 | 600 |
| 601 constructor.function.positionalParameters.forEach(handleParameter); | 601 constructor.function.positionalParameters.forEach(handleParameter); |
| 602 constructor.function.namedParameters.toList() | 602 constructor.function.namedParameters.toList() |
| 603 ..sort(namedOrdering) | 603 ..sort(namedOrdering) |
| 604 ..forEach(handleParameter); | 604 ..forEach(handleParameter); |
| 605 | 605 |
| 606 // Set the locals handler state as if we were inlining the constructor. | 606 // Set the locals handler state as if we were inlining the constructor. |
| 607 ConstructorEntity element = _elementMap.getConstructor(constructor); | 607 ConstructorEntity element = _elementMap.getConstructor(constructor); |
| 608 ClosureRepresentationInfo oldScopeInfo = localsHandler.scopeInfo; | 608 ScopeInfo oldScopeInfo = localsHandler.scopeInfo; |
| 609 ClosureRepresentationInfo newScopeInfo = | 609 ScopeInfo newScopeInfo = closureDataLookup.getScopeInfo(element); |
| 610 closureDataLookup.getScopeInfo(element); | |
| 611 localsHandler.scopeInfo = newScopeInfo; | 610 localsHandler.scopeInfo = newScopeInfo; |
| 612 localsHandler.enterScope(closureDataLookup.getClosureScope(element)); | 611 localsHandler.enterScope(closureDataLookup.getClosureScope(element)); |
| 613 inlinedFrom(element, () { | 612 inlinedFrom(element, () { |
| 614 _buildInitializers(constructor, constructorChain, fieldValues); | 613 _buildInitializers(constructor, constructorChain, fieldValues); |
| 615 }); | 614 }); |
| 616 localsHandler.scopeInfo = oldScopeInfo; | 615 localsHandler.scopeInfo = oldScopeInfo; |
| 617 } | 616 } |
| 618 | 617 |
| 619 /// Builds generative constructor body. | 618 /// Builds generative constructor body. |
| 620 void buildConstructorBody(ir.Constructor constructor) { | 619 void buildConstructorBody(ir.Constructor constructor) { |
| (...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3517 enterBlock.setBlockFlow( | 3516 enterBlock.setBlockFlow( |
| 3518 new HTryBlockInformation( | 3517 new HTryBlockInformation( |
| 3519 kernelBuilder.wrapStatementGraph(bodyGraph), | 3518 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 3520 exception, | 3519 exception, |
| 3521 kernelBuilder.wrapStatementGraph(catchGraph), | 3520 kernelBuilder.wrapStatementGraph(catchGraph), |
| 3522 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3521 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 3523 exitBlock); | 3522 exitBlock); |
| 3524 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3523 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 3525 } | 3524 } |
| 3526 } | 3525 } |
| OLD | NEW |