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

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

Issue 1403033002: State-carrying context API. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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) 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 library engine; 5 library engine;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:math' as math; 9 import 'dart:math' as math;
10 10
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 * comment is not cached. 463 * comment is not cached.
464 * 464 *
465 * Throws an [AnalysisException] if the documentation comment could not be 465 * Throws an [AnalysisException] if the documentation comment could not be
466 * determined because the analysis could not be performed. 466 * determined because the analysis could not be performed.
467 * 467 *
468 * <b>Note:</b> This method cannot be used in an async environment. 468 * <b>Note:</b> This method cannot be used in an async environment.
469 */ 469 */
470 String computeDocumentationComment(Element element); 470 String computeDocumentationComment(Element element);
471 471
472 /** 472 /**
473 * Return the stored state associated with the given object key. In case no
474 * state has been associated with the given [key], returns `null`.
475 */
476 Object getState(Object key);
477
478 /**
473 * Return a list containing all of the errors associated with the given 479 * Return a list containing all of the errors associated with the given
474 * [source]. If the errors are not already known then the source will be 480 * [source]. If the errors are not already known then the source will be
475 * analyzed in order to determine the errors associated with it. 481 * analyzed in order to determine the errors associated with it.
476 * 482 *
477 * Throws an [AnalysisException] if the errors could not be determined because 483 * Throws an [AnalysisException] if the errors could not be determined because
478 * the analysis could not be performed. 484 * the analysis could not be performed.
479 * 485 *
480 * <b>Note:</b> This method cannot be used in an async environment. 486 * <b>Note:</b> This method cannot be used in an async environment.
481 * 487 *
482 * See [getErrors]. 488 * See [getErrors].
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 893
888 /** 894 /**
889 * Set the contents of the given [source] to the given [contents] and mark the 895 * Set the contents of the given [source] to the given [contents] and mark the
890 * source as having changed. This has the effect of overriding the default 896 * source as having changed. This has the effect of overriding the default
891 * contents of the source. If the contents are `null` the override is removed 897 * contents of the source. If the contents are `null` the override is removed
892 * so that the default contents will be returned. 898 * so that the default contents will be returned.
893 */ 899 */
894 void setContents(Source source, String contents); 900 void setContents(Source source, String contents);
895 901
896 /** 902 /**
903 * Associate this [state] object with the given state [key].
Brian Wilkerson 2015/10/13 20:50:58 "state [key]" --> "[key]" Perhaps a Dart-like @se
904 */
905 void setState(Object key, Object state);
906
907 /**
897 * Check the cache for any invalid entries (entries whose modification time 908 * Check the cache for any invalid entries (entries whose modification time
898 * does not match the modification time of the source associated with the 909 * does not match the modification time of the source associated with the
899 * entry). Invalid entries will be marked as invalid so that the source will 910 * entry). Invalid entries will be marked as invalid so that the source will
900 * be re-analyzed. Return `true` if at least one entry was invalid. 911 * be re-analyzed. Return `true` if at least one entry was invalid.
901 */ 912 */
902 bool validateCacheConsistency(); 913 bool validateCacheConsistency();
903 } 914 }
904 915
905 /** 916 /**
906 * An [AnalysisContext]. 917 * An [AnalysisContext].
(...skipping 11157 matching lines...) Expand 10 before | Expand all | Expand 10 after
12064 PendingFuture pendingFuture = 12075 PendingFuture pendingFuture =
12065 new PendingFuture<T>(_context, source, computeValue); 12076 new PendingFuture<T>(_context, source, computeValue);
12066 if (!pendingFuture.evaluate(sourceEntry)) { 12077 if (!pendingFuture.evaluate(sourceEntry)) {
12067 _context._pendingFutureSources 12078 _context._pendingFutureSources
12068 .putIfAbsent(source, () => <PendingFuture>[]) 12079 .putIfAbsent(source, () => <PendingFuture>[])
12069 .add(pendingFuture); 12080 .add(pendingFuture);
12070 } 12081 }
12071 return pendingFuture.future; 12082 return pendingFuture.future;
12072 } 12083 }
12073 } 12084 }
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