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

Side by Side Diff: benchmark/after.dart.txt

Issue 987223002: Discard unused nesting levels. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « CHANGELOG.md ('k') | benchmark/before.dart.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub.solver.backtracking_solver; 5 library pub.solver.backtracking_solver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection' show Queue; 8 import 'dart:collection' show Queue;
9 9
10 import '../barback.dart' as barback; 10 import '../barback.dart' as barback;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 _overrides[override.name] = override; 89 _overrides[override.name] = override;
90 } 90 }
91 91
92 // A deeply nested statement that's hard on the formatter. 92 // A deeply nested statement that's hard on the formatter.
93 isTwoWay = !isEvent && 93 isTwoWay = !isEvent &&
94 bindings.isWhole && 94 bindings.isWhole &&
95 (isCustomTag || 95 (isCustomTag ||
96 tag == 'input' && (name == 'value' || name == 'checked') || 96 tag == 'input' && (name == 'value' || name == 'checked') ||
97 tag == 'select' && (name == 'selectedindex' || name == 'value') || 97 tag == 'select' && (name == 'selectedindex' || name == 'value') ||
98 tag == 'textarea' && name == 'value'); 98 tag == 'textarea' && name == 'value');
99
100 // Even more deeply nested pathological example.
101 if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(
102 javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(
103 javaBooleanAnd(),
104 _isEqualTokens(node.period, toNode.period)),
105 _isEqualNodes(node.name, toNode.name)),
106 _isEqualNodes(node.parameters, toNode.parameters)),
107 _isEqualTokens(node.separator, toNode.separator)),
108 _isEqualNodeLists(node.initializers, toNode.initializers)),
109 _isEqualNodes(
110 node.redirectedConstructor, toNode.redirectedConstructor)),
111 _isEqualNodes(node.body, toNode.body))) {
112 toNode.element = node.element;
113 }
99 } 114 }
100 115
101 /// Run the solver. 116 /// Run the solver.
102 /// 117 ///
103 /// Completes with a list of specific package versions if successful or an 118 /// Completes with a list of specific package versions if successful or an
104 /// error if it failed to find a solution. 119 /// error if it failed to find a solution.
105 Future<SolveResult> solve() { 120 Future<SolveResult> solve() {
106 var stopwatch = new Stopwatch(); 121 var stopwatch = new Stopwatch();
107 122
108 _logParameters(); 123 _logParameters();
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 /// with the current SDK. 797 /// with the current SDK.
783 /// 798 ///
784 /// Throws a [SolveFailure] if not. 799 /// Throws a [SolveFailure] if not.
785 void _validateSdkConstraint(Pubspec pubspec) { 800 void _validateSdkConstraint(Pubspec pubspec) {
786 if (pubspec.environment.sdkVersion.allows(sdk.version)) return; 801 if (pubspec.environment.sdkVersion.allows(sdk.version)) return;
787 802
788 throw new BadSdkVersionException(pubspec.name, 803 throw new BadSdkVersionException(pubspec.name,
789 'Package ${pubspec.name} requires SDK version ' 804 'Package ${pubspec.name} requires SDK version '
790 '${pubspec.environment.sdkVersion} but the current SDK is ' '${sdk.version }.'); 805 '${pubspec.environment.sdkVersion} but the current SDK is ' '${sdk.version }.');
791 } 806 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | benchmark/before.dart.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698