| Index: pkg/compiler/lib/src/common/tasks.dart
|
| diff --git a/pkg/compiler/lib/src/common/tasks.dart b/pkg/compiler/lib/src/common/tasks.dart
|
| index ff55724e2485730f145616438964cca858e5974e..e40f7d25c34291aef9c93cf85cfc72a73cfbc742 100644
|
| --- a/pkg/compiler/lib/src/common/tasks.dart
|
| +++ b/pkg/compiler/lib/src/common/tasks.dart
|
| @@ -204,6 +204,22 @@ class CompilerTask {
|
| return watch == null ? action() : measureSubtaskHelper(name, action);
|
| }
|
|
|
| + /// Measure the time spent in [action] (if in verbose mode) and accumulate it
|
| + /// under a subtask with the given name.
|
| + measureSubtaskElement(String name, Element element, action()) {
|
| + return watch == null
|
| + ? reporter.withCurrentElement(element, action)
|
| + : measureSubtaskElementHelper(name, element, action);
|
| + }
|
| +
|
| + /// Helper method for [measureSubtaskElement]. Don't call this directly as it
|
| + /// assumes that [watch] isn't null.
|
| + measureSubtaskElementHelper(String name, Element element, action()) {
|
| + assert(watch != null);
|
| + return reporter.withCurrentElement(
|
| + element, () => measureSubtaskHelper(name, action));
|
| + }
|
| +
|
| /// Helper method for [measureSubtask]. Don't call this directly as it
|
| /// assumes that [watch] isn't null.
|
| measureSubtaskHelper(String name, action()) {
|
|
|