Permalink
Browse files

CLJ(S) fixes for ASYNC-5

  • Loading branch information...
halgari committed Jul 16, 2013
1 parent 9ac00f9 commit 403d2cf1812f51bacd42130d5509fc881d44e4bc
@@ -418,6 +418,12 @@
ret-id (add-instruction (->Const ::value))]
ret-id)))
+(defmethod sexpr-to-ssa 'quote
+ [expr]
+ (gen-plan
+ [ret-id (add-instruction (->Const expr))]
+ ret-id))
+
(defmethod sexpr-to-ssa 'try
[[_ & body]]
(let [finally-fn (every-pred seq? (comp (partial = 'finally) first))
@@ -425,6 +425,12 @@
ret-id (add-instruction (->Const ::value))]
ret-id)))
+(defmethod sexpr-to-ssa 'quote
+ [expr]
+ (gen-plan
+ [ret-id (add-instruction (->Const expr))]
+ ret-id))
+
(defmethod sexpr-to-ssa 'try
[[_ & body]]
(let [finally-fn (every-pred seq? (comp (partial = 'finally) first))
@@ -87,6 +87,9 @@
(is (= 2
(runner ([1 2] 1)))))
+ (testing "quote"
+ (is= '(1 2 3)
+ (runner (pause '(1 2 3)))))
(testing "fn closures"
(is= 42
@@ -43,6 +43,10 @@
(is (= nil
(runner (when (pause false)
(pause true))))))
+
+ (testing "quote"
+ (is (= '(1 2 3)
+ (runner (pause '(1 2 3))))))
(testing "loop expressions"
(is (= 100

0 comments on commit 403d2cf

Please sign in to comment.