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/resynthesize.dart

Issue 1859723002: Support for serializing prefix/postfix increment/decrement. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 summary_resynthesizer; 5 library summary_resynthesizer;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 SimpleIdentifier identifier = AstFactory.identifier3(name); 451 SimpleIdentifier identifier = AstFactory.identifier3(name);
452 identifier.staticElement = resynthesizer.currentConstructor.parameters 452 identifier.staticElement = resynthesizer.currentConstructor.parameters
453 .firstWhere((parameter) => parameter.name == name, 453 .firstWhere((parameter) => parameter.name == name,
454 orElse: () => throw new StateError( 454 orElse: () => throw new StateError(
455 'Unable to resolve constructor parameter: $name')); 455 'Unable to resolve constructor parameter: $name'));
456 _push(identifier); 456 _push(identifier);
457 break; 457 break;
458 case UnlinkedConstOperation.assignToRef: 458 case UnlinkedConstOperation.assignToRef:
459 case UnlinkedConstOperation.assignToProperty: 459 case UnlinkedConstOperation.assignToProperty:
460 case UnlinkedConstOperation.assignToIndex: 460 case UnlinkedConstOperation.assignToIndex:
461 case UnlinkedConstOperation.extractIndex:
461 throw new UnimplementedError('$operation'); 462 throw new UnimplementedError('$operation');
462 } 463 }
463 } 464 }
464 return stack.single; 465 return stack.single;
465 } 466 }
466 467
467 /** 468 /**
468 * Build the identifier sequence (a single or prefixed identifier, or a 469 * Build the identifier sequence (a single or prefixed identifier, or a
469 * property access) corresponding to the given reference [info]. 470 * property access) corresponding to the given reference [info].
470 */ 471 */
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2613 static String _getElementIdentifier(String name, ReferenceKind kind) { 2614 static String _getElementIdentifier(String name, ReferenceKind kind) {
2614 if (kind == ReferenceKind.topLevelPropertyAccessor || 2615 if (kind == ReferenceKind.topLevelPropertyAccessor ||
2615 kind == ReferenceKind.propertyAccessor) { 2616 kind == ReferenceKind.propertyAccessor) {
2616 if (!name.endsWith('=')) { 2617 if (!name.endsWith('=')) {
2617 return name + '?'; 2618 return name + '?';
2618 } 2619 }
2619 } 2620 }
2620 return name; 2621 return name;
2621 } 2622 }
2622 } 2623 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/summarize_const_expr.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698