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

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

Issue 913853002: Minimal initial performance reporting (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added more data Created 5 years, 10 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/analysis_server/lib/src/get_handler.dart ('k') | 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 // 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 10908 matching lines...) Expand 10 before | Expand all | Expand 10 after
10919 } 10919 }
10920 } 10920 }
10921 10921
10922 /** 10922 /**
10923 * Set the value of the data represented by the given [descriptor] to the 10923 * Set the value of the data represented by the given [descriptor] to the
10924 * given [value]. 10924 * given [value].
10925 */ 10925 */
10926 void setValue(DataDescriptor /*<V>*/ descriptor, dynamic /*V*/ value) { 10926 void setValue(DataDescriptor /*<V>*/ descriptor, dynamic /*V*/ value) {
10927 CachedResult result = 10927 CachedResult result =
10928 resultMap.putIfAbsent(descriptor, () => new CachedResult(descriptor)); 10928 resultMap.putIfAbsent(descriptor, () => new CachedResult(descriptor));
10929 if (result.state == CacheState.FLUSHED) {
10930 int count = SourceEntry.unflushedCountMap[descriptor];
10931 SourceEntry.unflushedCountMap[descriptor] = count == null ? 1 : count + 1;
10932 }
10929 result.state = CacheState.VALID; 10933 result.state = CacheState.VALID;
10930 result.value = value == null ? descriptor.defaultValue : value; 10934 result.value = value == null ? descriptor.defaultValue : value;
10931 } 10935 }
10932 10936
10933 /** 10937 /**
10934 * Flush the value of the data described by the [descriptor]. 10938 * Flush the value of the data described by the [descriptor].
10935 */ 10939 */
10936 void _flush(DataDescriptor descriptor) { 10940 void _flush(DataDescriptor descriptor) {
10937 CachedResult result = resultMap[descriptor]; 10941 CachedResult result = resultMap[descriptor];
10938 if (result != null && result.state == CacheState.VALID) { 10942 if (result != null && result.state == CacheState.VALID) {
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
11600 new DataDescriptor<LineInfo>("SourceEntry.LINE_INFO"); 11604 new DataDescriptor<LineInfo>("SourceEntry.LINE_INFO");
11601 11605
11602 /** 11606 /**
11603 * The index of the flag indicating whether the source was explicitly added to 11607 * The index of the flag indicating whether the source was explicitly added to
11604 * the context or whether the source was implicitly added because it was 11608 * the context or whether the source was implicitly added because it was
11605 * referenced by another source. 11609 * referenced by another source.
11606 */ 11610 */
11607 static int _EXPLICITLY_ADDED_FLAG = 0; 11611 static int _EXPLICITLY_ADDED_FLAG = 0;
11608 11612
11609 /** 11613 /**
11614 * A table mapping data descriptors to a count of the number of times a value
11615 * of that kind was flushed and then re-created.
11616 */
11617 static final Map<DataDescriptor, int> unflushedCountMap =
11618 new HashMap<DataDescriptor, int>();
11619
11620 /**
11610 * The most recent time at which the state of the source matched the state 11621 * The most recent time at which the state of the source matched the state
11611 * represented by this entry. 11622 * represented by this entry.
11612 */ 11623 */
11613 int modificationTime = 0; 11624 int modificationTime = 0;
11614 11625
11615 /** 11626 /**
11616 * The exception that caused one or more values to have a state of 11627 * The exception that caused one or more values to have a state of
11617 * [CacheState.ERROR]. 11628 * [CacheState.ERROR].
11618 */ 11629 */
11619 CaughtException exception; 11630 CaughtException exception;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
11789 * Set the value of the data represented by the given [descriptor] to the 11800 * Set the value of the data represented by the given [descriptor] to the
11790 * given [value]. 11801 * given [value].
11791 */ 11802 */
11792 void setValue(DataDescriptor /*<V>*/ descriptor, dynamic /*V*/ value) { 11803 void setValue(DataDescriptor /*<V>*/ descriptor, dynamic /*V*/ value) {
11793 if (!_isValidDescriptor(descriptor)) { 11804 if (!_isValidDescriptor(descriptor)) {
11794 throw new ArgumentError("Invalid descriptor: $descriptor"); 11805 throw new ArgumentError("Invalid descriptor: $descriptor");
11795 } 11806 }
11796 _validateStateChange(descriptor, CacheState.VALID); 11807 _validateStateChange(descriptor, CacheState.VALID);
11797 CachedResult result = 11808 CachedResult result =
11798 resultMap.putIfAbsent(descriptor, () => new CachedResult(descriptor)); 11809 resultMap.putIfAbsent(descriptor, () => new CachedResult(descriptor));
11810 if (result.state == CacheState.FLUSHED) {
11811 int count = unflushedCountMap[descriptor];
11812 unflushedCountMap[descriptor] = count == null ? 1 : count + 1;
11813 }
11799 result.state = CacheState.VALID; 11814 result.state = CacheState.VALID;
11800 result.value = value == null ? descriptor.defaultValue : value; 11815 result.value = value == null ? descriptor.defaultValue : value;
11801 } 11816 }
11802 11817
11803 @override 11818 @override
11804 String toString() { 11819 String toString() {
11805 StringBuffer buffer = new StringBuffer(); 11820 StringBuffer buffer = new StringBuffer();
11806 _writeOn(buffer); 11821 _writeOn(buffer);
11807 return buffer.toString(); 11822 return buffer.toString();
11808 } 11823 }
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
12370 if (element.id == _id) { 12385 if (element.id == _id) {
12371 result = element; 12386 result = element;
12372 throw new _ElementByIdFinderException(); 12387 throw new _ElementByIdFinderException();
12373 } 12388 }
12374 super.visitElement(element); 12389 super.visitElement(element);
12375 } 12390 }
12376 } 12391 }
12377 12392
12378 class _ElementByIdFinderException { 12393 class _ElementByIdFinderException {
12379 } 12394 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/get_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698