From: Dave M. <da...@id...> - 2001-08-16 04:30:31
|
The CLISP maintainers have recently added MAKE-LOAD-FORM, so I've tried over the last couple of days to get it to compile SBCL. I've encountered a number of problems, but compilation gets further than when Martin Atzmueller last reported his progress. However, CLISP still cannot complete the make-host-1.sh script. The problems that I encountered: - some uses of DEFCONSTANT should be inside (EVAL-WHEN (:compile-toplevel) ...) forms, since the constant is used in reader macros later on - keywords are not accepted in DEFSTRUCT :include forms for the names of inherited slots. e.g. (defstruct (derived (:include struct-with-slot-named-variable (:variable 'new-default)))) ^^^^^^^^^ should be (defstruct (derived (:include struct-with-slot-named-variable (variable 'new-default)))) ^^^^^^^^ I think CLISP conforms to ANSI on this. - CLISP doesn't like the idiom where DEFSTRUCT slot-initforms reference bindings defined in the constructor declaration. e.g. (defstruct (test (:constructor make-test (vara))) vara (varb (+ vara 10))) should be re-written as the more portable (defstruct (test (:constructor make-test (vara &aux (varb (+ vara 10))))) vara varb) Thanks to Kent Pitman for pointing to this portable alternative. - the reader macro issue that Martin mentioned is because SBCL reader macro functions return two values, but ANSI says they should return 0 or 1 value. The macros in src/code/backq.lisp return two values. The second value doesn't seem to be used in SBCL's reader, so I changed them. I got past all of these problems. I haven't tried recompiling SBCL (using SBCL) yet, but I think the changes I made so far should be OK as they are. I'll do the recompile and send a diff in the next couple of days. Two more serious problems: - CLISP doesn't implement PPRINT-LOGICAL-BLOCK. So far, I have been able to ignore this problem by setting *{load,compile}-{verbose,print}* to nil, thereby avoiding the need to attempt a call to this undefined function. - CLISP generates the following error: Compiling file /home/dave/packages/sbcl-work1/src/code/force-delayed-defbangstructs.lisp ... Compilation of file /home/dave/packages/sbcl-work1/src/code/force-delayed-defbangstructs.lisp is finished. 0 errors, 0 warnings ;; Loading file obj/from-host/src/code/force-delayed-defbangstructs.lisp-obj ... *** - VECTOR-PUSH-EXTEND works only on adjustable arrays, not on #(#<UNKNOWN-TYPE NULL> #<ARRAY-TYPE SIMPLE-STRING>) From stepping through sb!kernel::force-delayed-def!structs, I know that the error is generated when processing the PRIM-OBJECT-SLOT structure, but I don't know why it happens. I'm not sure whether SBCL or CLISP is to blame, and I'm at a loss about how to debug further. -Dave |