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