| 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, CodegenWorkItem; | 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 10 import '../common/names.dart'; | 10 import '../common/names.dart'; |
| (...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 stack.add(graph.addConstant(constant, closedWorld)); | 1774 stack.add(graph.addConstant(constant, closedWorld)); |
| 1775 return; | 1775 return; |
| 1776 } | 1776 } |
| 1777 // For other types (e.g. TypeParameterType, function types from expanded | 1777 // For other types (e.g. TypeParameterType, function types from expanded |
| 1778 // typedefs), look-up or construct a reified type representation and convert | 1778 // typedefs), look-up or construct a reified type representation and convert |
| 1779 // to a RuntimeType. | 1779 // to a RuntimeType. |
| 1780 | 1780 |
| 1781 // TODO(sra): Convert the type logic here to use ir.DartType. | 1781 // TODO(sra): Convert the type logic here to use ir.DartType. |
| 1782 ResolutionDartType dartType = astAdapter.getDartType(type); | 1782 ResolutionDartType dartType = astAdapter.getDartType(type); |
| 1783 dartType = localsHandler.substInContext(dartType); | 1783 dartType = localsHandler.substInContext(dartType); |
| 1784 HInstruction value = typeBuilder.analyzeTypeArgument( | 1784 HInstruction value = typeBuilder |
| 1785 dartType, sourceElement, | 1785 .analyzeTypeArgument(dartType, sourceElement, sourceInformation: null); |
| 1786 sourceInformation: null); | 1786 _pushStaticInvocation(astAdapter.runtimeTypeToString, <HInstruction>[value], |
| 1787 _pushStaticInvocation(astAdapter.runtimeTypeToString, | 1787 commonMasks.stringType); |
| 1788 <HInstruction>[value], commonMasks.stringType); | |
| 1789 _pushStaticInvocation(astAdapter.createRuntimeType, <HInstruction>[pop()], | 1788 _pushStaticInvocation(astAdapter.createRuntimeType, <HInstruction>[pop()], |
| 1790 astAdapter.createRuntimeTypeReturnType); | 1789 astAdapter.createRuntimeTypeReturnType); |
| 1791 } | 1790 } |
| 1792 | 1791 |
| 1793 @override | 1792 @override |
| 1794 void visitStaticGet(ir.StaticGet staticGet) { | 1793 void visitStaticGet(ir.StaticGet staticGet) { |
| 1795 ir.Member staticTarget = staticGet.target; | 1794 ir.Member staticTarget = staticGet.target; |
| 1796 if (staticTarget is ir.Procedure && | 1795 if (staticTarget is ir.Procedure && |
| 1797 staticTarget.kind == ir.ProcedureKind.Getter) { | 1796 staticTarget.kind == ir.ProcedureKind.Getter) { |
| 1798 // Invoke the getter | 1797 // Invoke the getter |
| 1799 _pushStaticInvocation(staticTarget, const <HInstruction>[], | 1798 _pushStaticInvocation(staticTarget, const <HInstruction>[], |
| 1800 astAdapter.returnTypeOf(staticTarget)); | 1799 astAdapter.returnTypeOf(staticTarget)); |
| (...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3065 enterBlock.setBlockFlow( | 3064 enterBlock.setBlockFlow( |
| 3066 new HTryBlockInformation( | 3065 new HTryBlockInformation( |
| 3067 kernelBuilder.wrapStatementGraph(bodyGraph), | 3066 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 3068 exception, | 3067 exception, |
| 3069 kernelBuilder.wrapStatementGraph(catchGraph), | 3068 kernelBuilder.wrapStatementGraph(catchGraph), |
| 3070 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3069 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 3071 exitBlock); | 3070 exitBlock); |
| 3072 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3071 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 3073 } | 3072 } |
| 3074 } | 3073 } |
| OLD | NEW |