Index: pkg/compiler/lib/src/helpers/trace.dart |
diff --git a/pkg/compiler/lib/src/helpers/trace.dart b/pkg/compiler/lib/src/helpers/trace.dart |
index 021ba97fd92e01bb96972ed913243e42df47960d..5d0ffefd86d5f29f8efcf6393cb2c911465b9cb6 100644 |
--- a/pkg/compiler/lib/src/helpers/trace.dart |
+++ b/pkg/compiler/lib/src/helpers/trace.dart |
@@ -5,10 +5,6 @@ |
import '../common.dart'; |
import '../util/util.dart'; |
-/// Function signature for [trace]. |
-typedef void Trace(String message, |
- {bool condition(String stackTrace), int limit, bool throwOnPrint}); |
- |
/** |
* Helper method for printing stack traces for debugging. |
* |
@@ -26,13 +22,16 @@ typedef void Trace(String message, |
* unknown call-sites in tests by filtering known call-sites and throwning |
* otherwise. |
*/ |
-Trace get trace { |
+void <- (String message, {bool <- (String stackTrace) condition, int limit, |
+ bool throwOnPrint}) |
+get trace { |
enableDebugMode(); |
return _trace; |
} |
void _trace(String message, |
- {bool condition(String stackTrace), int limit, bool throwOnPrint: false}) { |
+ {bool <- (String stackTrace) condition, int limit, |
+ bool throwOnPrint: false}) { |
try { |
throw ''; |
} catch (e, s) { |
@@ -59,9 +58,10 @@ traceExceptions(List<String> exceptions) { |
} |
/// Function signature of [traceAndReport]. |
-typedef void TraceAndReport( |
- DiagnosticReporter reporter, Spannable node, String message, |
- {bool condition(String stackTrace), int limit, bool throwOnPrint}); |
+typedef TraceAndReport = void <- ( |
+ DiagnosticReporter, Spannable node, String message, |
+ {bool <- (String stackTrace) condition, int limit, bool throwOnPrint}) |
+ |
/// Calls [reportHere] and [trace] with the same message. |
TraceAndReport get traceAndReport { |
@@ -75,7 +75,8 @@ TraceAndReport get reportAndTrace => traceAndReport; |
/// Implementation of [traceAndReport]. |
void _traceAndReport( |
DiagnosticReporter reporter, Spannable node, String message, |
- {bool condition(String stackTrace), int limit, bool throwOnPrint: false}) { |
+ {bool <- (String stackTrace) condition, int limit, |
+ bool throwOnPrint: false}) { |
trace(message, limit: limit, throwOnPrint: throwOnPrint, |
condition: (String stackTrace) { |
bool result = condition != null ? condition(stackTrace) : true; |