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

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

Issue 16004005: Fix generation of a bailout method when a BailoutTarget was in the middle of a loop/labeled block. … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/validate.dart (revision 23325)
+++ sdk/lib/_internal/compiler/implementation/ssa/validate.dart (working copy)
@@ -150,7 +150,8 @@
bool inBasicBlock = instruction.isInBasicBlock();
return everyInstruction(instruction.inputs, (input, count) {
if (inBasicBlock) {
- return countInstruction(input.usedBy, instruction) == count;
+ return input.isInBasicBlock()
+ && countInstruction(input.usedBy, instruction) == count;
} else {
return countInstruction(input.usedBy, instruction) == 0;
}
@@ -161,7 +162,8 @@
bool hasCorrectUses() {
if (!instruction.isInBasicBlock()) return true;
return everyInstruction(instruction.usedBy, (use, count) {
- return countInstruction(use.inputs, instruction) == count;
+ return use.isInBasicBlock()
+ && countInstruction(use.inputs, instruction) == count;
});
}

Powered by Google App Engine
This is Rietveld 408576698