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 ScopeInfo oldScopeInfo = localsHandler.scopeInfo; | 608 ClosureRepresentationInfo oldScopeInfo = localsHandler.scopeInfo; |
609 ScopeInfo newScopeInfo = closureDataLookup.getScopeInfo(element); | 609 ClosureRepresentationInfo newScopeInfo = |
| 610 closureDataLookup.getScopeInfo(element); |
610 localsHandler.scopeInfo = newScopeInfo; | 611 localsHandler.scopeInfo = newScopeInfo; |
611 localsHandler.enterScope(closureDataLookup.getClosureScope(element)); | 612 localsHandler.enterScope(closureDataLookup.getClosureScope(element)); |
612 inlinedFrom(element, () { | 613 inlinedFrom(element, () { |
613 _buildInitializers(constructor, constructorChain, fieldValues); | 614 _buildInitializers(constructor, constructorChain, fieldValues); |
614 }); | 615 }); |
615 localsHandler.scopeInfo = oldScopeInfo; | 616 localsHandler.scopeInfo = oldScopeInfo; |
616 } | 617 } |
617 | 618 |
618 /// Builds generative constructor body. | 619 /// Builds generative constructor body. |
619 void buildConstructorBody(ir.Constructor constructor) { | 620 void buildConstructorBody(ir.Constructor constructor) { |
(...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3516 enterBlock.setBlockFlow( | 3517 enterBlock.setBlockFlow( |
3517 new HTryBlockInformation( | 3518 new HTryBlockInformation( |
3518 kernelBuilder.wrapStatementGraph(bodyGraph), | 3519 kernelBuilder.wrapStatementGraph(bodyGraph), |
3519 exception, | 3520 exception, |
3520 kernelBuilder.wrapStatementGraph(catchGraph), | 3521 kernelBuilder.wrapStatementGraph(catchGraph), |
3521 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3522 kernelBuilder.wrapStatementGraph(finallyGraph)), |
3522 exitBlock); | 3523 exitBlock); |
3523 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3524 kernelBuilder.inTryStatement = previouslyInTryStatement; |
3524 } | 3525 } |
3525 } | 3526 } |
OLD | NEW |