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 for debugging helpers. The unittest analyze_unused_test checks that | 5 /// Library for debugging helpers. The unittest analyze_unused_test checks that |
6 /// the helper are not used in production code. | 6 /// the helper are not used in production code. |
7 | 7 |
8 library dart2js.helpers; | 8 library dart2js.helpers; |
9 | 9 |
10 import 'dart:async' show EventSink; | 10 import 'dart:async' show |
| 11 EventSink; |
11 import 'dart:collection'; | 12 import 'dart:collection'; |
12 import 'dart:convert'; | 13 import 'dart:convert'; |
13 | 14 |
14 import '../../compiler.dart'; | 15 import '../../compiler.dart'; |
15 import '../dart2jslib.dart'; | 16 import '../compiler.dart' show |
16 import '../messages.dart' show MessageKind; | 17 Compiler; |
| 18 import '../diagnostics/invariant.dart' show |
| 19 DEBUG_MODE; |
| 20 import '../diagnostics/spannable.dart' show |
| 21 Spannable; |
| 22 import '../messages.dart' show |
| 23 MessageKind; |
17 import '../util/util.dart'; | 24 import '../util/util.dart'; |
18 | 25 |
19 part 'debug_collection.dart'; | 26 part 'debug_collection.dart'; |
20 part 'trace.dart'; | 27 part 'trace.dart'; |
21 part 'expensive_map.dart'; | 28 part 'expensive_map.dart'; |
22 part 'expensive_set.dart'; | 29 part 'expensive_set.dart'; |
23 part 'stats.dart'; | 30 part 'stats.dart'; |
24 part 'track_map.dart'; | 31 part 'track_map.dart'; |
25 | 32 |
26 /// Global flag to enable [debugPrint]. This should always be `true` by default | 33 /// Global flag to enable [debugPrint]. This should always be `true` by default |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 if (printTrace) { | 143 if (printTrace) { |
137 trace(msg); | 144 trace(msg); |
138 } else { | 145 } else { |
139 debugPrint(msg); | 146 debugPrint(msg); |
140 } | 147 } |
141 } | 148 } |
142 return true; | 149 return true; |
143 } | 150 } |
144 return false; | 151 return false; |
145 } | 152 } |
OLD | NEW |