cosmos72 / stmx

High performance Transactional Memory for Common Lisp
http://stmx.org/
241 stars 14 forks source link

support Clozure Common Lisp? #2

Closed cosmos72 closed 11 years ago

cosmos72 commented 11 years ago

Trying to use STMX version 0.9.4 with Clozure Common Lisp 1.9 (linux x64), while executing (ql:quickload "stmx") definining the transactional class

(transactional (defclass tcell () ((value :accessor value-of :initarg :value :initform empty-tcell))))

fails with: Undefined function (SETF CCL:SLOT-DEFINITION-TYPE) called with arguments (T #<TRANSACTIONAL-EFFECTIVE-SLOT for instance slot VALUE #x19238EBE>) .

[Condition of type CCL::UNDEFINED-FUNCTION-CALL] Restarts: 0: [CONTINUE] Retry applying (SETF CCL:SLOT-DEFINITION-TYPE) to (T #<TRANSACTIONAL-EFFECTIVE-SLOT for instance slot VALUE #x19238EBE>). 1: [USE-VALUE] Apply specified function to (T #<TRANSACTIONAL-EFFECTIVE-SLOT for instance slot VALUE #x19238EBE>) this time. 2: [STORE-VALUE] Specify a function to use as the definition of (SETF CCL:SLOT-DEFINITION-TYPE). 3: [RETRY] Retry SLIME REPL evaluation request. 4: [*ABORT] Return to SLIME's top level. 5: [ABORT-BREAK] Reset this thread 6: [ABORT] Kill this thread

Backtrace: 0: ((CCL:COMPUTE-EFFECTIVE-SLOT-DEFINITION (TRANSACTIONAL-CLASS T T)) #<TRANSACTIONAL-CLASS TCELL> VALUE (#<TRANSACTIONAL-DIRECT-SLOT for instance slot VALUE #x19190436>)) 1: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD CCL:COMPUTE-EFFECTIVE-SLOT-DEFINITION (TRANSACTIONAL-CLASS T T)> ..) -43201916) 2: (NIL #<Unknown Arguments>) 3: (#<CCL::STANDARD-KERNEL-METHOD CCL:COMPUTE-SLOTS (CCL::SLOTS-CLASS)> #<TRANSACTIONAL-CLASS TCELL>) 4: (CCL::%CALL-NEXT-METHOD (NIL #<CCL::STANDARD-KERNEL-METHOD CCL:COMPUTE-SLOTS (CCL::SLOTS-CLASS)> . -43201872)) 5: (#<CCL::STANDARD-KERNEL-METHOD CCL:COMPUTE-SLOTS :AROUND (CCL::STD-CLASS)> #<TRANSACTIONAL-CLASS TCELL>) 6: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<CCL::STANDARD-KERNEL-METHOD CCL:COMPUTE-SLOTS :AROUND (CCL::STD-CLASS)> #<CCL::STANDARD-KERNEL-METHOD CCL:COMPUTE-SLOTS (CCL::SLOTS-CLASS)>) -43201872) 7: (NIL #<Unknown Arguments>) 8: (CCL::UPDATE-CLASS #<TRANSACTIONAL-CLASS TCELL> T) 9: (CCL::UPDATE-CLASS #<TRANSACTIONAL-CLASS TCELL> NIL) ...

cosmos72 commented 11 years ago

Any help from MOP experts is welcome :)

cosmos72 commented 11 years ago

Solved with a workaround. Rather than trying to SETF the effective slot SLOT-DEFINITION-TYPE, I added a specialized method to get the SLOT-DEFINITION-TYPE that returns the type I wanted to set.