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

Unified Diff: sdk/lib/_internal/compiler/implementation/helpers/trace.dart

Issue 267153002: Support general handling of type variables by substituting types into the current context. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased + reinserted unalias Created 6 years, 7 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
Index: sdk/lib/_internal/compiler/implementation/helpers/trace.dart
diff --git a/sdk/lib/_internal/compiler/implementation/helpers/trace.dart b/sdk/lib/_internal/compiler/implementation/helpers/trace.dart
index 8fcb63b247b93a884da0441f90c2c3036fd9f71b..42c122acbec772dccad77b19f59a8f9a505508a0 100644
--- a/sdk/lib/_internal/compiler/implementation/helpers/trace.dart
+++ b/sdk/lib/_internal/compiler/implementation/helpers/trace.dart
@@ -14,12 +14,12 @@ part of dart2js.helpers;
* printed stack traces based on their content. For instance only print stack
* traces that contain specific paths.
*/
-void trace(String message, [bool condition(String stackTrace)]) {
+void trace(String message, {bool condition(String stackTrace), int limit}) {
try {
throw '';
} catch (e, s) {
String stackTrace = prettifyStackTrace(
- s, rangeStart: 1, filePrefix: stackTraceFilePrefix);
+ s, rangeStart: 1, rangeEnd: limit, filePrefix: stackTraceFilePrefix);
if (condition != null) {
if (!condition(stackTrace)) return;
}
@@ -27,10 +27,10 @@ void trace(String message, [bool condition(String stackTrace)]) {
}
}
-void traceAndReport(Compiler compiler, Spannable node,
- String message, [bool condition(String stackTrace)]) {
+void traceAndReport(Compiler compiler, Spannable node, String message,
+ {bool condition(String stackTrace), int limit}) {
- trace(message, (String stackTrace) {
+ trace(message, condition: (String stackTrace) {
bool result = condition != null ? condition(stackTrace) : true;
if (result) {
reportHere(compiler, node, message);

Powered by Google App Engine
This is Rietveld 408576698