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

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

Issue 2694403003: Add CompilationUnitElement.lineInfo and resynthesize it. (Closed)
Patch Set: Created 3 years, 10 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/analyzer/lib/src/dart/element/handle.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 68c3017d5437bd1e923554e92c047b9a56d0cd5d..aeec4b4c2a5b3597d0f27363e925a5d8723297af 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1508,6 +1508,15 @@ class _UnitResynthesizer {
unlinkedUnit,
unlinkedPart,
unitSource.shortName);
+
+ {
+ List<int> lineStarts = unlinkedUnit.lineStarts;
+ if (lineStarts.isEmpty) {
+ lineStarts = const <int>[0];
+ }
+ unit.lineInfo = new LineInfo(lineStarts);
+ }
+
for (EntityRef t in linkedUnit.types) {
linkedTypeMap[t.slot] = t;
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/handle.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698