Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart

Issue 2869003002: Clean up type inference methods. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698