Skip to content

Commit

Permalink
revert loop lowering to while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Feb 10, 2019
1 parent 5a6b972 commit a755c6a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1567,11 +1567,10 @@
;; TODO avoid `local declared twice` error from this
;;,@(if outer `((local ,lhs)) '())
,@(if outer `((require-existing-local ,lhs)) '())
(if (call (top not_int) (call (core ===) ,next (null)))
(_do_while
(block ,body
(= ,next (call (top iterate) ,coll ,state)))
(call (top not_int) (call (core ===) ,next (null))))))))))))
(_while
(call (top not_int) (call (core ===), next (null)))
(block ,body
(= ,next (call (top iterate) ,coll ,state)))))))))))

;; wrap `expr` in a function appropriate for consuming values from given ranges
(define (func-for-generator-ranges expr range-exprs flat outervars)
Expand Down

0 comments on commit a755c6a

Please sign in to comment.