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

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

Issue 956103002: Add instrumentation (issue 22572) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/instrumentation/instrumentation.dart ('k') | pkg/analyzer/lib/task/model.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:math" as math; 10 import "dart:math" as math;
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 /** 395 /**
396 * Return an array containing all of the sources known to this context that re present the defining 396 * Return an array containing all of the sources known to this context that re present the defining
397 * compilation unit of a library. The contents of the array can be incomplete. 397 * compilation unit of a library. The contents of the array can be incomplete.
398 * 398 *
399 * @return the sources known to this context that represent the defining compi lation unit of a 399 * @return the sources known to this context that represent the defining compi lation unit of a
400 * library 400 * library
401 */ 401 */
402 List<Source> get librarySources; 402 List<Source> get librarySources;
403 403
404 /** 404 /**
405 * Return a client-provided name used to identify this context, or `null` if
406 * the client has not provided a name.
407 */
408 String get name;
409
410 /**
411 * Set the client-provided name used to identify this context to the given
412 * [name].
413 */
414 set name(String name);
415
416 /**
405 * The stream that is notified when sources have been added or removed, 417 * The stream that is notified when sources have been added or removed,
406 * or the source's content has changed. 418 * or the source's content has changed.
407 */ 419 */
408 Stream<SourcesChangedEvent> get onSourcesChanged; 420 Stream<SourcesChangedEvent> get onSourcesChanged;
409 421
410 /** 422 /**
411 * Return an array containing all of the sources known to this context and the ir resolution state 423 * Return an array containing all of the sources known to this context and the ir resolution state
412 * is not valid or flush. So, these sources are not safe to update during refa ctoring, because we 424 * is not valid or flush. So, these sources are not safe to update during refa ctoring, because we
413 * may be don't know all the references in them. 425 * may be don't know all the references in them.
414 * 426 *
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 * The next context identifier. 936 * The next context identifier.
925 */ 937 */
926 static int _NEXT_ID = 0; 938 static int _NEXT_ID = 0;
927 939
928 /** 940 /**
929 * The unique identifier of this context. 941 * The unique identifier of this context.
930 */ 942 */
931 final int _id = _NEXT_ID++; 943 final int _id = _NEXT_ID++;
932 944
933 /** 945 /**
946 * A client-provided name used to identify this context, or `null` if the
947 * client has not provided a name.
948 */
949 String name;
950
951 /**
934 * The set of analysis options controlling the behavior of this context. 952 * The set of analysis options controlling the behavior of this context.
935 */ 953 */
936 AnalysisOptionsImpl _options = new AnalysisOptionsImpl(); 954 AnalysisOptionsImpl _options = new AnalysisOptionsImpl();
937 955
938 /** 956 /**
939 * A flag indicating whether errors related to sources in the SDK should be ge nerated and 957 * A flag indicating whether errors related to sources in the SDK should be ge nerated and
940 * reported. 958 * reported.
941 */ 959 */
942 bool _generateSdkErrors = true; 960 bool _generateSdkErrors = true;
943 961
(...skipping 5887 matching lines...) Expand 10 before | Expand all | Expand 10 after
6831 String toString() => taskDescription; 6849 String toString() => taskDescription;
6832 6850
6833 /** 6851 /**
6834 * Perform this analysis task, ensuring that all exceptions are wrapped in an 6852 * Perform this analysis task, ensuring that all exceptions are wrapped in an
6835 * [AnalysisException]. 6853 * [AnalysisException].
6836 * 6854 *
6837 * @throws AnalysisException if any exception occurs while performing the task 6855 * @throws AnalysisException if any exception occurs while performing the task
6838 */ 6856 */
6839 void _safelyPerform() { 6857 void _safelyPerform() {
6840 try { 6858 try {
6859 String contextName = context.name;
6860 if (contextName == null) {
6861 contextName = 'unnamed';
6862 }
6863 AnalysisEngine.instance.instrumentationService.logAnalysisTask(
6864 contextName,
6865 taskDescription);
6841 internalPerform(); 6866 internalPerform();
6842 } on AnalysisException catch (exception) { 6867 } on AnalysisException catch (exception) {
6843 rethrow; 6868 rethrow;
6844 } catch (exception, stackTrace) { 6869 } catch (exception, stackTrace) {
6845 throw new AnalysisException( 6870 throw new AnalysisException(
6846 exception.toString(), 6871 exception.toString(),
6847 new CaughtException(exception, stackTrace)); 6872 new CaughtException(exception, stackTrace));
6848 } 6873 }
6849 } 6874 }
6850 } 6875 }
(...skipping 2845 matching lines...) Expand 10 before | Expand all | Expand 10 after
9696 set contentCache(ContentCache value); 9721 set contentCache(ContentCache value);
9697 9722
9698 /** 9723 /**
9699 * Return an array containing all of the sources that have been marked as prio rity sources. 9724 * Return an array containing all of the sources that have been marked as prio rity sources.
9700 * Clients must not modify the returned array. 9725 * Clients must not modify the returned array.
9701 * 9726 *
9702 * @return the sources that have been marked as priority sources 9727 * @return the sources that have been marked as priority sources
9703 */ 9728 */
9704 List<Source> get prioritySources; 9729 List<Source> get prioritySources;
9705 9730
9731 /** A factory to override how [ResolverVisitor] is created. */
9732 ResolverVisitorFactory get resolverVisitorFactory;
9733
9706 /** 9734 /**
9707 * Returns a statistics about this context. 9735 * Returns a statistics about this context.
9708 */ 9736 */
9709 AnalysisContextStatistics get statistics; 9737 AnalysisContextStatistics get statistics;
9710 9738
9711 /** 9739 /**
9712 * Returns a type provider for this context or throws an exception if dart:cor e cannot be 9740 * Returns a type provider for this context or throws an exception if dart:cor e cannot be
9713 * resolved. 9741 * resolved.
9714 * 9742 *
9715 * @return the type provider (not `null`) 9743 * @return the type provider (not `null`)
9716 * @throws AnalysisException if dart:core cannot be resolved 9744 * @throws AnalysisException if dart:core cannot be resolved
9717 */ 9745 */
9718 TypeProvider get typeProvider; 9746 TypeProvider get typeProvider;
9719 9747
9720 /** A factory to override how [ResolverVisitor] is created. */
9721 ResolverVisitorFactory get resolverVisitorFactory;
9722
9723 /** A factory to override how [TypeResolverVisitor] is created. */ 9748 /** A factory to override how [TypeResolverVisitor] is created. */
9724 TypeResolverVisitorFactory get typeResolverVisitorFactory; 9749 TypeResolverVisitorFactory get typeResolverVisitorFactory;
9725 9750
9726 /** 9751 /**
9727 * Add the given source with the given information to this context. 9752 * Add the given source with the given information to this context.
9728 * 9753 *
9729 * @param source the source to be added 9754 * @param source the source to be added
9730 * @param info the information about the source 9755 * @param info the information about the source
9731 */ 9756 */
9732 void addSourceInfo(Source source, SourceEntry info); 9757 void addSourceInfo(Source source, SourceEntry info);
(...skipping 2713 matching lines...) Expand 10 before | Expand all | Expand 10 after
12446 if (element.id == _id) { 12471 if (element.id == _id) {
12447 result = element; 12472 result = element;
12448 throw new _ElementByIdFinderException(); 12473 throw new _ElementByIdFinderException();
12449 } 12474 }
12450 super.visitElement(element); 12475 super.visitElement(element);
12451 } 12476 }
12452 } 12477 }
12453 12478
12454 class _ElementByIdFinderException { 12479 class _ElementByIdFinderException {
12455 } 12480 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/instrumentation/instrumentation.dart ('k') | pkg/analyzer/lib/task/model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698