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

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

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 months 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/inferrer/inferrer_visitor.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 b928bb6add130e2f833ee0d87ac3c910bd22867d..0889efd248db02bb2ab4a9351de9bac791cc7b54 100644
--- a/pkg/compiler/lib/src/helpers/trace.dart
+++ b/pkg/compiler/lib/src/helpers/trace.dart
@@ -60,8 +60,11 @@ traceExceptions(List<String> exceptions) {
}
/// Function signature of [traceAndReport].
-typedef void TraceAndReport(Compiler compiler, Spannable node, String message,
- {bool condition(String stackTrace), int limit,
+typedef void TraceAndReport(DiagnosticReporter reporter,
+ Spannable node,
+ String message,
+ {bool condition(String stackTrace),
+ int limit,
bool throwOnPrint});
/// Calls [reportHere] and [trace] with the same message.
@@ -74,7 +77,9 @@ TraceAndReport get traceAndReport {
TraceAndReport get reportAndTrace => traceAndReport;
/// Implementation of [traceAndReport].
-void _traceAndReport(Compiler compiler, Spannable node, String message,
+void _traceAndReport(DiagnosticReporter reporter,
+ Spannable node,
+ String message,
{bool condition(String stackTrace), int limit,
bool throwOnPrint: false}) {
@@ -82,7 +87,7 @@ void _traceAndReport(Compiler compiler, Spannable node, String message,
condition: (String stackTrace) {
bool result = condition != null ? condition(stackTrace) : true;
if (result) {
- reportHere(compiler, node, message);
+ reportHere(reporter, node, message);
}
return result;
});
« no previous file with comments | « pkg/compiler/lib/src/helpers/helpers.dart ('k') | pkg/compiler/lib/src/inferrer/inferrer_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698