| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 /// This file declares a "shadow hierarchy" of concrete classes which extend | 5 /// This file declares a "shadow hierarchy" of concrete classes which extend |
| 6 /// the kernel class hierarchy, adding methods and fields needed by the | 6 /// the kernel class hierarchy, adding methods and fields needed by the |
| 7 /// BodyBuilder. | 7 /// BodyBuilder. |
| 8 /// | 8 /// |
| 9 /// Instances of these classes may be created using the factory methods in | 9 /// Instances of these classes may be created using the factory methods in |
| 10 /// `ast_factory.dart`. | 10 /// `ast_factory.dart`. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 @override | 126 @override |
| 127 DartType _inferExpression( | 127 DartType _inferExpression( |
| 128 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { | 128 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
| 129 KernelArguments arguments = this.arguments; | 129 KernelArguments arguments = this.arguments; |
| 130 return inferrer.inferConstructorInvocation( | 130 return inferrer.inferConstructorInvocation( |
| 131 typeContext, | 131 typeContext, |
| 132 typeNeeded, | 132 typeNeeded, |
| 133 fileOffset, | 133 fileOffset, |
| 134 target, | 134 target, |
| 135 arguments._hasExplicitTypeArguments ? arguments.types : null, | 135 arguments._hasExplicitTypeArguments ? arguments.types : null, |
| 136 _forEachArgument, (type) { | 136 _forEachArgument, (types) { |
| 137 arguments.types.clear(); | 137 arguments.types.clear(); |
| 138 arguments.types.addAll(type.typeArguments); | 138 arguments.types.addAll(types); |
| 139 }); | 139 }); |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 | 142 |
| 143 /// Shadow object for [DirectMethodInvocation]. | 143 /// Shadow object for [DirectMethodInvocation]. |
| 144 class KernelDirectMethodInvocation extends DirectMethodInvocation | 144 class KernelDirectMethodInvocation extends DirectMethodInvocation |
| 145 implements KernelExpression { | 145 implements KernelExpression { |
| 146 KernelDirectMethodInvocation( | 146 KernelDirectMethodInvocation( |
| 147 Expression receiver, Procedure target, Arguments arguments) | 147 Expression receiver, Procedure target, Arguments arguments) |
| 148 : super(receiver, target, arguments); | 148 : super(receiver, target, arguments); |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 : super(variable, value); | 923 : super(variable, value); |
| 924 | 924 |
| 925 @override | 925 @override |
| 926 DartType _inferExpression( | 926 DartType _inferExpression( |
| 927 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { | 927 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
| 928 var variable = this.variable as KernelVariableDeclaration; | 928 var variable = this.variable as KernelVariableDeclaration; |
| 929 return inferrer.inferVariableSet( | 929 return inferrer.inferVariableSet( |
| 930 typeContext, typeNeeded, variable._declaredType, value); | 930 typeContext, typeNeeded, variable._declaredType, value); |
| 931 } | 931 } |
| 932 } | 932 } |
| OLD | NEW |