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

Unified Diff: pkg/kernel/lib/binary/ast_from_binary.dart

Issue 2988373002: Store parts in Kernel Library, resynthesize parts in Analyzer. (Closed)
Patch Set: Fixes for review comments. Created 3 years, 4 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/kernel/lib/ast.dart ('k') | pkg/kernel/lib/binary/ast_to_binary.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/binary/ast_from_binary.dart
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index eb261df58cfaec4f7ecc59f65425ad390cbb87db..1c5814732cf40491323070944450d99d2482e72a 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -387,6 +387,7 @@ class BinaryBuilder {
_skipNodeList(readExpression);
}
_readLibraryDependencies(library);
+ _readLibraryParts(library);
_mergeNamedNodeList(library.typedefs, readTypedef, library);
_mergeNamedNodeList(library.classes, readClass, library);
_mergeNamedNodeList(library.fields, readField, library);
@@ -426,6 +427,17 @@ class BinaryBuilder {
return new List<Combinator>.generate(readUInt(), (i) => readCombinator());
}
+ void _readLibraryParts(Library library) {
+ int length = readUInt();
+ library.parts.length = length;
+ for (int i = 0; i < length; ++i) {
+ var annotations = readExpressionList();
+ var fileUri = readStringOrNullIfEmpty();
+ library.parts[i] = new LibraryPart(annotations, fileUri)
+ ..parent = library;
+ }
+ }
+
Typedef readTypedef() {
var canonicalName = readCanonicalNameReference();
var reference = canonicalName.getReference();
« no previous file with comments | « pkg/kernel/lib/ast.dart ('k') | pkg/kernel/lib/binary/ast_to_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698