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

Unified Diff: lib/src/debug.dart

Issue 1418483008: Optimize splitting lines with many rules. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 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
Index: lib/src/debug.dart
diff --git a/lib/src/debug.dart b/lib/src/debug.dart
index 47ca7fe41cbf7d1e0d82a582cd69006e4e826733..e091f37b7189087e6a0144521603f456ad3312f0 100644
--- a/lib/src/debug.dart
+++ b/lib/src/debug.dart
@@ -118,8 +118,10 @@ void dumpChunks(int start, List<Chunk> chunks) {
if (chunk.rule != null) {
row.add(chunk.isHardSplit ? "" : chunk.rule.toString());
- var outerRules = chunk.rule.outerRules.toSet().intersection(rules);
- writeIf(outerRules.isNotEmpty, () => "-> ${outerRules.join(" ")}");
+ var constrainedRules =
+ chunk.rule.constrainedRules.toSet().intersection(rules);
+ writeIf(constrainedRules.isNotEmpty,
+ () => "-> ${constrainedRules.join(" ")}");
} else {
row.add("(no rule)");

Powered by Google App Engine
This is Rietveld 408576698