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

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

Issue 1718603002: Add summary support for ConstructorElement.nameEnd and .periodOffset. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.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 1d27fc29747cbf2390352e8ebc4c7699b7f3c63d..40c9a9b2e9619fa3c8b1f5cc195c959ebd0152a1 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1062,6 +1062,13 @@ class _LibraryResynthesizer {
assert(serializedExecutable.kind == UnlinkedExecutableKind.constructor);
currentConstructor = new ConstructorElementImpl(
serializedExecutable.name, serializedExecutable.nameOffset);
+ if (serializedExecutable.name.isEmpty) {
+ currentConstructor.nameEnd =
+ serializedExecutable.nameOffset + classType.name.length;
+ } else {
+ currentConstructor.nameEnd = serializedExecutable.nameEnd;
+ currentConstructor.periodOffset = serializedExecutable.periodOffset;
+ }
constructors[serializedExecutable.name] = currentConstructor;
currentConstructor.returnType = classType;
buildExecutableCommonParts(currentConstructor, serializedExecutable);
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698