[Ecls-list] Problem with DEFCLASS

Gabriel Dos Reis gdr at integrable-solutions.net
Mon Nov 16 00:19:16 UTC 2009


On Sun, Nov 15, 2009 at 3:41 PM, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
> On Sun, Nov 15, 2009 at 9:53 PM, Gabriel Dos Reis
> <gdr at integrable-solutions.net> wrote:
>> On Mon, Nov 9, 2009 at 5:08 PM, Gabriel Dos Reis
>> <gdr at integrable-solutions.net> wrote:
>>> I believe there is a bug in the way ECL handles DEFCLASS,
>>> but I have been unable to reduce the problem to a small testcase.
>>
>> Hi Junajo,
>>
>>  Did you get a chance to look into this?
>
> Yes, it is solved in CVS/git

This fix led to discover another problem in ECL (unrelated to DEFCLASS).
This time. it may be in the reader (I think).  The (SBCL) build dies
with error

;;; Compiling (DEFVAR *FIXNUM-PRIMITIVE-TYPE* ...).
;;; Internal error: Reader error in file #<input stream
#P"/home/gdr/src/sbcl.cvs/src/compiler/generic/primtype.lisp">,
position 2931:
;;; #1# is undefined.
couldn't compile "src/compiler/generic/primtype.lisp"


Since this is billed as an internal error, I thought you would want to
know about it :-)
I don't know what position 2931 refers but, here is the form which
I believe triggered the error

(!def-primitive-type-alias tagged-num (:or positive-fixnum fixnum))
(progn
  (!def-primitive-type-alias unsigned-num #1=
    #!+#.(cl:if (cl:= sb!vm::n-machine-word-bits 64) '(and) '(or))
    (:or unsigned-byte-64 unsigned-byte-63 positive-fixnum)
    #!-#.(cl:if (cl:= sb!vm::n-machine-word-bits 64) '(and) '(or))
    (:or unsigned-byte-32 unsigned-byte-31 positive-fixnum))
  (!def-primitive-type-alias signed-num #2=
    #!+#.(cl:if (cl:= sb!vm::n-machine-word-bits 64) '(and) '(or))
    (:or signed-byte-64 fixnum unsigned-byte-63 positive-fixnum)
    #!-#.(cl:if (cl:= sb!vm::n-machine-word-bits 64) '(and) '(or))
    (:or signed-byte-32 fixnum unsigned-byte-31 positive-fixnum))
  (!def-primitive-type-alias untagged-num
    (:or . #.(sort (copy-list (union (cdr '#1#) (cdr '#2#))) #'string<))))


-- Gaby




More information about the ecl-devel mailing list