| 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 '../common.dart'; |
| 16 import '../compiler.dart' show | 17 import '../compiler.dart' show |
| 17 Compiler; | 18 Compiler; |
| 18 import '../diagnostics/diagnostic_listener.dart' show | |
| 19 DiagnosticReporter; | |
| 20 import '../diagnostics/invariant.dart' show | 19 import '../diagnostics/invariant.dart' show |
| 21 DEBUG_MODE; | 20 DEBUG_MODE; |
| 22 import '../diagnostics/messages.dart' show | |
| 23 MessageKind; | |
| 24 import '../diagnostics/spannable.dart' show | |
| 25 Spannable; | |
| 26 import '../util/util.dart'; | 21 import '../util/util.dart'; |
| 27 | 22 |
| 28 part 'debug_collection.dart'; | 23 part 'debug_collection.dart'; |
| 29 part 'trace.dart'; | 24 part 'trace.dart'; |
| 30 part 'expensive_map.dart'; | 25 part 'expensive_map.dart'; |
| 31 part 'expensive_set.dart'; | 26 part 'expensive_set.dart'; |
| 32 part 'stats.dart'; | 27 part 'stats.dart'; |
| 33 part 'track_map.dart'; | 28 part 'track_map.dart'; |
| 34 | 29 |
| 35 /// Global flag to enable [debugPrint]. This should always be `true` by default | 30 /// Global flag to enable [debugPrint]. This should always be `true` by default |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 if (printTrace) { | 142 if (printTrace) { |
| 148 trace(msg); | 143 trace(msg); |
| 149 } else { | 144 } else { |
| 150 debugPrint(msg); | 145 debugPrint(msg); |
| 151 } | 146 } |
| 152 } | 147 } |
| 153 return true; | 148 return true; |
| 154 } | 149 } |
| 155 return false; | 150 return false; |
| 156 } | 151 } |
| OLD | NEW |