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

Side by Side Diff: pkg/analyzer/lib/src/summary/format.dart

Issue 1468583002: Add a unit index to prelinked type references in summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove an unnecessary TODO. 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
7 7
8 library analyzer.src.summary.format; 8 library analyzer.src.summary.format;
9 9
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 builder.unlinked = unlinked; 123 builder.unlinked = unlinked;
124 builder.dependencies = dependencies; 124 builder.dependencies = dependencies;
125 builder.importDependencies = importDependencies; 125 builder.importDependencies = importDependencies;
126 builder.references = references; 126 builder.references = references;
127 return builder; 127 return builder;
128 } 128 }
129 129
130 class PrelinkedReference { 130 class PrelinkedReference {
131 int _dependency; 131 int _dependency;
132 PrelinkedReferenceKind _kind; 132 PrelinkedReferenceKind _kind;
133 int _unit;
133 134
134 PrelinkedReference.fromJson(Map json) 135 PrelinkedReference.fromJson(Map json)
135 : _dependency = json["dependency"], 136 : _dependency = json["dependency"],
136 _kind = json["kind"] == null ? null : PrelinkedReferenceKind.values[json[" kind"]]; 137 _kind = json["kind"] == null ? null : PrelinkedReferenceKind.values[json[" kind"]],
138 _unit = json["unit"];
137 139
138 int get dependency => _dependency ?? 0; 140 int get dependency => _dependency ?? 0;
139 PrelinkedReferenceKind get kind => _kind ?? PrelinkedReferenceKind.classOrEnum ; 141 PrelinkedReferenceKind get kind => _kind ?? PrelinkedReferenceKind.classOrEnum ;
142 int get unit => _unit ?? 0;
140 } 143 }
141 144
142 class PrelinkedReferenceBuilder { 145 class PrelinkedReferenceBuilder {
143 final Map _json = {}; 146 final Map _json = {};
144 147
145 PrelinkedReferenceBuilder(builder.BuilderContext context); 148 PrelinkedReferenceBuilder(builder.BuilderContext context);
146 149
147 void set dependency(int _value) { 150 void set dependency(int _value) {
148 assert(!_json.containsKey("dependency")); 151 assert(!_json.containsKey("dependency"));
149 if (_value != null) { 152 if (_value != null) {
150 _json["dependency"] = _value; 153 _json["dependency"] = _value;
151 } 154 }
152 } 155 }
153 156
154 void set kind(PrelinkedReferenceKind _value) { 157 void set kind(PrelinkedReferenceKind _value) {
155 assert(!_json.containsKey("kind")); 158 assert(!_json.containsKey("kind"));
156 if (_value != null || _value == PrelinkedReferenceKind.classOrEnum) { 159 if (_value != null || _value == PrelinkedReferenceKind.classOrEnum) {
157 _json["kind"] = _value.index; 160 _json["kind"] = _value.index;
158 } 161 }
159 } 162 }
160 163
164 void set unit(int _value) {
165 assert(!_json.containsKey("unit"));
166 if (_value != null) {
167 _json["unit"] = _value;
168 }
169 }
170
161 Map finish() => _json; 171 Map finish() => _json;
162 } 172 }
163 173
164 PrelinkedReferenceBuilder encodePrelinkedReference(builder.BuilderContext builde rContext, {int dependency, PrelinkedReferenceKind kind}) { 174 PrelinkedReferenceBuilder encodePrelinkedReference(builder.BuilderContext builde rContext, {int dependency, PrelinkedReferenceKind kind, int unit}) {
165 PrelinkedReferenceBuilder builder = new PrelinkedReferenceBuilder(builderConte xt); 175 PrelinkedReferenceBuilder builder = new PrelinkedReferenceBuilder(builderConte xt);
166 builder.dependency = dependency; 176 builder.dependency = dependency;
167 builder.kind = kind; 177 builder.kind = kind;
178 builder.unit = unit;
168 return builder; 179 return builder;
169 } 180 }
170 181
171 class UnlinkedClass { 182 class UnlinkedClass {
172 String _name; 183 String _name;
173 int _unit; 184 int _unit;
174 List<UnlinkedTypeParam> _typeParameters; 185 List<UnlinkedTypeParam> _typeParameters;
175 UnlinkedTypeRef _supertype; 186 UnlinkedTypeRef _supertype;
176 List<UnlinkedTypeRef> _mixins; 187 List<UnlinkedTypeRef> _mixins;
177 List<UnlinkedTypeRef> _interfaces; 188 List<UnlinkedTypeRef> _interfaces;
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); 1287 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext);
1277 builder.name = name; 1288 builder.name = name;
1278 builder.unit = unit; 1289 builder.unit = unit;
1279 builder.type = type; 1290 builder.type = type;
1280 builder.isStatic = isStatic; 1291 builder.isStatic = isStatic;
1281 builder.isFinal = isFinal; 1292 builder.isFinal = isFinal;
1282 builder.isConst = isConst; 1293 builder.isConst = isConst;
1283 return builder; 1294 return builder;
1284 } 1295 }
1285 1296
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698