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

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

Issue 11497009: Revive throw as an expression but not for rethrow. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 15894)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -3764,6 +3764,7 @@
}
visitThrow(Throw node) {
+ HBasicBlock block;
if (node.expression == null) {
HInstruction exception = rethrowableException;
if (exception == null) {
@@ -3771,11 +3772,15 @@
compiler.internalError(
'rethrowableException should not be null', node: node);
}
- close(new HThrow(exception, isRethrow: true));
+ block = close(new HThrow(exception, isRethrow: true));
} else {
visit(node.expression);
- close(new HThrow(pop()));
+ block = close(new HThrow(pop()));
}
+ HBasicBlock newBlock = addNewBlock();
+ block.addSuccessor(newBlock);
+ open(newBlock);
+ stack.add(graph.addConstantNull(constantSystem));
}
visitTypeAnnotation(TypeAnnotation node) {

Powered by Google App Engine
This is Rietveld 408576698