| Index: lib/compiler/implementation/compiler.dart
|
| diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
|
| index bf51eb7a1c4a8ee12d839c316677aecbf2256d27..87b0d5b6b379bd1d85720679af06521472ff4252 100644
|
| --- a/lib/compiler/implementation/compiler.dart
|
| +++ b/lib/compiler/implementation/compiler.dart
|
| @@ -14,13 +14,21 @@ final bool REPORT_EXCESS_RESOLUTION = false;
|
| */
|
| final bool REPORT_PASS2_OPTIMIZATIONS = false;
|
|
|
| +/**
|
| + * Contains backend-specific data that is used throughout the compilation of
|
| + * one work item.
|
| + */
|
| +class ItemCompilationContext {
|
| +}
|
| +
|
| class WorkItem {
|
| + final ItemCompilationContext compilationContext;
|
| final Element element;
|
| TreeElements resolutionTree;
|
| bool allowSpeculativeOptimization = true;
|
| List<HTypeGuard> guards = const <HTypeGuard>[];
|
|
|
| - WorkItem(this.element, this.resolutionTree);
|
| + WorkItem(this.element, this.resolutionTree, this.compilationContext);
|
|
|
| bool isAnalyzed() => resolutionTree !== null;
|
|
|
| @@ -49,6 +57,10 @@ class Backend {
|
| Collection<LibraryElement> libraries);
|
| abstract void assembleProgram();
|
| abstract List<CompilerTask> get tasks();
|
| +
|
| + ItemCompilationContext createItemCompilationContext() {
|
| + return new ItemCompilationContext();
|
| + }
|
| }
|
|
|
| class Compiler implements DiagnosticListener {
|
| @@ -920,7 +932,7 @@ class Tracer {
|
|
|
| const Tracer();
|
|
|
| - void traceCompilation(String methodName) {
|
| + void traceCompilation(String methodName, ItemCompilationContext context) {
|
| }
|
|
|
| void traceGraph(String name, var graph) {
|
|
|