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

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

Issue 2482923002: Use `Function` as function type syntax.
Patch Set: 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/enqueue.dart ('k') | pkg/compiler/lib/src/helpers/trace.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/helpers/helpers.dart
diff --git a/pkg/compiler/lib/src/helpers/helpers.dart b/pkg/compiler/lib/src/helpers/helpers.dart
index 14a788708236cd8b858d9f4cfd6f81b4f1160d6a..f316a57d116e13140754e28bd4bcf39162e4ccf0 100644
--- a/pkg/compiler/lib/src/helpers/helpers.dart
+++ b/pkg/compiler/lib/src/helpers/helpers.dart
@@ -37,29 +37,23 @@ class _DebugIndentation extends Indentation {
_DebugIndentation _indentation = new _DebugIndentation();
-/// Function signature of [debugPrint].
-typedef DebugPrint(s);
-
/// If [DEBUG_PRINT_ENABLED] is `true` print [s] using the current identation.
-DebugPrint get debugPrint {
+void Function(dynamic s) get debugPrint {
enableDebugMode();
// TODO(johnniwinther): Maybe disable debug mode after the call.
return _debugPrint;
}
/// Implementation of [debugPrint].
-_debugPrint(s) {
+void _debugPrint(s) {
if (DEBUG_PRINT_ENABLED) print('${_indentation.indentation}$s');
}
-/// Function signature of [debugWrapPrint].
-typedef DebugWrapPrint(s, f());
-
/// Wraps the call to [f] with a print of 'start:$s' and 'end:$s' incrementing
/// the current indentation used by [debugPrint] during the execution of [f].
///
/// Use this to get a tree-like debug printout for nested calls.
-DebugWrapPrint get debugWrapPrint {
+dynamic Function(dynamic s, dynamic Function() f) get debugWrapPrint {
enableDebugMode();
return _debugWrapPrint;
}
@@ -82,7 +76,8 @@ typedef ReportHere(
DiagnosticReporter reporter, Spannable node, String debugMessage);
/// Print a message with a source location.
-ReportHere get reportHere {
+dynamic Function(DiagnosticReporter, Spannable node, String debugMessage)
+ get reportHere {
enableDebugMode();
return _reportHere;
}
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/helpers/trace.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698