Permalink
Browse files

CLJS fix for ASYNC-7

  • Loading branch information...
1 parent e162592 commit 9ac00f931ba86fbfbcbec60e43e101796b8d5130 @halgari halgari committed Jul 16, 2013
@@ -396,15 +396,19 @@
[blk-id (add-block)
_ (set-block blk-id)
expr-id (item-to-ssa expr)
- _ (add-instruction (->Jmp expr-id end-blk))]
+ _ (if (not= expr-id ::terminated)
+ (add-instruction (->Jmp expr-id end-blk))
+ (no-op))]
blk-id))
(map second clauses)))
default-block (if default
(gen-plan
[blk-id (add-block)
_ (set-block blk-id)
expr-id (item-to-ssa default)
- _ (add-instruction (->Jmp expr-id end-blk))]
+ _ (if (not= expr-id ::terminated)
+ (add-instruction (->Jmp expr-id end-blk))
+ (no-op))]
blk-id)
(no-op))
_ (set-block start-blk)
@@ -108,7 +108,14 @@
(runner
(case :baz
:foo 44
- :default))))
+ :default)))
+
+ (is= 42
+ (runner
+ (loop [x 0]
+ (case (int x)
+ 0 (recur (inc x))
+ 1 42)))))
(testing "try"
(is= 42

0 comments on commit 9ac00f9

Please sign in to comment.