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 EventSink; |
11 import 'dart:collection'; | 11 import 'dart:collection'; |
12 import 'dart:convert'; | 12 import 'dart:convert'; |
13 | 13 |
14 import '../../compiler.dart'; | 14 import '../../compiler.dart'; |
15 import '../dart2jslib.dart'; | 15 import '../dart2jslib.dart'; |
| 16 import '../messages.dart' show MessageKind; |
16 import '../util/util.dart'; | 17 import '../util/util.dart'; |
17 | 18 |
18 part 'debug_collection.dart'; | 19 part 'debug_collection.dart'; |
19 part 'trace.dart'; | 20 part 'trace.dart'; |
20 part 'expensive_map.dart'; | 21 part 'expensive_map.dart'; |
21 part 'expensive_set.dart'; | 22 part 'expensive_set.dart'; |
22 part 'stats.dart'; | 23 part 'stats.dart'; |
23 part 'track_map.dart'; | 24 part 'track_map.dart'; |
24 | 25 |
25 /// Global flag to enable [debugPrint]. This should always be `true` by default | 26 /// 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... |
135 if (printTrace) { | 136 if (printTrace) { |
136 trace(msg); | 137 trace(msg); |
137 } else { | 138 } else { |
138 debugPrint(msg); | 139 debugPrint(msg); |
139 } | 140 } |
140 } | 141 } |
141 return true; | 142 return true; |
142 } | 143 } |
143 return false; | 144 return false; |
144 } | 145 } |
OLD | NEW |