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

Unified Diff: pkg/compiler/lib/src/serialization/constant_serialization.dart

Issue 1888803002: Support serialization of all resolved asts from dart:core (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix unittests. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/parser/parser.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/serialization/constant_serialization.dart
diff --git a/pkg/compiler/lib/src/serialization/constant_serialization.dart b/pkg/compiler/lib/src/serialization/constant_serialization.dart
index fae88188fcb89d9c625d674dea50fdb0133fa7e4..afaa3b4199b0bd6a5e729317748c55ffa5b2bf4c 100644
--- a/pkg/compiler/lib/src/serialization/constant_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/constant_serialization.dart
@@ -232,11 +232,13 @@ class ConstantDeserializer {
decoder.getConstant(Key.NAME),
decoder.getConstant(Key.DEFAULT, isOptional: true));
case ConstantExpressionKind.LIST:
- return new ListConstantExpression(
- decoder.getType(Key.TYPE), decoder.getConstants(Key.VALUES));
+ return new ListConstantExpression(decoder.getType(Key.TYPE),
+ decoder.getConstants(Key.VALUES, isOptional: true));
case ConstantExpressionKind.MAP:
- return new MapConstantExpression(decoder.getType(Key.TYPE),
- decoder.getConstants(Key.KEYS), decoder.getConstants(Key.VALUES));
+ return new MapConstantExpression(
+ decoder.getType(Key.TYPE),
+ decoder.getConstants(Key.KEYS, isOptional: true),
+ decoder.getConstants(Key.VALUES, isOptional: true));
case ConstantExpressionKind.NULL:
return new NullConstantExpression();
case ConstantExpressionKind.STRING:
@@ -249,7 +251,7 @@ class ConstantDeserializer {
return new StringLengthConstantExpression(
decoder.getConstant(Key.EXPRESSION));
case ConstantExpressionKind.SYMBOL:
- break;
+ return new SymbolConstantExpression(decoder.getString(Key.NAME));
case ConstantExpressionKind.TYPE:
return new TypeConstantExpression(decoder.getType(Key.TYPE));
case ConstantExpressionKind.UNARY:
« no previous file with comments | « pkg/compiler/lib/src/parser/parser.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698