Unverified Commit 70421e9b authored by Evan W. Patton's avatar Evan W. Patton Committed by Jeffrey I. Schiller

Work around break block issues in Kawa

Fixes #1230

Change-Id: I1eb4579f4873d2e60b357acd463dbbd77261c936
parent 6aa70536
...@@ -806,8 +806,18 @@ ...@@ -806,8 +806,18 @@
(let *yail-loop* () (let *yail-loop* ()
(if ,condition (if ,condition
(begin (begin
(begin ,body . ,rest) ;; Kawa attempts to be smart by detecting unreachable
(*yail-loop*)) ;; code and reporting it as an error. This causes an
;; issue here if *yail-break* is determined to be always
;; called within body-form, since *yail-loop* will
;; unreachable. The mixing of `or` and `and` operators
;; below fools the Kawa optimizer so that even in
;; trivial cases it won't flag the call to *yail-loop*
;; as unreachable. It also works around a bug in the
;; tail-recursive optimizer that breaks when the while
;; loop is empty.
(or (and ((lambda () (begin ,body . ,rest))) #f)
(*yail-loop*)))
#!null))))) #!null)))))
;; Below are hygienic versions of the forrange, foreach and while ;; Below are hygienic versions of the forrange, foreach and while
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment