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

Side by Side Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2640793006: Don't create FileState(s) for SDK source in _ContentCacheWrapper. (Closed)
Patch Set: Created 3 years, 11 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/analysis_server/test/domain_diagnostic_test.dart ('k') | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement; 10 import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement;
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 throw new UnimplementedError(); 1542 throw new UnimplementedError();
1543 } 1543 }
1544 1544
1545 @override 1545 @override
1546 String getContents(Source source) { 1546 String getContents(Source source) {
1547 return _getFileForSource(source).content; 1547 return _getFileForSource(source).content;
1548 } 1548 }
1549 1549
1550 @override 1550 @override
1551 bool getExists(Source source) { 1551 bool getExists(Source source) {
1552 if (source.isInSystemLibrary) {
1553 return true;
1554 }
1552 return _getFileForSource(source).exists; 1555 return _getFileForSource(source).exists;
1553 } 1556 }
1554 1557
1555 @override 1558 @override
1556 int getModificationStamp(Source source) { 1559 int getModificationStamp(Source source) {
1560 if (source.isInSystemLibrary) {
1561 return 0;
1562 }
1557 return _getFileForSource(source).exists ? 0 : -1; 1563 return _getFileForSource(source).exists ? 0 : -1;
1558 } 1564 }
1559 1565
1560 @override 1566 @override
1561 String setContents(Source source, String contents) { 1567 String setContents(Source source, String contents) {
1562 throw new UnimplementedError(); 1568 throw new UnimplementedError();
1563 } 1569 }
1564 1570
1565 FileState _getFileForSource(Source source) { 1571 FileState _getFileForSource(Source source) {
1566 String path = source.fullName; 1572 String path = source.fullName;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 libraryDeclarations.add(new TopLevelDeclarationInSource( 1693 libraryDeclarations.add(new TopLevelDeclarationInSource(
1688 file.source, declaration, isExported)); 1694 file.source, declaration, isExported));
1689 } 1695 }
1690 } 1696 }
1691 } 1697 }
1692 1698
1693 // We're not done yet. 1699 // We're not done yet.
1694 return false; 1700 return false;
1695 } 1701 }
1696 } 1702 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/domain_diagnostic_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698