Path: utzoo!dciem!nrcaer!sce!fred From: fred@sce.UUCP (Fred J. Kaudel) Newsgroups: comp.lang.lisp Subject: Franz-lisp from Sun User's Group bug fix Message-ID: <465@sce.UUCP> Date: 5 Sep 88 22:39:37 GMT Article-I.D.: sce.465 Organization: Systems Eng., Carleton University, Ottawa, Ontario, Canada Lines: 71 Hello, Franz-lisp version 38.92 as distributed from the Sun User's Group distribution tape number 2 has a bug in its handling of fixnum-block and flonum-block arrays, as was reported by John Powell in comp.lang.lisp in July. Specifically, (array xx flonum-block 12) returns "error: IMPROPER USE OF SETF" in both compiled and interpreted code. This problem is specific to the 68k and is corrected by making the following changes to array.l: (old code segment first, then corrected one) 78,91c78,101 < (cond ((or (and (or (eq 'fixnum type)(eq 'fixnum-block type)) < (setq rtype 0)) < (and (or (eq 'flonum type)(eq 'flonum-block type)) < (setq rtype 0.0)) < (and (or (status feature 68k) < (status feature for-68k)) < (progn (setq rtype nil) t))) < (do ((i size)) < ((zerop i)) < ;; BZS - wrong wrong < ;; this doesn't work for >1 dim arrays < ;; (store (funcall tname (setq i (1- i))) rtype)))) < ;; one more time < (set (arrayref tname (setq i (1- i))) rtype)))) --- > (cond ((or (and (eq 'fixnum type) (setq rtype 0)) > (and (eq 'flonum type) (setq rtype 0.0)) > (and (or (status feature 68k) > (status feature for-68k)) > (progn ;return t, kludges for 68k: > ;rtype set to nil for t and nil types > ;size set to 0 for *-block types:FJK > ; since can't set *-block stuff on suns now! > ; they are normally already inited to 0 > (cond > ((or (eq 'fixnum-block type) > (eq 'flonum-block type)) > (setq size 0);cut out do below > ;should do any custom init here! > ) > (t (setq rtype nil))));nil it out > t)) > (do ((i size)) > ((zerop i)) > ;; BZS - wrong wrong > ;; this doesn't work for >1 dim arrays > ;; (store (funcall tname (setq i (1- i))) rtype) > ;; one more time > (set (arrayref tname (setq i (1- i))) rtype)))) ---end of changes--- Applying the above changes and remaking lisp cures the array problems described above. -has anyone found a fix for the zerop bug in compiled lisp code on the suns? More specifically, (zerop 0) and (zerop 0.0) both evaluate to t on the vax, but evaluate to t and nil, respectively, when compiled on the sun using Liszt version 8.39a (comes with lisp on the tape). This problem is quite irritating since it makes code non-portable. -has anyone fixed the fixit debugger so that (debug |just before loop|) would work as is indicated in the manual (i.e., print "just before loop" at the start of the debug interaction)? Fred =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= fred@sce.carleton.ca (For Real mailers) --------------------------------------------------------- (For mailers which do not yet understand domains) UUCP: watmath!sce!fred@{allegra,decvax,ihnp4}.UUCP ARPA/CSNET: fred%sce.carleton.ca%@relay.ubc.ca =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=