Opened 11 years ago

Last modified 18 months ago

#332 new defect

slot-missing is called with a slot-name of nil

Reported by: Mark Evenson Owned by:
Priority: major Milestone: 1.9.3
Component: (A)MOP Version: 1.2.1
Keywords: mop Cc:
Parent Tickets:

Description

Dear maintainers

  1. a user-defined allocate-instance method is not called at all
  1. slot-missing is called with a slot-name of nil
  1. update-dependent is not being applied to its keyword arguments

Best regards

William

"1.2.1"
"Java_HotSpot(TM)_Client_VM-Oracle_Corporation-1.7.0_17-b02"
"x86-Windows_7-6.1"
;;;#1
CL-USER(2): (defclass quux-class (standard-class) ())
#<STANDARD-CLASS QUUX-CLASS {D2A36B}>
CL-USER(3): (defmethod allocate-instance :after ((class quux-class) &rest initargs)
(format t "allocated ~S~%" class))
#<STANDARD-METHOD ALLOCATE-INSTANCE :AFTER (QUUX-CLASS) {14A0B92}>
CL-USER(4): (defclass quux nil (bar) (:metaclass quux-class))
#<QUUX-CLASS QUUX {50039B}>
CL-USER(5): (make-instance *)
#<QUUX {B2D899}>
CL-USER(6): (inspect (fdefinition 'allocate-instance))
   0 LAYOUT -----------> #<LAYOUT {BEF803}>
   1 NAME -------------> ALLOCATE-INSTANCE
   2 LAMBDA-LIST ------> (CLASS &REST ...)
   3 REQUIRED-ARGS ----> (CLASS)
   4 OPTIONAL-ARGS ----> NIL
   5 INITIAL-METHODS --> NIL
   6 METHODS ----------> (#<STANDARD-METHOD ALLOCATE-INSTANCE :AFTER (QUUX-CLASS) {14A0B92}> #<STANDARD-METHOD ALLOCATE-INSTANCE :BEFORE (CLASS) {18C9692}> ...)
   7 METHOD-CLASS -----> #<STANDARD-CLASS STANDARD-METHOD {A801B0}>
   8 %METHOD-COMBINATION -> #<METHOD-COMBINATION STANDARD {F167BB}>
   9 ARGUMENT-PRECEDENCE-ORDER -> (CLASS)
  10 DECLARATIONS -----> NIL
  11 CLASSES-TO-EMF-TABLE -> #<EQUAL HASH-TABLE 0 entries, 11 buckets {D15EE4}>
  12 %DOCUMENTATION ---> NIL
;;;#2
CL-USER(11): (make-instance 'quux)
#<QUUX {F2AE7E}>
CL-USER(12): (slot-value * 'baz)
#<THREAD "interpreter" {1A2FE4D}>: Debugger invoked on condition of type SIMPLE-ERROR
  The slot NIL is missing from the class #<QUUX-CLASS QUUX {50039B}>.
Restarts:
  0: TOP-LEVEL Return to top level.
;;;#3
CL-USER(2): (defclass foo-class (standard-class) ())
#<STANDARD-CLASS FOO-CLASS {14A123F}>
CL-USER(3): (defclass foo-dep () ())
#<STANDARD-CLASS FOO-DEP {145B486}>
CL-USER(4): (defmethod mop:update-dependent ((class foo-class) (dep foo-dep) &key direct-slots &allow-other-keys))
#<STANDARD-METHOD MOP:UPDATE-DEPENDENT (FOO-CLASS FOO-DEP) {155388B}>
CL-USER(5): (defclass foo () (bar) (:metaclass foo-class))
#<FOO-CLASS FOO {25D10A}>
CL-USER(6): (mop:add-dependent * (make-instance 'foo-dep))
(#<FOO-DEP {F167BB}>)
CL-USER(7): (trace mop:update-dependent)
(MOP:UPDATE-DEPENDENT)
CL-USER(8): (defclass foo () (bar baz) (:metaclass foo-class))
  0: (MOP:UPDATE-DEPENDENT #<FOO-CLASS {25D10A}> #<FOO-DEP {F167BB}> (:DIRECT-SUPERCLASSES NIL :DIRECT-SUPERCLASSES NIL DIRECT-SLOTS ((:NAME BAR) (:NAME BAZ))))
#<THREAD "interpreter" {886140}>: Debugger invoked on condition of type PROGRAM-ERROR
  Odd number of keyword arguments.
Restarts:
  0: TOP-LEVEL Return to top level.

Change History (15)

comment:1 Changed 11 years ago by Mark Evenson

Summary: Problems with MOPslot-missing is called with a slot-name of nil

comment:2 Changed 11 years ago by Mark Evenson

Milestone: 1.2.21.4.0

Ticket retargeted after milestone closed

comment:3 Changed 8 years ago by Mark Evenson

Milestone: 1.4.01.5.0

Ticket retargeted after milestone closed

comment:4 Changed 8 years ago by Mark Evenson

Milestone: 1.5.01.6.0

Ticket retargeted after milestone closed

comment:5 Changed 5 years ago by Mark Evenson

Milestone: 1.6.01.6.1

Ticket retargeted after milestone closed

comment:6 Changed 5 years ago by Mark Evenson

Milestone: 1.6.11.6.2

Ticket retargeted after milestone closed

comment:7 Changed 5 years ago by Mark Evenson

Milestone: 1.6.21.7.0

comment:8 Changed 5 years ago by Mark Evenson

Milestone: 1.7.01.7.1

Ticket retargeted after milestone closed

comment:9 Changed 4 years ago by Mark Evenson

Milestone: 1.7.11.7.2

Ticket retargeted after milestone closed

comment:10 Changed 4 years ago by Mark Evenson

Milestone: 1.7.21.8.0

Milestone renamed

comment:11 Changed 4 years ago by Mark Evenson

Milestone: 1.8.01.8.1

Ticket retargeted after milestone closed

comment:12 Changed 3 years ago by Mark Evenson

Milestone: 1.8.11.9.0

comment:13 Changed 23 months ago by Mark Evenson

Milestone: 1.9.01.9.1

comment:14 Changed 22 months ago by Mark Evenson

Milestone: 1.9.11.9.2

comment:15 Changed 18 months ago by Mark Evenson

Milestone: 1.9.21.9.3
Note: See TracTickets for help on using tickets.