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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 1215433008: Remove dead code for an unused (old) task (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | pkg/analyzer/lib/src/task/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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine; 8 library engine;
9 9
10 import 'dart:async'; 10 import 'dart:async';
11 import 'dart:collection'; 11 import 'dart:collection';
12 import 'dart:math' as math; 12 import 'dart:math' as math;
13 13
14 import 'package:analyzer/src/cancelable_future.dart'; 14 import 'package:analyzer/src/cancelable_future.dart';
15 import 'package:analyzer/src/context/cache.dart' as cache; 15 import 'package:analyzer/src/context/cache.dart' as cache;
16 import 'package:analyzer/src/context/context.dart' as newContext; 16 import 'package:analyzer/src/context/context.dart' as newContext;
17 import 'package:analyzer/src/generated/incremental_resolution_validator.dart'; 17 import 'package:analyzer/src/generated/incremental_resolution_validator.dart';
18 import 'package:analyzer/src/plugin/command_line_plugin.dart'; 18 import 'package:analyzer/src/plugin/command_line_plugin.dart';
19 import 'package:analyzer/src/plugin/engine_plugin.dart'; 19 import 'package:analyzer/src/plugin/engine_plugin.dart';
20 import 'package:analyzer/src/plugin/options_plugin.dart'; 20 import 'package:analyzer/src/plugin/options_plugin.dart';
21 import 'package:analyzer/src/services/lint.dart'; 21 import 'package:analyzer/src/services/lint.dart';
22 import 'package:analyzer/src/task/manager.dart'; 22 import 'package:analyzer/src/task/manager.dart';
23 import 'package:analyzer/src/task/task_dart.dart';
24 import 'package:analyzer/task/dart.dart'; 23 import 'package:analyzer/task/dart.dart';
25 import 'package:analyzer/task/model.dart'; 24 import 'package:analyzer/task/model.dart';
26 import 'package:html/dom.dart' show Document; 25 import 'package:html/dom.dart' show Document;
27 import 'package:plugin/manager.dart'; 26 import 'package:plugin/manager.dart';
28 import 'package:plugin/plugin.dart'; 27 import 'package:plugin/plugin.dart';
29 28
30 import '../../instrumentation/instrumentation.dart'; 29 import '../../instrumentation/instrumentation.dart';
31 import 'ast.dart'; 30 import 'ast.dart';
32 import 'constant.dart'; 31 import 'constant.dart';
33 import 'element.dart'; 32 import 'element.dart';
(...skipping 4206 matching lines...) Expand 10 before | Expand all | Expand 10 after
4240 } 4239 }
4241 // reset unit in the notification, it is out of date now 4240 // reset unit in the notification, it is out of date now
4242 ChangeNoticeImpl notice = _pendingNotices[source]; 4241 ChangeNoticeImpl notice = _pendingNotices[source];
4243 if (notice != null) { 4242 if (notice != null) {
4244 notice.resolvedDartUnit = null; 4243 notice.resolvedDartUnit = null;
4245 notice.resolvedHtmlUnit = null; 4244 notice.resolvedHtmlUnit = null;
4246 } 4245 }
4247 } 4246 }
4248 4247
4249 /** 4248 /**
4250 * Record the results produced by performing a [task] and return the cache
4251 * entry associated with the results.
4252 */
4253 DartEntry _recordBuildUnitElementTask(BuildUnitElementTask task) {
4254 Source source = task.source;
4255 Source library = task.library;
4256 DartEntry dartEntry = _cache.get(source);
4257 CaughtException thrownException = task.exception;
4258 if (thrownException != null) {
4259 dartEntry.recordBuildElementErrorInLibrary(library, thrownException);
4260 throw new AnalysisException('<rethrow>', thrownException);
4261 }
4262 dartEntry.setValueInLibrary(DartEntry.BUILT_UNIT, library, task.unit);
4263 dartEntry.setValueInLibrary(
4264 DartEntry.BUILT_ELEMENT, library, task.unitElement);
4265 ChangeNoticeImpl notice = getNotice(source);
4266 LineInfo lineInfo = dartEntry.getValue(SourceEntry.LINE_INFO);
4267 notice.setErrors(dartEntry.allErrors, lineInfo);
4268 return dartEntry;
4269 }
4270
4271 /**
4272 * Given a [dartEntry] and a [library] element, record the library element and 4249 * Given a [dartEntry] and a [library] element, record the library element and
4273 * other information gleaned from the element in the cache entry. 4250 * other information gleaned from the element in the cache entry.
4274 */ 4251 */
4275 void _recordElementData(DartEntry dartEntry, LibraryElement library, 4252 void _recordElementData(DartEntry dartEntry, LibraryElement library,
4276 Source librarySource, Source htmlSource) { 4253 Source librarySource, Source htmlSource) {
4277 dartEntry.setValue(DartEntry.ELEMENT, library); 4254 dartEntry.setValue(DartEntry.ELEMENT, library);
4278 dartEntry.setValue(DartEntry.IS_LAUNCHABLE, library.entryPoint != null); 4255 dartEntry.setValue(DartEntry.IS_LAUNCHABLE, library.entryPoint != null);
4279 dartEntry.setValue(DartEntry.IS_CLIENT, 4256 dartEntry.setValue(DartEntry.IS_CLIENT,
4280 _isClient(library, htmlSource, new HashSet<LibraryElement>())); 4257 _isClient(library, htmlSource, new HashSet<LibraryElement>()));
4281 } 4258 }
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
4833 /** 4810 /**
4834 * An object used by an analysis context to record the results of a task. 4811 * An object used by an analysis context to record the results of a task.
4835 */ 4812 */
4836 class AnalysisContextImpl_AnalysisTaskResultRecorder 4813 class AnalysisContextImpl_AnalysisTaskResultRecorder
4837 implements AnalysisTaskVisitor<SourceEntry> { 4814 implements AnalysisTaskVisitor<SourceEntry> {
4838 final AnalysisContextImpl AnalysisContextImpl_this; 4815 final AnalysisContextImpl AnalysisContextImpl_this;
4839 4816
4840 AnalysisContextImpl_AnalysisTaskResultRecorder(this.AnalysisContextImpl_this); 4817 AnalysisContextImpl_AnalysisTaskResultRecorder(this.AnalysisContextImpl_this);
4841 4818
4842 @override 4819 @override
4843 DartEntry visitBuildUnitElementTask(BuildUnitElementTask task) =>
4844 AnalysisContextImpl_this._recordBuildUnitElementTask(task);
4845
4846 @override
4847 DartEntry visitGenerateDartErrorsTask(GenerateDartErrorsTask task) => 4820 DartEntry visitGenerateDartErrorsTask(GenerateDartErrorsTask task) =>
4848 AnalysisContextImpl_this._recordGenerateDartErrorsTask(task); 4821 AnalysisContextImpl_this._recordGenerateDartErrorsTask(task);
4849 4822
4850 @override 4823 @override
4851 DartEntry visitGenerateDartHintsTask(GenerateDartHintsTask task) => 4824 DartEntry visitGenerateDartHintsTask(GenerateDartHintsTask task) =>
4852 AnalysisContextImpl_this._recordGenerateDartHintsTask(task); 4825 AnalysisContextImpl_this._recordGenerateDartHintsTask(task);
4853 4826
4854 @override 4827 @override
4855 DartEntry visitGenerateDartLintsTask(GenerateDartLintsTask task) => 4828 DartEntry visitGenerateDartLintsTask(GenerateDartLintsTask task) =>
4856 AnalysisContextImpl_this._recordGenerateDartLintsTask(task); 4829 AnalysisContextImpl_this._recordGenerateDartLintsTask(task);
(...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after
6536 /** 6509 /**
6537 * An object used to visit tasks. While tasks are not structured in any 6510 * An object used to visit tasks. While tasks are not structured in any
6538 * interesting way, this class provides the ability to dispatch to an 6511 * interesting way, this class provides the ability to dispatch to an
6539 * appropriate method. 6512 * appropriate method.
6540 */ 6513 */
6541 abstract class AnalysisTaskVisitor<E> { 6514 abstract class AnalysisTaskVisitor<E> {
6542 /** 6515 /**
6543 * Visit the given [task], returning the result of the visit. This method will 6516 * Visit the given [task], returning the result of the visit. This method will
6544 * throw an AnalysisException if the visitor throws an exception. 6517 * throw an AnalysisException if the visitor throws an exception.
6545 */ 6518 */
6546 E visitBuildUnitElementTask(BuildUnitElementTask task);
6547
6548 /**
6549 * Visit the given [task], returning the result of the visit. This method will
6550 * throw an AnalysisException if the visitor throws an exception.
6551 */
6552 E visitGenerateDartErrorsTask(GenerateDartErrorsTask task); 6519 E visitGenerateDartErrorsTask(GenerateDartErrorsTask task);
6553 6520
6554 /** 6521 /**
6555 * Visit the given [task], returning the result of the visit. This method will 6522 * Visit the given [task], returning the result of the visit. This method will
6556 * throw an AnalysisException if the visitor throws an exception. 6523 * throw an AnalysisException if the visitor throws an exception.
6557 */ 6524 */
6558 E visitGenerateDartHintsTask(GenerateDartHintsTask task); 6525 E visitGenerateDartHintsTask(GenerateDartHintsTask task);
6559 6526
6560 /** 6527 /**
6561 * Visit the given [task], returning the result of the visit. This method will 6528 * Visit the given [task], returning the result of the visit. This method will
(...skipping 5305 matching lines...) Expand 10 before | Expand all | Expand 10 after
11867 PendingFuture pendingFuture = 11834 PendingFuture pendingFuture =
11868 new PendingFuture<T>(_context, source, computeValue); 11835 new PendingFuture<T>(_context, source, computeValue);
11869 if (!pendingFuture.evaluate(sourceEntry)) { 11836 if (!pendingFuture.evaluate(sourceEntry)) {
11870 _context._pendingFutureSources 11837 _context._pendingFutureSources
11871 .putIfAbsent(source, () => <PendingFuture>[]) 11838 .putIfAbsent(source, () => <PendingFuture>[])
11872 .add(pendingFuture); 11839 .add(pendingFuture);
11873 } 11840 }
11874 return pendingFuture.future; 11841 return pendingFuture.future;
11875 } 11842 }
11876 } 11843 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/task_dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698