[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read-label bug in io.d



There's some new bug in CLISP

Compile a file containing:
----------------
(defun foo ()
  (list '#.(make-pathname :type "foo")
	'#.(make-pathname :type "bar")))
----------------

compilation works fine and gives:

----------------
(SYSTEM::VERSION '(SYSTEM::CLISP3 9. LISP:T 101293.))
#Y(#:TOP-LEVEL-FORM-1 #18Y(00 00 00 00 00 00 00 01 D8 2E 01 D8 DA 31 78 C3 19 01) FOO
   SYSTEM::REMOVE-OLD-DEFINITIONS
   #Y(FOO #14Y(00 00 00 00 00 00 00 01 D8 D9 60 02 19 01)
      #S(PATHNAME :HOST NIL :DEVICE NIL :DIRECTORY #1=(:RELATIVE) :NAME NIL :TYPE "foo"
         :VERSION NIL
        )
      #S(PATHNAME :HOST NIL :DEVICE NIL :DIRECTORY #1# :NAME NIL :TYPE "bar" :VERSION NIL)
  )  )
----------------
but loading the compiled file gives:

;; Datei /home/hoehle/test.fas wird geladen...
*** - MAKE-PATHNAME: Unzulaessiges :DIRECTORY-Argument #<READ-LABEL 1>
1. Break> 

This was tested on Amiga and Sun using January 25th CLISP.

The thing is that, like for complex numbers with #C(#1=7.3 #1#), #n#
references must be resolved before MAKE-PATHNAME is called:

diff -c3 src/io.d.orig src/io.d
*** src/io.d.orig       Wed Dec 15 02:01:11 1993
--- src/io.d    Thu Feb 24 15:58:17 1994
***************
*** 3933,3939 ****
         }}
       if (eq(name,S(pathname))) # Symbol PATHNAME ?
         # ja -> speziell behandeln, keine Structure:
!        { pushSTACK(L(make_pathname)); }
       elif (eq(name,S(byte))) # Symbol BYTE ?
         # ja -> speziell behandeln, keine Structure:
         { pushSTACK(S(make_byte)); }
--- 3933,3939 ----
         }}
       if (eq(name,S(pathname))) # Symbol PATHNAME ?
         # ja -> speziell behandeln, keine Structure:
!        { STACK_1 = make_references(args); pushSTACK(L(make_pathname)); }
       elif (eq(name,S(byte))) # Symbol BYTE ?
         # ja -> speziell behandeln, keine Structure:
         { pushSTACK(S(make_byte)); }

I tested this patch on the Amiga.

Thanks for your attention,
 	Joerg Hoehle.
hoehle@inf-wiss.uni-konstanz.de