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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 // `target` for context. | 746 // `target` for context. |
747 @override | 747 @override |
748 MemberElement get sourceElement => _targetStack.last; | 748 MemberElement get sourceElement => _targetStack.last; |
749 | 749 |
750 List<MemberEntity> _targetStack = <MemberEntity>[]; | 750 List<MemberEntity> _targetStack = <MemberEntity>[]; |
751 | 751 |
752 @override | 752 @override |
753 void visitCheckLibraryIsLoaded(ir.CheckLibraryIsLoaded checkLoad) { | 753 void visitCheckLibraryIsLoaded(ir.CheckLibraryIsLoaded checkLoad) { |
754 HInstruction prefixConstant = | 754 HInstruction prefixConstant = |
755 graph.addConstantString(checkLoad.import.name, closedWorld); | 755 graph.addConstantString(checkLoad.import.name, closedWorld); |
756 var prefixElement = astAdapter.getElement(checkLoad.import); | 756 PrefixElement prefixElement = astAdapter.getElement(checkLoad.import); |
757 HInstruction uriConstant = graph.addConstantString( | 757 HInstruction uriConstant = graph.addConstantString( |
758 prefixElement.deferredImport.uri.toString(), closedWorld); | 758 prefixElement.deferredImport.uri.toString(), closedWorld); |
759 _pushStaticInvocation( | 759 _pushStaticInvocation( |
760 _commonElements.checkDeferredIsLoaded, | 760 _commonElements.checkDeferredIsLoaded, |
761 [prefixConstant, uriConstant], | 761 [prefixConstant, uriConstant], |
762 _typeInferenceMap | 762 _typeInferenceMap |
763 .getReturnTypeOf(_commonElements.checkDeferredIsLoaded)); | 763 .getReturnTypeOf(_commonElements.checkDeferredIsLoaded)); |
764 } | 764 } |
765 | 765 |
766 @override | 766 @override |
(...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3471 enterBlock.setBlockFlow( | 3471 enterBlock.setBlockFlow( |
3472 new HTryBlockInformation( | 3472 new HTryBlockInformation( |
3473 kernelBuilder.wrapStatementGraph(bodyGraph), | 3473 kernelBuilder.wrapStatementGraph(bodyGraph), |
3474 exception, | 3474 exception, |
3475 kernelBuilder.wrapStatementGraph(catchGraph), | 3475 kernelBuilder.wrapStatementGraph(catchGraph), |
3476 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3476 kernelBuilder.wrapStatementGraph(finallyGraph)), |
3477 exitBlock); | 3477 exitBlock); |
3478 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3478 kernelBuilder.inTryStatement = previouslyInTryStatement; |
3479 } | 3479 } |
3480 } | 3480 } |
OLD | NEW |