[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Possible slight bug in ANSI compatibility
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] Possible slight bug in ANSI compatibility |
Date: |
31 May 2004 18:51:36 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
"Paul F. Dietz" <address@hidden> writes:
> Marc Mertens wrote:
> > Hello,
> > I am porting Jabberwocky to gcl and found the following
> > possible ansi bug with gcl.
> > - The type 'function' does not seem to be a class:
> > (defmethod test ((f function)) (princ 'ok)) gives the
> > error "Error in PCL::LOAD-DEFMETHOD [or a callee]: No class named:
> > FUNCTION". The definition works without problem on other lisp's and
> > if I interpret the hyperspec correctly 'function' should be a class.
> > - I'm using gcl 2.6.1, compiled with ANSI compatibility .
^^^^^
Yes, the issue here is that the CVS head branch has had significant
improvements committed in the ANSI area vis a vis the stable branch.
I'd recommend using 2.7.0 for Jabberwocky. (On Debian, packaged as
'gclcvs').
> > Thanks a lot for your work on gcl
>
> Did you compile gcl with the configuration option --enable-ansi?
>
> If you do that:
>
> >(defgeneric foo (x))
>
> #<compiled-closure FOO>
>
> >(defmethod foo ((x function)) t)
>
> #<Standard-Method FOO (FUNCTION) 1071351224>
>
>
> However:
>
> >(class-of #'car)
>
> #<Built-In-Class T 1034565230>
>
Yes, the old non-generic functions aren't apparently being picked up
in the pcl braid process. I suspect it is a matter of getting
new-kcl-wrapper working, the hooks for which already appear to be in
place:
pcl_braid.lisp:
(defmacro wrapper-of-macro (x)
`(cond ((std-instance-p ,x)
(std-instance-wrapper ,x))
((fsc-instance-p ,x)
(fsc-instance-wrapper ,x))
(t
(#+new-kcl-wrapper built-in-wrapper-of
#-new-kcl-wrapper built-in-or-structure-wrapper
,x))))
Take care,
> >(typep #'car 'function)
>
> T
>
> >(typep #'car (find-class 'function))
>
> NIL
>
>
> Paul
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gcl-devel
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah