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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/validate.dart

Issue 13723002: dart2js: Fix SSA corner case with always breaking loop and failing assert (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/ssa/validate.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/validate.dart b/sdk/lib/_internal/compiler/implementation/ssa/validate.dart
index 5e9598e95b2c5acbc759aaca406254ba033768a9..8d98afe1fa3f6b244f48df512ddc977d852db93d 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/validate.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/validate.dart
@@ -92,6 +92,7 @@ class HValidator extends HInstructionVisitor {
// corresponding predecessor block. Note that a block dominates
// itself.
block.forEachPhi((HPhi phi) {
+ assert(phi.inputs.length <= block.predecessors.length);
for (int i = 0; i < phi.inputs.length; i++) {
HInstruction input = phi.inputs[i];
if (!input.block.dominates(block.predecessors[i])) {

Powered by Google App Engine
This is Rietveld 408576698