[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A bug in THROW
Thanks to R. Harris for the bug report. [Also thanks to him for
error condition package!].
Here is a fix for the throw bug:
In cmpcatch.lsp, alter c2throw to:
(defun c2throw (tag val &aux (*vs* *vs*) loc)
(wt-nl "{frame_ptr fr;")
(case (car tag)
(LOCATION (setq loc (caddr tag)))
(VAR (setq loc (cons 'var (third tag))))
(t (setq loc (list 'vs (vs-push)))
(let ((*value-to-go* loc)) (c2expr* tag))))
(wt-nl "fr=frs_sch_catch(" loc ");")
(wt-nl "if(fr==NULL) FEerror(\"The tag ~s is undefined.\",1," loc ");")
(let ((*value-to-go* 'top)) (c2expr* val))
(wt-nl "unwind(fr," loc ");}")
)