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 library tracer; | 5 library tracer; |
6 | 6 |
| 7 import 'dart:async' show EventSink; |
7 import '../compiler.dart' as api; | 8 import '../compiler.dart' as api; |
8 import 'dart:async' show EventSink; | 9 import 'common/work.dart' show |
| 10 ItemCompilationContext; |
| 11 import 'compiler.dart' show |
| 12 Compiler; |
9 import 'ssa/ssa.dart' as ssa; | 13 import 'ssa/ssa.dart' as ssa; |
10 import 'ssa/ssa_tracer.dart' show HTracer; | 14 import 'ssa/ssa_tracer.dart' show |
| 15 HTracer; |
11 import 'cps_ir/cps_ir_nodes.dart' as cps_ir; | 16 import 'cps_ir/cps_ir_nodes.dart' as cps_ir; |
12 import 'cps_ir/cps_ir_tracer.dart' show IRTracer; | 17 import 'cps_ir/cps_ir_tracer.dart' show |
| 18 IRTracer; |
13 import 'tree_ir/tree_ir_nodes.dart' as tree_ir; | 19 import 'tree_ir/tree_ir_nodes.dart' as tree_ir; |
14 import 'tree_ir/tree_ir_tracer.dart' show TreeTracer; | 20 import 'tree_ir/tree_ir_tracer.dart' show |
15 import 'util/util.dart' show Indentation; | 21 TreeTracer; |
16 import 'dart2jslib.dart'; | 22 import 'util/util.dart' show |
| 23 Indentation; |
17 | 24 |
18 /** | 25 /** |
19 * If non-null, we only trace methods whose name match the regexp defined by the | 26 * If non-null, we only trace methods whose name match the regexp defined by the |
20 * given pattern. | 27 * given pattern. |
21 */ | 28 */ |
22 const String TRACE_FILTER_PATTERN = const String.fromEnvironment("DUMP_IR"); | 29 const String TRACE_FILTER_PATTERN = const String.fromEnvironment("DUMP_IR"); |
23 | 30 |
24 final RegExp TRACE_FILTER = | 31 final RegExp TRACE_FILTER = |
25 TRACE_FILTER_PATTERN == null ? null : new RegExp(TRACE_FILTER_PATTERN); | 32 TRACE_FILTER_PATTERN == null ? null : new RegExp(TRACE_FILTER_PATTERN); |
26 | 33 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 } | 117 } |
111 | 118 |
112 void add(String string) { | 119 void add(String string) { |
113 output.add(string); | 120 output.add(string); |
114 } | 121 } |
115 | 122 |
116 void addIndent() { | 123 void addIndent() { |
117 add(_ind.indentation); | 124 add(_ind.indentation); |
118 } | 125 } |
119 } | 126 } |
OLD | NEW |