Opened 15 years ago

Closed 14 years ago

#38 closed defect (fixed)

CLOS :metaclass support

Reported by: ehuelsmann Owned by: ehuelsmann
Priority: major Milestone: 0.20
Component: other Version:
Keywords: Cc:
Parent Tickets:

Description (last modified by ehuelsmann)

Blake McBride? reports:

Running the code:

(defclass meta-class1 (standard-class)
  (cv1 cv2 cv3)
  (:metaclass standard-class))

(defclass class1 (standard-object)
  (iv1 iv2 iv3)
  (:metaclass meta-class1))

The second object returns:

#<STANDARD-CLASS CLASS1 {F673CC}>

It should be:

#<META-CLASS1 CLASS1 {F673CC}>

Not only is it reporting the wrong class of class1 but it doesn't work either. I suppose ABCL doesn't support the :metaclass option. It just ignores it. The problem is that without that option ABCL's CLOS is severely limited. Any plans to fix this?

Thanks.

Blake McBride?

Change History (10)

comment:1 Changed 14 years ago by ehuelsmann

Milestone: 0.20
Owner: changed from somebody to ehuelsmann
Status: newaccepted

comment:2 Changed 14 years ago by ehuelsmann

(In [12527]) Make all class accessor functions generic functions instead

of normal ones, to support METACLASS. Additionally, make
it possible to store general objects in Layout.lispClass.

Because classes may be of a different Java type than

StandardClass?, fall back to the generic functions to access
the required fields from Java.

See #38.

comment:3 Changed 14 years ago by ehuelsmann

Description: modified (diff)

comment:4 Changed 14 years ago by ehuelsmann

(In [12529]) Re #38: CLASSP can't be checked with instanceof alone any longer.

comment:5 Changed 14 years ago by ehuelsmann

(In [12530]) Re #38: Make method creation and dispatch possible for classes with
non-standard-class metaclasses.

comment:6 Changed 14 years ago by ehuelsmann

(In [12534]) Make sure non-standard (meta) classes aren't cast to LispClass?
as they are StandardObject?-s.

Re #38.

comment:7 Changed 14 years ago by ehuelsmann

(In [12576]) Re #38: Merge the METACLASS branch to trunk.

comment:8 Changed 14 years ago by ehuelsmann

(In [12577]) Re #38: Delete merged metaclass branch.

comment:9 Changed 14 years ago by ehuelsmann

(In [12582]) Re #38: Make Cells compile with our metaclass support by

making a documentation initarg.

comment:10 Changed 14 years ago by ehuelsmann

Resolution: fixed
Status: acceptedclosed

(In [12658]) Close #38: Add some metaclass tests - to be expanded
upon fixing encountered issues.

Note: See TracTickets for help on using tickets.