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

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

Issue 2121743002: Support serialization of generic methods. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Don't serialize code with compile time errors. 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 | « pkg/compiler/lib/src/options.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 } 549 }
550 SerializerUtil.serializeParentRelation(element, encoder); 550 SerializerUtil.serializeParentRelation(element, encoder);
551 encoder.setBool(Key.IS_EXTERNAL, element.isExternal); 551 encoder.setBool(Key.IS_EXTERNAL, element.isExternal);
552 encoder.setBool(Key.IS_ABSTRACT, element.isAbstract); 552 encoder.setBool(Key.IS_ABSTRACT, element.isAbstract);
553 encoder.setBool(Key.IS_INJECTED, element.isInjected); 553 encoder.setBool(Key.IS_INJECTED, element.isInjected);
554 if (element.isLocal) { 554 if (element.isLocal) {
555 LocalFunctionElement localFunction = element; 555 LocalFunctionElement localFunction = element;
556 encoder.setElement( 556 encoder.setElement(
557 Key.EXECUTABLE_CONTEXT, localFunction.executableContext); 557 Key.EXECUTABLE_CONTEXT, localFunction.executableContext);
558 } 558 }
559 encoder.setTypes(Key.TYPE_VARIABLES, element.typeVariables);
559 } 560 }
560 } 561 }
561 562
562 class TypedefSerializer implements ElementSerializer { 563 class TypedefSerializer implements ElementSerializer {
563 const TypedefSerializer(); 564 const TypedefSerializer();
564 565
565 SerializedElementKind getSerializedKind(Element element) { 566 SerializedElementKind getSerializedKind(Element element) {
566 if (element.isTypedef) { 567 if (element.isTypedef) {
567 return SerializedElementKind.TYPEDEF; 568 return SerializedElementKind.TYPEDEF;
568 } 569 }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 return new LocalVariableElementZ(decoder); 844 return new LocalVariableElementZ(decoder);
844 case SerializedElementKind.EXTERNAL_LIBRARY: 845 case SerializedElementKind.EXTERNAL_LIBRARY:
845 case SerializedElementKind.EXTERNAL_LIBRARY_MEMBER: 846 case SerializedElementKind.EXTERNAL_LIBRARY_MEMBER:
846 case SerializedElementKind.EXTERNAL_CLASS_MEMBER: 847 case SerializedElementKind.EXTERNAL_CLASS_MEMBER:
847 case SerializedElementKind.EXTERNAL_CONSTRUCTOR: 848 case SerializedElementKind.EXTERNAL_CONSTRUCTOR:
848 break; 849 break;
849 } 850 }
850 throw new UnsupportedError("Unexpected element kind '${elementKind}."); 851 throw new UnsupportedError("Unexpected element kind '${elementKind}.");
851 } 852 }
852 } 853 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/options.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698