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

Side by Side Diff: pkg/analyzer/lib/src/summary/summarize_const_expr.dart

Issue 1955103003: Fix order of output of references with invokeMethodRef. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/analyzer/test/src/summary/summary_common.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) 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 serialization.summarize_const_expr; 5 library serialization.summarize_const_expr;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/element/type.dart' show DartType; 9 import 'package:analyzer/dart/element/type.dart' show DartType;
10 import 'package:analyzer/src/summary/format.dart'; 10 import 'package:analyzer/src/summary/format.dart';
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 void _serializeMethodInvocation(MethodInvocation invocation) { 460 void _serializeMethodInvocation(MethodInvocation invocation) {
461 if (invocation.target != null || 461 if (invocation.target != null ||
462 invocation.methodName.name != 'identical') { 462 invocation.methodName.name != 'identical') {
463 isValidConst = false; 463 isValidConst = false;
464 } 464 }
465 Expression target = invocation.target; 465 Expression target = invocation.target;
466 SimpleIdentifier methodName = invocation.methodName; 466 SimpleIdentifier methodName = invocation.methodName;
467 ArgumentList argumentList = invocation.argumentList; 467 ArgumentList argumentList = invocation.argumentList;
468 if (_isIdentifierSequence(methodName)) { 468 if (_isIdentifierSequence(methodName)) {
469 EntityRefBuilder ref = serializeIdentifierSequence(methodName); 469 EntityRefBuilder ref = serializeIdentifierSequence(methodName);
470 _serializeArguments(argumentList);
470 references.add(ref); 471 references.add(ref);
471 _serializeArguments(argumentList);
472 operations.add(UnlinkedConstOperation.invokeMethodRef); 472 operations.add(UnlinkedConstOperation.invokeMethodRef);
473 } else { 473 } else {
474 if (!invocation.isCascaded) { 474 if (!invocation.isCascaded) {
475 _serialize(target); 475 _serialize(target);
476 } 476 }
477 _serializeArguments(argumentList); 477 _serializeArguments(argumentList);
478 strings.add(methodName.name); 478 strings.add(methodName.name);
479 operations.add(UnlinkedConstOperation.invokeMethod); 479 operations.add(UnlinkedConstOperation.invokeMethod);
480 } 480 }
481 } 481 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 expr = (expr as PrefixedIdentifier).prefix; 582 expr = (expr as PrefixedIdentifier).prefix;
583 } else if (expr is PropertyAccess) { 583 } else if (expr is PropertyAccess) {
584 expr = (expr as PropertyAccess).target; 584 expr = (expr as PropertyAccess).target;
585 } else { 585 } else {
586 return false; 586 return false;
587 } 587 }
588 } 588 }
589 return false; 589 return false;
590 } 590 }
591 } 591 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698