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

Side by Side Diff: pkg/analyzer/lib/src/context/context.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/doc/tasks.html ('k') | pkg/analyzer/lib/src/generated/incremental_resolver.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 library analyzer.src.context.context; 5 library analyzer.src.context.context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); 1302 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED);
1303 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); 1303 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
1304 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); 1304 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
1305 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); 1305 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
1306 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); 1306 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED);
1307 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); 1307 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED);
1308 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); 1308 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED);
1309 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED); 1309 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED);
1310 entry.setState(RESOLVED_UNIT11, CacheState.FLUSHED); 1310 entry.setState(RESOLVED_UNIT11, CacheState.FLUSHED);
1311 entry.setState(RESOLVED_UNIT12, CacheState.FLUSHED); 1311 entry.setState(RESOLVED_UNIT12, CacheState.FLUSHED);
1312 entry.setState(RESOLVED_UNIT13, CacheState.FLUSHED);
1313 // USED_IMPORTED_ELEMENTS 1312 // USED_IMPORTED_ELEMENTS
1314 // USED_LOCAL_ELEMENTS 1313 // USED_LOCAL_ELEMENTS
1315 setValue(STRONG_MODE_ERRORS, AnalysisError.NO_ERRORS); 1314 setValue(STRONG_MODE_ERRORS, AnalysisError.NO_ERRORS);
1316 setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS); 1315 setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS);
1317 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS); 1316 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS);
1318 }); 1317 });
1319 1318
1320 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request); 1319 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request);
1321 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST); 1320 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST);
1322 } 1321 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); 1381 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED);
1383 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); 1382 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
1384 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); 1383 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
1385 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); 1384 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
1386 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); 1385 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED);
1387 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); 1386 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED);
1388 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); 1387 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED);
1389 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED); 1388 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED);
1390 entry.setState(RESOLVED_UNIT11, CacheState.FLUSHED); 1389 entry.setState(RESOLVED_UNIT11, CacheState.FLUSHED);
1391 entry.setState(RESOLVED_UNIT12, CacheState.FLUSHED); 1390 entry.setState(RESOLVED_UNIT12, CacheState.FLUSHED);
1392 entry.setState(RESOLVED_UNIT13, CacheState.FLUSHED);
1393 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); 1391 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
1394 } 1392 }
1395 1393
1396 @override 1394 @override
1397 void visitContentCache(ContentCacheVisitor visitor) { 1395 void visitContentCache(ContentCacheVisitor visitor) {
1398 _contentCache.accept(visitor); 1396 _contentCache.accept(visitor);
1399 } 1397 }
1400 1398
1401 /** 1399 /**
1402 * Add all of the sources contained in the given source [container] to the 1400 * Add all of the sources contained in the given source [container] to the
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 /** 1565 /**
1568 * Return a [CompilationUnit] for the given library and unit sources, which 1566 * Return a [CompilationUnit] for the given library and unit sources, which
1569 * can be incrementally resolved. 1567 * can be incrementally resolved.
1570 */ 1568 */
1571 CompilationUnit _getIncrementallyResolvableUnit( 1569 CompilationUnit _getIncrementallyResolvableUnit(
1572 Source librarySource, Source unitSource) { 1570 Source librarySource, Source unitSource) {
1573 LibrarySpecificUnit target = 1571 LibrarySpecificUnit target =
1574 new LibrarySpecificUnit(librarySource, unitSource); 1572 new LibrarySpecificUnit(librarySource, unitSource);
1575 for (ResultDescriptor result in [ 1573 for (ResultDescriptor result in [
1576 RESOLVED_UNIT, 1574 RESOLVED_UNIT,
1577 RESOLVED_UNIT13,
1578 RESOLVED_UNIT12, 1575 RESOLVED_UNIT12,
1579 RESOLVED_UNIT11, 1576 RESOLVED_UNIT11,
1580 RESOLVED_UNIT10, 1577 RESOLVED_UNIT10,
1581 RESOLVED_UNIT9, 1578 RESOLVED_UNIT9,
1582 RESOLVED_UNIT8 1579 RESOLVED_UNIT8
1583 ]) { 1580 ]) {
1584 CompilationUnit unit = getResult(target, result); 1581 CompilationUnit unit = getResult(target, result);
1585 if (unit != null) { 1582 if (unit != null) {
1586 return unit; 1583 return unit;
1587 } 1584 }
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 } 2298 }
2302 DartSdk sdk = factory.dartSdk; 2299 DartSdk sdk = factory.dartSdk;
2303 if (sdk == null) { 2300 if (sdk == null) {
2304 throw new IllegalArgumentException( 2301 throw new IllegalArgumentException(
2305 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2302 "The source factory for an SDK analysis context must have a DartUriRes olver");
2306 } 2303 }
2307 return new AnalysisCache( 2304 return new AnalysisCache(
2308 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2305 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2309 } 2306 }
2310 } 2307 }
OLDNEW
« no previous file with comments | « pkg/analyzer/doc/tasks.html ('k') | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698