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

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

Issue 2920223008: Record method invocation targets that are not procedures. (Closed)
Patch Set: Created 3 years, 6 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) 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 library fasta.fasta_accessors; 5 library fasta.fasta_accessors;
6 6
7 import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart' 7 import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'
8 show KernelArguments, KernelThisExpression; 8 show KernelArguments, KernelThisExpression;
9 9
10 import 'package:front_end/src/fasta/kernel/utils.dart' show offsetForToken; 10 import 'package:front_end/src/fasta/kernel/utils.dart' show offsetForToken;
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return buildConstructorInitializer( 309 return buildConstructorInitializer(
310 offsetForToken(send.token), send.name, send.arguments); 310 offsetForToken(send.token), send.name, send.arguments);
311 } 311 }
312 if (send is SendAccessor) { 312 if (send is SendAccessor) {
313 // Notice that 'this' or 'super' can't be null. So we can ignore the 313 // Notice that 'this' or 'super' can't be null. So we can ignore the
314 // value of [isNullAware]. 314 // value of [isNullAware].
315 MethodInvocation result = helper.buildMethodInvocation( 315 MethodInvocation result = helper.buildMethodInvocation(
316 new KernelThisExpression(), 316 new KernelThisExpression(),
317 send.name, 317 send.name,
318 send.arguments, 318 send.arguments,
319 offsetForToken(token)); 319 offsetForToken(send.token));
ahe 2017/06/06 19:13:59 I saw some messages earlier today that had the wro
320 return isSuper ? helper.toSuperMethodInvocation(result) : result; 320 return isSuper ? helper.toSuperMethodInvocation(result) : result;
321 } else { 321 } else {
322 if (isSuper) { 322 if (isSuper) {
323 Member getter = helper.lookupSuperMember(send.name); 323 Member getter = helper.lookupSuperMember(send.name);
324 Member setter = helper.lookupSuperMember(send.name, isSetter: true); 324 Member setter = helper.lookupSuperMember(send.name, isSetter: true);
325 return new SuperPropertyAccessor( 325 return new SuperPropertyAccessor(
326 helper, send.token, send.name, getter, setter); 326 helper, send.token, send.name, getter, setter);
327 } else { 327 } else {
328 return new ThisPropertyAccessor( 328 return new ThisPropertyAccessor(
329 helper, send.token, send.name, null, null); 329 helper, send.token, send.name, null, null);
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 {bool isGetter: false, bool isSetter: false, int offset}) { 930 {bool isGetter: false, bool isSetter: false, int offset}) {
931 return helper.throwNoSuchMethodError( 931 return helper.throwNoSuchMethodError(
932 plainNameForRead, arguments, offset ?? offsetForToken(this.token), 932 plainNameForRead, arguments, offset ?? offsetForToken(this.token),
933 isGetter: isGetter, isSetter: isSetter); 933 isGetter: isGetter, isSetter: isSetter);
934 } 934 }
935 } 935 }
936 936
937 bool isFieldOrGetter(Member member) { 937 bool isFieldOrGetter(Member member) {
938 return member is Field || (member is Procedure && member.isGetter); 938 return member is Field || (member is Procedure && member.isGetter);
939 } 939 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698