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

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

Issue 1936403002: Serialize / resynthesize 'isAsynchronous' and 'isGenerator' flags. (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
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_ast; 5 library serialization.summarize_ast;
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/ast/visitor.dart'; 9 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/dart/element/type.dart' show DartType; 10 import 'package:analyzer/dart/element/type.dart' show DartType;
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 if (isGetter) { 570 if (isGetter) {
571 b.kind = UnlinkedExecutableKind.getter; 571 b.kind = UnlinkedExecutableKind.getter;
572 } else if (isSetter) { 572 } else if (isSetter) {
573 b.kind = UnlinkedExecutableKind.setter; 573 b.kind = UnlinkedExecutableKind.setter;
574 nameString = '$nameString='; 574 nameString = '$nameString=';
575 } else { 575 } else {
576 b.kind = UnlinkedExecutableKind.functionOrMethod; 576 b.kind = UnlinkedExecutableKind.functionOrMethod;
577 } 577 }
578 b.isExternal = isExternal; 578 b.isExternal = isExternal;
579 b.isAbstract = !isExternal && body is EmptyFunctionBody; 579 b.isAbstract = !isExternal && body is EmptyFunctionBody;
580 b.isAsynchronous = body.isAsynchronous;
581 b.isGenerator = body.isGenerator;
580 b.name = nameString; 582 b.name = nameString;
581 b.nameOffset = nameOffset; 583 b.nameOffset = nameOffset;
582 b.typeParameters = 584 b.typeParameters =
583 serializeTypeParameters(typeParameters, typeParameterScope); 585 serializeTypeParameters(typeParameters, typeParameterScope);
584 if (!isTopLevel) { 586 if (!isTopLevel) {
585 b.isStatic = isDeclaredStatic; 587 b.isStatic = isDeclaredStatic;
586 } 588 }
587 b.returnType = serializeTypeName(returnType); 589 b.returnType = serializeTypeName(returnType);
588 bool isSemanticallyStatic = isTopLevel || isDeclaredStatic; 590 bool isSemanticallyStatic = isTopLevel || isDeclaredStatic;
589 if (formalParameters != null) { 591 if (formalParameters != null) {
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 /** 1280 /**
1279 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. 1281 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s.
1280 */ 1282 */
1281 class _TypeParameterScope extends _Scope { 1283 class _TypeParameterScope extends _Scope {
1282 /** 1284 /**
1283 * Get the number of [_ScopedTypeParameter]s defined in this 1285 * Get the number of [_ScopedTypeParameter]s defined in this
1284 * [_TypeParameterScope]. 1286 * [_TypeParameterScope].
1285 */ 1287 */
1286 int get length => _definedNames.length; 1288 int get length => _definedNames.length;
1287 } 1289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698