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

Unified Diff: lib/src/chunk_builder.dart

Issue 1595553004: Better performance on long lists containing comments. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 4 years, 11 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 | « bin/format.dart ('k') | lib/src/source_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/chunk_builder.dart
diff --git a/lib/src/chunk_builder.dart b/lib/src/chunk_builder.dart
index 54695cfaccb1cdcc76cf67391d608a1c0414795e..0f265ec7d0522aa4b3c77cbd81a77433b243df5d 100644
--- a/lib/src/chunk_builder.dart
+++ b/lib/src/chunk_builder.dart
@@ -384,7 +384,11 @@ class ChunkBuilder {
/// Ends the innermost rule.
void endRule() {
- _rules.removeLast();
+ if (_lazyRules.isNotEmpty) {
+ _lazyRules.removeLast();
+ } else {
+ _rules.removeLast();
+ }
}
/// Pre-emptively forces all of the current rules to become hard splits.
« no previous file with comments | « bin/format.dart ('k') | lib/src/source_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698