Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/instrumentation/instrumentation.dart'; | 10 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 624 if (AnalysisEngine.isDartFileName(name)) { | 624 if (AnalysisEngine.isDartFileName(name)) { |
| 625 return computeResult(source, SOURCE_KIND); | 625 return computeResult(source, SOURCE_KIND); |
| 626 } else if (AnalysisEngine.isHtmlFileName(name)) { | 626 } else if (AnalysisEngine.isHtmlFileName(name)) { |
| 627 return SourceKind.HTML; | 627 return SourceKind.HTML; |
| 628 } | 628 } |
| 629 return SourceKind.UNKNOWN; | 629 return SourceKind.UNKNOWN; |
| 630 } | 630 } |
| 631 | 631 |
| 632 @override | 632 @override |
| 633 LibraryElement computeLibraryElement(Source source) { | 633 LibraryElement computeLibraryElement(Source source) { |
| 634 assert(!driver.isTaskRunning); | |
|
Brian Wilkerson
2015/10/19 20:15:19
Do we want to add this, or was this left over from
Paul Berry
2015/10/19 20:31:29
This was added on purpose--in the absence of the b
| |
| 634 //_computeResult(source, HtmlEntry.ELEMENT); | 635 //_computeResult(source, HtmlEntry.ELEMENT); |
| 635 return computeResult(source, LIBRARY_ELEMENT); | 636 return computeResult(source, LIBRARY_ELEMENT); |
| 636 } | 637 } |
| 637 | 638 |
| 638 @override | 639 @override |
| 639 LineInfo computeLineInfo(Source source) => computeResult(source, LINE_INFO); | 640 LineInfo computeLineInfo(Source source) => computeResult(source, LINE_INFO); |
| 640 | 641 |
| 641 @override | 642 @override |
| 642 @deprecated | 643 @deprecated |
| 643 CompilationUnit computeResolvableCompilationUnit(Source source) { | 644 CompilationUnit computeResolvableCompilationUnit(Source source) { |
| (...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2110 new PendingFuture<T>(_context, target, computeValue); | 2111 new PendingFuture<T>(_context, target, computeValue); |
| 2111 if (!pendingFuture.evaluate(entry)) { | 2112 if (!pendingFuture.evaluate(entry)) { |
| 2112 _context._pendingFutureTargets | 2113 _context._pendingFutureTargets |
| 2113 .putIfAbsent(target, () => <PendingFuture>[]) | 2114 .putIfAbsent(target, () => <PendingFuture>[]) |
| 2114 .add(pendingFuture); | 2115 .add(pendingFuture); |
| 2115 scheduleComputation(); | 2116 scheduleComputation(); |
| 2116 } | 2117 } |
| 2117 return pendingFuture.future; | 2118 return pendingFuture.future; |
| 2118 } | 2119 } |
| 2119 } | 2120 } |
| OLD | NEW |