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

Unified Diff: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart

Issue 1641073003: dart2js CPS: Remove an invalid assertion in shrinking reductions. (Closed) Base URL: git@github.com:dart-lang/sdk.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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
diff --git a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
index acb5b91637f0d846bebfd8cf728a91f9dc3a33fb..298a0827b70efffc4657f8ff346733bd0817003f 100644
--- a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
+++ b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
@@ -545,11 +545,15 @@ bool _isUselessIf(Branch branch) {
falseInvoke.continuation.definition) {
return false;
}
- assert(trueInvoke.arguments.length == falseInvoke.arguments.length);
// Matching zero arguments should be adequate, since isomorphic true and false
// invocations should result in redundant phis which are removed elsewhere.
- if (trueInvoke.arguments.isNotEmpty) return false;
- return true;
+ //
+ // Note that the argument lists are not necessarily the same length here,
+ // because we could be looking for new redexes in the middle of performing a
+ // dead parameter reduction, where some but not all of the invocations have
+ // been rewritten. In that case, we will find the redex (once) after both
+ // of these invocations have been rewritten.
+ return trueInvoke.arguments.isEmpty && falseInvoke.arguments.isEmpty;
}
bool _isDeadParameter(Parameter parameter) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698