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

Unified Diff: pkg/compiler/lib/src/serialization/modelz.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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/serialization/modelz.dart
diff --git a/pkg/compiler/lib/src/serialization/modelz.dart b/pkg/compiler/lib/src/serialization/modelz.dart
index 1c67709689de69bea2846a7a99078fc52d62a521..e0c60ba8b9a130cff42fcc1f4d91efb91440b61d 100644
--- a/pkg/compiler/lib/src/serialization/modelz.dart
+++ b/pkg/compiler/lib/src/serialization/modelz.dart
@@ -788,6 +788,8 @@ abstract class ParametersMixin
namedParameterTypes.add(parameter.type);
}
}
+ List<DartType> typeVariables =
+ _decoder.getTypes(Key.TYPE_VARIABLES, isOptional: true);
FunctionType type = new FunctionType(
this,
@@ -797,6 +799,7 @@ abstract class ParametersMixin
namedParameters,
namedParameterTypes);
_functionSignature = new FunctionSignatureX(
+ typeVariables: typeVariables,
requiredParameters: requiredParameters,
requiredParameterCount: requiredParameterCount,
optionalParameters: optionalParameters,
@@ -1873,7 +1876,7 @@ class TypedefElementZ extends DeserializedElementZ
class TypeVariableElementZ extends DeserializedElementZ
with AnalyzableElementMixin, AstElementMixinZ, TypedElementMixin
implements TypeVariableElement {
- TypeDeclarationElement _typeDeclaration;
+ GenericElement _typeDeclaration;
TypeVariableType _type;
DartType _bound;
Name _memberName;
@@ -1910,7 +1913,7 @@ class TypeVariableElementZ extends DeserializedElementZ
int get index => _decoder.getInt(Key.INDEX);
@override
- TypeDeclarationElement get typeDeclaration {
+ GenericElement get typeDeclaration {
if (_typeDeclaration == null) {
_typeDeclaration = _decoder.getElement(Key.TYPE_DECLARATION);
}
« no previous file with comments | « pkg/compiler/lib/src/serialization/keys.dart ('k') | pkg/compiler/lib/src/serialization/type_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698