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

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

Issue 1967073002: Check closure data for serialization (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/serialization/modelz.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart
diff --git a/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart b/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart
index 633b65efb326cb549e36a2862f00977465544bac..de45dd1314fbcf58968e8e23346f6bb0bd3b70f2 100644
--- a/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart
@@ -146,11 +146,12 @@ class ResolvedAstSerializer extends Visitor {
}
objectEncoder.setEnum(Key.SUB_KIND, kind);
root.accept(indexComputer);
+ objectEncoder.setBool(Key.CONTAINS_TRY, elements.containsTryStatement);
if (resolvedAst.body != null) {
int index = nodeIndices[resolvedAst.body];
assert(invariant(element, index != null,
- message:
- "No index for body of $element: ${resolvedAst.body} ($nodeIndices)."));
+ message: "No index for body of $element: "
+ "${resolvedAst.body} ($nodeIndices)."));
objectEncoder.setInt(Key.BODY, index);
}
root.accept(this);
@@ -528,6 +529,8 @@ class ResolvedAstDeserializer {
Map<Node, int> nodeIndices = indexComputer.nodeIndices;
List<Node> nodeList = indexComputer.nodeList;
root.accept(indexComputer);
+ elements.containsTryStatement = objectDecoder.getBool(Key.CONTAINS_TRY);
+
Node body;
int bodyNodeIndex = objectDecoder.getInt(Key.BODY, isOptional: true);
if (bodyNodeIndex != null) {
« no previous file with comments | « pkg/compiler/lib/src/serialization/modelz.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698