OLD | NEW |
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 3432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3443 * | 3443 * |
3444 * @param source the source whose content is to be resolved | 3444 * @param source the source whose content is to be resolved |
3445 * @param dartEntry the entry for the source | 3445 * @param dartEntry the entry for the source |
3446 * @return task data representing the created task | 3446 * @return task data representing the created task |
3447 */ | 3447 */ |
3448 AnalysisContextImpl_TaskData _createResolveDartLibraryTask(Source source, | 3448 AnalysisContextImpl_TaskData _createResolveDartLibraryTask(Source source, |
3449 DartEntry dartEntry) { | 3449 DartEntry dartEntry) { |
3450 try { | 3450 try { |
3451 AnalysisContextImpl_CycleBuilder builder = | 3451 AnalysisContextImpl_CycleBuilder builder = |
3452 new AnalysisContextImpl_CycleBuilder(this); | 3452 new AnalysisContextImpl_CycleBuilder(this); |
3453 builder.computeCycleContaining(source); | 3453 PerformanceTag prevTag = PerformanceStatistics.cycles.makeCurrent(); |
| 3454 try { |
| 3455 builder.computeCycleContaining(source); |
| 3456 } finally { |
| 3457 prevTag.makeCurrent(); |
| 3458 } |
3454 AnalysisContextImpl_TaskData taskData = builder.taskData; | 3459 AnalysisContextImpl_TaskData taskData = builder.taskData; |
3455 if (taskData != null) { | 3460 if (taskData != null) { |
3456 return taskData; | 3461 return taskData; |
3457 } | 3462 } |
3458 return new AnalysisContextImpl_TaskData( | 3463 return new AnalysisContextImpl_TaskData( |
3459 new ResolveDartLibraryCycleTask(this, source, source, builder.librarie
sInCycle), | 3464 new ResolveDartLibraryCycleTask(this, source, source, builder.librarie
sInCycle), |
3460 false); | 3465 false); |
3461 } on AnalysisException catch (exception, stackTrace) { | 3466 } on AnalysisException catch (exception, stackTrace) { |
3462 dartEntry.recordResolutionError( | 3467 dartEntry.recordResolutionError( |
3463 new CaughtException(exception, stackTrace)); | 3468 new CaughtException(exception, stackTrace)); |
(...skipping 7016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10480 | 10485 |
10481 /** | 10486 /** |
10482 * The [PerformanceTag] for time spent in hints generator. | 10487 * The [PerformanceTag] for time spent in hints generator. |
10483 */ | 10488 */ |
10484 static PerformanceTag hints = new PerformanceTag('hints'); | 10489 static PerformanceTag hints = new PerformanceTag('hints'); |
10485 | 10490 |
10486 /** | 10491 /** |
10487 * The [PerformanceTag] for time spent in linting. | 10492 * The [PerformanceTag] for time spent in linting. |
10488 */ | 10493 */ |
10489 static PerformanceTag lint = new PerformanceTag('lint'); | 10494 static PerformanceTag lint = new PerformanceTag('lint'); |
| 10495 |
| 10496 /** |
| 10497 * The [PerformanceTag] for time spent computing cycles. |
| 10498 */ |
| 10499 static PerformanceTag cycles = new PerformanceTag('cycles'); |
10490 } | 10500 } |
10491 | 10501 |
10492 /** | 10502 /** |
10493 * Instances of the class `RecordingErrorListener` implement an error listener t
hat will | 10503 * Instances of the class `RecordingErrorListener` implement an error listener t
hat will |
10494 * record the errors that are reported to it in a way that is appropriate for ca
ching those errors | 10504 * record the errors that are reported to it in a way that is appropriate for ca
ching those errors |
10495 * within an analysis context. | 10505 * within an analysis context. |
10496 */ | 10506 */ |
10497 class RecordingErrorListener implements AnalysisErrorListener { | 10507 class RecordingErrorListener implements AnalysisErrorListener { |
10498 /** | 10508 /** |
10499 * A HashMap of lists containing the errors that were collected, keyed by each
[Source]. | 10509 * A HashMap of lists containing the errors that were collected, keyed by each
[Source]. |
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12394 if (element.id == _id) { | 12404 if (element.id == _id) { |
12395 result = element; | 12405 result = element; |
12396 throw new _ElementByIdFinderException(); | 12406 throw new _ElementByIdFinderException(); |
12397 } | 12407 } |
12398 super.visitElement(element); | 12408 super.visitElement(element); |
12399 } | 12409 } |
12400 } | 12410 } |
12401 | 12411 |
12402 class _ElementByIdFinderException { | 12412 class _ElementByIdFinderException { |
12403 } | 12413 } |
OLD | NEW |