This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: More tagbody


Are Meisfjord wrote:
(define (test)
  (let ((val '()))
    (try-catch
     (letrec ((start (lambda ()
		       (set! val 1)
		       (point-a)
		       (throw (make <java.lang.RuntimeException>))
		       (set! val (+ val 16))
		       (point-c)))

This doesn't make sense - why the set! and point-c call after the throw?

As you can see I get away with at most one exception thrown per
tagbody (any suggestions on how to get rid of it?)

I suspect you'll have to do some Java coding. Basically, you want to have the code expand to a BlockExp/ExitExp, possibly after optimization. The easiest might be to implement the CommonLisp block and return-from forms, which map pretty directly into BlockExp and ExitExp. If there is some similar form in some Scheme implementation, that might be better. -- --Per Bothner per at bothner dot com http://per.bothner.com/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]