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

Unified Diff: pkg/analyzer/lib/src/summary/format.dart

Issue 1420053011: Introduce code to generate summaries from an element model. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address code review comments. Created 5 years, 1 month 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/analyzer/lib/src/summary/format.dart
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index a997f980a73e87ed4a5280d6aca2a4106d2b8d64..56d555697592368f3318d7e9c2593c2f86d04750 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -7,6 +7,7 @@
library analyzer.src.summary.format;
+import 'dart:convert';
import 'builder.dart' as builder;
enum PrelinkedReferenceKind {
@@ -71,6 +72,8 @@ class PrelinkedLibrary {
_importDependencies = json["importDependencies"],
_references = json["references"]?.map((x) => new PrelinkedReference.fromJson(x))?.toList();
+ PrelinkedLibrary.fromBuffer(List<int> buffer) : this.fromJson(JSON.decode(UTF8.decode(buffer)));
+
UnlinkedLibrary get unlinked => _unlinked;
List<PrelinkedDependency> get dependencies => _dependencies ?? const <PrelinkedDependency>[];
List<int> get importDependencies => _importDependencies ?? const <int>[];

Powered by Google App Engine
This is Rietveld 408576698