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

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1148413004: Fill CacheEntry.modificationTime for implicit sources. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | 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/src/cancelable_future.dart'; 10 import 'package:analyzer/src/cancelable_future.dart';
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 return true; 672 return true;
673 } 673 }
674 return source.exists(); 674 return source.exists();
675 } 675 }
676 676
677 @override 677 @override
678 CacheEntry getCacheEntry(AnalysisTarget target) { 678 CacheEntry getCacheEntry(AnalysisTarget target) {
679 CacheEntry entry = _cache.get(target); 679 CacheEntry entry = _cache.get(target);
680 if (entry == null) { 680 if (entry == null) {
681 entry = new CacheEntry(target); 681 entry = new CacheEntry(target);
682 if (target is Source) {
683 entry.modificationTime = getModificationStamp(target);
Brian Wilkerson 2015/05/22 18:58:52 Unless we explicitly want to not have a modificati
scheglov 2015/05/22 19:17:30 We use "modificationTime" only "_validateCacheCons
684 }
682 _cache.put(entry); 685 _cache.put(entry);
683 } 686 }
684 return entry; 687 return entry;
685 } 688 }
686 689
687 @override 690 @override
688 CompilationUnitElement getCompilationUnitElement( 691 CompilationUnitElement getCompilationUnitElement(
689 Source unitSource, Source librarySource) { 692 Source unitSource, Source librarySource) {
690 AnalysisTarget target = new LibrarySpecificUnit(librarySource, unitSource); 693 AnalysisTarget target = new LibrarySpecificUnit(librarySource, unitSource);
691 return _cache.getValue(target, COMPILATION_UNIT_ELEMENT); 694 return _cache.getValue(target, COMPILATION_UNIT_ELEMENT);
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1994 PendingFuture pendingFuture = 1997 PendingFuture pendingFuture =
1995 new PendingFuture<T>(_context, target, computeValue); 1998 new PendingFuture<T>(_context, target, computeValue);
1996 if (!pendingFuture.evaluate(entry)) { 1999 if (!pendingFuture.evaluate(entry)) {
1997 _context._pendingFutureTargets 2000 _context._pendingFutureTargets
1998 .putIfAbsent(target, () => <PendingFuture>[]) 2001 .putIfAbsent(target, () => <PendingFuture>[])
1999 .add(pendingFuture); 2002 .add(pendingFuture);
2000 } 2003 }
2001 return pendingFuture.future; 2004 return pendingFuture.future;
2002 } 2005 }
2003 } 2006 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698