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

Unified Diff: frog/leg/ssa/builder.dart

Issue 8513004: Throw and a small fix to If. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 9 years, 1 month 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 | frog/leg/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/ssa/builder.dart
diff --git a/frog/leg/ssa/builder.dart b/frog/leg/ssa/builder.dart
index 8699cad1f92c35b219f60a9ce573272eb809f034..d7b3bfa58a509dee865f01c09c5f50ad78be450d 100644
--- a/frog/leg/ssa/builder.dart
+++ b/frog/leg/ssa/builder.dart
@@ -323,7 +323,13 @@ class SsaBuilder implements Visitor {
}
visitThrow(Throw node) {
- compiler.unimplemented("SsaBuilder.visitThrow");
+ if (node.expression === null) {
+ compiler.unimplemented("SsaBuilder: throw without expression");
+ }
+ visit(node.expression);
+ add(new HThrow(pop()));
+ // A throw aborts the building of the current block.
+ block = null;
}
visitTypeAnnotation(TypeAnnotation node) {
« no previous file with comments | « no previous file | frog/leg/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698