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

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

Issue 14071003: Fix first part on liveness analysis of bug https://code.google.com/p/dart/issues/detail?id=9687: a … (Closed) Base URL: http://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
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/validate.dart (revision 21272)
+++ sdk/lib/_internal/compiler/implementation/ssa/validate.dart (working copy)
@@ -44,21 +44,17 @@
if (block.last is HJump && block.successors.length != 1) {
markInvalid("Break or continue node without one successor");
}
- if (block.last is HReturn &&
+ if ((block.last is HReturn || block.last is HThrow) &&
(block.successors.length != 1 || !block.successors[0].isExitBlock())) {
- markInvalid("Return node with > 1 succesor or not going to exit-block");
+ markInvalid("Return or throw node with > 1 successor "
+ "or not going to exit-block");
}
if (block.last is HExit && !block.successors.isEmpty) {
markInvalid("Exit block with successor");
}
- if (block.last is HThrow && !block.successors.isEmpty) {
- markInvalid("Throw block with successor");
- }
- if (block.successors.isEmpty &&
- block.last is !HThrow &&
- !block.isExitBlock()) {
- markInvalid("Non-exit or throw block without successor");
+ if (block.successors.isEmpty && !block.isExitBlock()) {
+ markInvalid("Non-exit block without successor");
}
// Check that successors ids are always higher than the current one.
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | tests/language/execute_finally10_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698