| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |