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 | 10 import 'dart:async' show |
11 EventSink; | 11 EventSink; |
12 import 'dart:collection'; | 12 import 'dart:collection'; |
13 import 'dart:convert'; | 13 import 'dart:convert'; |
14 | 14 |
15 import '../../compiler.dart'; | 15 import '../../compiler.dart'; |
16 import '../compiler.dart' show | 16 import '../compiler.dart' show |
17 Compiler; | 17 Compiler; |
18 import '../diagnostics/invariant.dart' show | 18 import '../diagnostics/invariant.dart' show |
19 DEBUG_MODE; | 19 DEBUG_MODE; |
| 20 import '../diagnostics/messages.dart' show |
| 21 MessageKind; |
20 import '../diagnostics/spannable.dart' show | 22 import '../diagnostics/spannable.dart' show |
21 Spannable; | 23 Spannable; |
22 import '../messages.dart' show | |
23 MessageKind; | |
24 import '../util/util.dart'; | 24 import '../util/util.dart'; |
25 | 25 |
26 part 'debug_collection.dart'; | 26 part 'debug_collection.dart'; |
27 part 'trace.dart'; | 27 part 'trace.dart'; |
28 part 'expensive_map.dart'; | 28 part 'expensive_map.dart'; |
29 part 'expensive_set.dart'; | 29 part 'expensive_set.dart'; |
30 part 'stats.dart'; | 30 part 'stats.dart'; |
31 part 'track_map.dart'; | 31 part 'track_map.dart'; |
32 | 32 |
33 /// 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... |
143 if (printTrace) { | 143 if (printTrace) { |
144 trace(msg); | 144 trace(msg); |
145 } else { | 145 } else { |
146 debugPrint(msg); | 146 debugPrint(msg); |
147 } | 147 } |
148 } | 148 } |
149 return true; | 149 return true; |
150 } | 150 } |
151 return false; | 151 return false; |
152 } | 152 } |
OLD | NEW |