Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Unified Diff: pkg/compiler/lib/src/helpers/trace.dart

Issue 2466393002: Change to <- for types.
Patch Set: Fixes. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/helpers/helpers.dart ('k') | pkg/compiler/lib/src/js_backend/constant_emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « pkg/compiler/lib/src/helpers/helpers.dart ('k') | pkg/compiler/lib/src/js_backend/constant_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698