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

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

Issue 2288223003: Don't perform final fields and top-level variables type propagation. (Closed)
Patch Set: Rewrite 'reuse' tests using 'inferredTypeSlot'. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/plugin/engine_plugin.dart ('k') | pkg/analyzer/lib/src/task/dart.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 import 'dart:io' as io; 1 import 'dart:io' as io;
2 2
3 import 'package:analyzer/dart/element/element.dart'; 3 import 'package:analyzer/dart/element/element.dart';
4 import 'package:analyzer/file_system/file_system.dart'; 4 import 'package:analyzer/file_system/file_system.dart';
5 import 'package:analyzer/src/context/cache.dart'; 5 import 'package:analyzer/src/context/cache.dart';
6 import 'package:analyzer/src/context/context.dart'; 6 import 'package:analyzer/src/context/context.dart';
7 import 'package:analyzer/src/dart/element/element.dart'; 7 import 'package:analyzer/src/dart/element/element.dart';
8 import 'package:analyzer/src/generated/engine.dart'; 8 import 'package:analyzer/src/generated/engine.dart';
9 import 'package:analyzer/src/generated/java_io.dart'; 9 import 'package:analyzer/src/generated/java_io.dart';
10 import 'package:analyzer/src/generated/resolver.dart'; 10 import 'package:analyzer/src/generated/resolver.dart';
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (result == CREATED_RESOLVED_UNIT1 || 246 if (result == CREATED_RESOLVED_UNIT1 ||
247 result == CREATED_RESOLVED_UNIT2 || 247 result == CREATED_RESOLVED_UNIT2 ||
248 result == CREATED_RESOLVED_UNIT3 || 248 result == CREATED_RESOLVED_UNIT3 ||
249 result == CREATED_RESOLVED_UNIT4 || 249 result == CREATED_RESOLVED_UNIT4 ||
250 result == CREATED_RESOLVED_UNIT5 || 250 result == CREATED_RESOLVED_UNIT5 ||
251 result == CREATED_RESOLVED_UNIT6 || 251 result == CREATED_RESOLVED_UNIT6 ||
252 result == CREATED_RESOLVED_UNIT7 || 252 result == CREATED_RESOLVED_UNIT7 ||
253 result == CREATED_RESOLVED_UNIT8 || 253 result == CREATED_RESOLVED_UNIT8 ||
254 result == CREATED_RESOLVED_UNIT9 || 254 result == CREATED_RESOLVED_UNIT9 ||
255 result == CREATED_RESOLVED_UNIT10 || 255 result == CREATED_RESOLVED_UNIT10 ||
256 result == CREATED_RESOLVED_UNIT11 || 256 result == CREATED_RESOLVED_UNIT11) {
257 result == CREATED_RESOLVED_UNIT12) {
258 entry.setValue(result, true, TargetedResult.EMPTY_LIST); 257 entry.setValue(result, true, TargetedResult.EMPTY_LIST);
259 return true; 258 return true;
260 } 259 }
261 if (result == COMPILATION_UNIT_ELEMENT) { 260 if (result == COMPILATION_UNIT_ELEMENT) {
262 String libraryUri = target.library.uri.toString(); 261 String libraryUri = target.library.uri.toString();
263 String unitUri = target.unit.uri.toString(); 262 String unitUri = target.unit.uri.toString();
264 CompilationUnitElement unit = resynthesizer.getElement( 263 CompilationUnitElement unit = resynthesizer.getElement(
265 new ElementLocationImpl.con3(<String>[libraryUri, unitUri])); 264 new ElementLocationImpl.con3(<String>[libraryUri, unitUri]));
266 if (unit != null) { 265 if (unit != null) {
267 entry.setValue(result, unit, TargetedResult.EMPTY_LIST); 266 entry.setValue(result, unit, TargetedResult.EMPTY_LIST);
268 return true; 267 return true;
269 } 268 }
270 } 269 }
271 } else if (target is VariableElement) { 270 } else if (target is VariableElement) {
272 if (result == PROPAGATED_VARIABLE || result == INFERRED_STATIC_VARIABLE) { 271 if (result == INFERRED_STATIC_VARIABLE) {
273 entry.setValue(result, target, TargetedResult.EMPTY_LIST); 272 entry.setValue(result, target, TargetedResult.EMPTY_LIST);
274 return true; 273 return true;
275 } 274 }
276 } 275 }
277 // Unknown target. 276 // Unknown target.
278 return false; 277 return false;
279 } 278 }
280 279
281 /** 280 /**
282 * Create the [resynthesizer] instance. 281 * Create the [resynthesizer] instance.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 */ 479 */
481 @deprecated 480 @deprecated
482 class _InSummaryFallbackSource extends FileBasedSource 481 class _InSummaryFallbackSource extends FileBasedSource
483 implements InSummarySource { 482 implements InSummarySource {
484 @override 483 @override
485 final String summaryPath; 484 final String summaryPath;
486 485
487 _InSummaryFallbackSource(JavaFile file, Uri uri, this.summaryPath) 486 _InSummaryFallbackSource(JavaFile file, Uri uri, this.summaryPath)
488 : super(file, uri); 487 : super(file, uri);
489 } 488 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/plugin/engine_plugin.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698