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

Side by Side Diff: pkg/analyzer/lib/task/model.dart

Issue 1132103002: Remove memento. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/task/model.dart ('k') | pkg/analyzer/test/src/context/cache_test.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.task.model; 5 library analyzer.task.model;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; 9 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask;
10 import 'package:analyzer/src/generated/java_engine.dart'; 10 import 'package:analyzer/src/generated/java_engine.dart';
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 * The target for which result values are being produced. 96 * The target for which result values are being produced.
97 */ 97 */
98 final AnalysisTarget target; 98 final AnalysisTarget target;
99 99
100 /** 100 /**
101 * A table mapping input names to input values. 101 * A table mapping input names to input values.
102 */ 102 */
103 Map<String, dynamic> inputs; 103 Map<String, dynamic> inputs;
104 104
105 /** 105 /**
106 * The optional data that the task associated with [target] last time.
107 * This data may help to compute outputs more efficiently.
108 */
109 Object inputMemento;
110
111 /**
112 * A table mapping result descriptors whose values are produced by this task 106 * A table mapping result descriptors whose values are produced by this task
113 * to the values that were produced. 107 * to the values that were produced.
114 */ 108 */
115 Map<ResultDescriptor, dynamic> outputs = 109 Map<ResultDescriptor, dynamic> outputs =
116 new HashMap<ResultDescriptor, dynamic>(); 110 new HashMap<ResultDescriptor, dynamic>();
117 111
118 /** 112 /**
119 * An optional data that the task wants to associate with [target].
120 * This data may help later to compute outputs more efficiently.
121 */
122 Object outputMemento;
123
124 /**
125 * The exception that was thrown while performing this task, or `null` if the 113 * The exception that was thrown while performing this task, or `null` if the
126 * task completed successfully. 114 * task completed successfully.
127 */ 115 */
128 CaughtException caughtException; 116 CaughtException caughtException;
129 117
130 /** 118 /**
131 * Initialize a newly created task to perform analysis within the given 119 * Initialize a newly created task to perform analysis within the given
132 * [context] in order to produce results for the given [target]. 120 * [context] in order to produce results for the given [target].
133 */ 121 */
134 AnalysisTask(this.context, this.target); 122 AnalysisTask(this.context, this.target);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 /** 396 /**
409 * Return a list of the analysis results that will be computed by this task. 397 * Return a list of the analysis results that will be computed by this task.
410 */ 398 */
411 List<ResultDescriptor> get results; 399 List<ResultDescriptor> get results;
412 400
413 /** 401 /**
414 * Create and return a task that is described by this descriptor that can be 402 * Create and return a task that is described by this descriptor that can be
415 * used to compute results based on the given [inputs]. 403 * used to compute results based on the given [inputs].
416 */ 404 */
417 AnalysisTask createTask(AnalysisContext context, AnalysisTarget target, 405 AnalysisTask createTask(AnalysisContext context, AnalysisTarget target,
418 Map<String, dynamic> inputs, Object inputMemento); 406 Map<String, dynamic> inputs);
419 } 407 }
420 408
421 /** 409 /**
422 * A description of an input to an [AnalysisTask] that can be used to compute 410 * A description of an input to an [AnalysisTask] that can be used to compute
423 * that input. 411 * that input.
424 * 412 *
425 * Clients are not expected to subtype this class. 413 * Clients are not expected to subtype this class.
426 */ 414 */
427 abstract class TaskInput<V> { 415 abstract class TaskInput<V> {
428 /** 416 /**
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 * be computed, or `false` if the inputs have been computed. 470 * be computed, or `false` if the inputs have been computed.
483 * 471 *
484 * It is safe to invoke [moveNext] after it has returned `false`. In this case 472 * It is safe to invoke [moveNext] after it has returned `false`. In this case
485 * [moveNext] has no effect and will again return `false`. 473 * [moveNext] has no effect and will again return `false`.
486 * 474 *
487 * Throws a [StateError] if the value of the current result has not been 475 * Throws a [StateError] if the value of the current result has not been
488 * provided using [currentValue]. 476 * provided using [currentValue].
489 */ 477 */
490 bool moveNext(); 478 bool moveNext();
491 } 479 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/model.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698