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

Side by Side Diff: pkg/compiler/lib/src/serialization/element_serialization.dart

Issue 2120923002: Serialize async marker on getters. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/compiler/lib/src/serialization/modelz.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) 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 dart2js.serialization.elements; 5 library dart2js.serialization.elements;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart'; 8 import '../common/names.dart';
9 import '../constants/constructors.dart'; 9 import '../constants/constructors.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 void serialize(FunctionElement element, ObjectEncoder encoder, 537 void serialize(FunctionElement element, ObjectEncoder encoder,
538 SerializedElementKind kind) { 538 SerializedElementKind kind) {
539 encoder.setString(Key.NAME, element.name); 539 encoder.setString(Key.NAME, element.name);
540 SerializerUtil.serializeMetadata(element, encoder); 540 SerializerUtil.serializeMetadata(element, encoder);
541 SerializerUtil.serializePosition(element, encoder); 541 SerializerUtil.serializePosition(element, encoder);
542 SerializerUtil.serializeParameters(element, encoder); 542 SerializerUtil.serializeParameters(element, encoder);
543 encoder.setType(Key.TYPE, element.type); 543 encoder.setType(Key.TYPE, element.type);
544 if (element.isFunction) { 544 if (element.isFunction) {
545 encoder.setBool(Key.IS_OPERATOR, element.isOperator); 545 encoder.setBool(Key.IS_OPERATOR, element.isOperator);
546 encoder.setEnum(Key.ASYNC_MARKER, element.asyncMarker); 546 encoder.setEnum(Key.ASYNC_MARKER, element.asyncMarker);
547 } else if (element.isGetter) {
548 encoder.setEnum(Key.ASYNC_MARKER, element.asyncMarker);
547 } 549 }
548 SerializerUtil.serializeParentRelation(element, encoder); 550 SerializerUtil.serializeParentRelation(element, encoder);
549 encoder.setBool(Key.IS_EXTERNAL, element.isExternal); 551 encoder.setBool(Key.IS_EXTERNAL, element.isExternal);
550 encoder.setBool(Key.IS_ABSTRACT, element.isAbstract); 552 encoder.setBool(Key.IS_ABSTRACT, element.isAbstract);
551 encoder.setBool(Key.IS_INJECTED, element.isInjected); 553 encoder.setBool(Key.IS_INJECTED, element.isInjected);
552 if (element.isLocal) { 554 if (element.isLocal) {
553 LocalFunctionElement localFunction = element; 555 LocalFunctionElement localFunction = element;
554 encoder.setElement( 556 encoder.setElement(
555 Key.EXECUTABLE_CONTEXT, localFunction.executableContext); 557 Key.EXECUTABLE_CONTEXT, localFunction.executableContext);
556 } 558 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 return new LocalVariableElementZ(decoder); 843 return new LocalVariableElementZ(decoder);
842 case SerializedElementKind.EXTERNAL_LIBRARY: 844 case SerializedElementKind.EXTERNAL_LIBRARY:
843 case SerializedElementKind.EXTERNAL_LIBRARY_MEMBER: 845 case SerializedElementKind.EXTERNAL_LIBRARY_MEMBER:
844 case SerializedElementKind.EXTERNAL_CLASS_MEMBER: 846 case SerializedElementKind.EXTERNAL_CLASS_MEMBER:
845 case SerializedElementKind.EXTERNAL_CONSTRUCTOR: 847 case SerializedElementKind.EXTERNAL_CONSTRUCTOR:
846 break; 848 break;
847 } 849 }
848 throw new UnsupportedError("Unexpected element kind '${elementKind}."); 850 throw new UnsupportedError("Unexpected element kind '${elementKind}.");
849 } 851 }
850 } 852 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698