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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 // `target` for context. | 749 // `target` for context. |
750 @override | 750 @override |
751 MemberElement get sourceElement => _targetStack.last; | 751 MemberElement get sourceElement => _targetStack.last; |
752 | 752 |
753 List<MemberEntity> _targetStack = <MemberEntity>[]; | 753 List<MemberEntity> _targetStack = <MemberEntity>[]; |
754 | 754 |
755 @override | 755 @override |
756 void visitCheckLibraryIsLoaded(ir.CheckLibraryIsLoaded checkLoad) { | 756 void visitCheckLibraryIsLoaded(ir.CheckLibraryIsLoaded checkLoad) { |
757 HInstruction prefixConstant = | 757 HInstruction prefixConstant = |
758 graph.addConstantString(checkLoad.import.name, closedWorld); | 758 graph.addConstantString(checkLoad.import.name, closedWorld); |
759 var prefixElement = astAdapter.getElement(checkLoad.import); | 759 PrefixElement prefixElement = astAdapter.getElement(checkLoad.import); |
760 HInstruction uriConstant = graph.addConstantString( | 760 HInstruction uriConstant = graph.addConstantString( |
761 prefixElement.deferredImport.uri.toString(), closedWorld); | 761 prefixElement.deferredImport.uri.toString(), closedWorld); |
762 _pushStaticInvocation( | 762 _pushStaticInvocation( |
763 _commonElements.checkDeferredIsLoaded, | 763 _commonElements.checkDeferredIsLoaded, |
764 [prefixConstant, uriConstant], | 764 [prefixConstant, uriConstant], |
765 _typeInferenceMap | 765 _typeInferenceMap |
766 .getReturnTypeOf(_commonElements.checkDeferredIsLoaded)); | 766 .getReturnTypeOf(_commonElements.checkDeferredIsLoaded)); |
767 } | 767 } |
768 | 768 |
769 @override | 769 @override |
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3480 enterBlock.setBlockFlow( | 3480 enterBlock.setBlockFlow( |
3481 new HTryBlockInformation( | 3481 new HTryBlockInformation( |
3482 kernelBuilder.wrapStatementGraph(bodyGraph), | 3482 kernelBuilder.wrapStatementGraph(bodyGraph), |
3483 exception, | 3483 exception, |
3484 kernelBuilder.wrapStatementGraph(catchGraph), | 3484 kernelBuilder.wrapStatementGraph(catchGraph), |
3485 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3485 kernelBuilder.wrapStatementGraph(finallyGraph)), |
3486 exitBlock); | 3486 exitBlock); |
3487 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3487 kernelBuilder.inTryStatement = previouslyInTryStatement; |
3488 } | 3488 } |
3489 } | 3489 } |
OLD | NEW |