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

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

Issue 2874033003: Set MethodInvocation.interfaceTarget during type inference. (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
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 return inferrer.inferMethodInvocation( 416 return inferrer.inferMethodInvocation(
417 typeContext, 417 typeContext,
418 typeNeeded, 418 typeNeeded,
419 fileOffset, 419 fileOffset,
420 receiver, 420 receiver,
421 name, 421 name,
422 _getExplicitTypeArguments(arguments), 422 _getExplicitTypeArguments(arguments),
423 _forEachArgument(arguments), (types) { 423 _forEachArgument(arguments), (types) {
424 arguments.types.clear(); 424 arguments.types.clear();
425 arguments.types.addAll(types); 425 arguments.types.addAll(types);
426 }, (target) {
427 if (!inferrer.strongMode) {
428 // Our non-strong golden files currently don't include interface
429 // targets, so we can't store the interface target without causing tests
430 // to fail. TODO(paulberry): fix this.
431 return;
432 }
433 interfaceTarget = target;
426 }); 434 });
427 } 435 }
428 } 436 }
429 437
430 /// Shadow object for [Not]. 438 /// Shadow object for [Not].
431 class KernelNot extends Not implements KernelExpression { 439 class KernelNot extends Not implements KernelExpression {
432 KernelNot(Expression operand) : super(operand); 440 KernelNot(Expression operand) : super(operand);
433 441
434 @override 442 @override
435 DartType _inferExpression( 443 DartType _inferExpression(
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 : super(variable, value); 954 : super(variable, value);
947 955
948 @override 956 @override
949 DartType _inferExpression( 957 DartType _inferExpression(
950 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { 958 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) {
951 var variable = this.variable as KernelVariableDeclaration; 959 var variable = this.variable as KernelVariableDeclaration;
952 return inferrer.inferVariableSet( 960 return inferrer.inferVariableSet(
953 typeContext, typeNeeded, variable._declaredType, value); 961 typeContext, typeNeeded, variable._declaredType, value);
954 } 962 }
955 } 963 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/base/instrumentation.dart ('k') | pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698