[Cl-perec-devel] allegro port

Tomas Hlavaty tomas.hlavaty at knowledgetools.de
Fri Jan 29 11:33:49 UTC 2010


Hi Attila,

> drop me a note when you have more to pull from those repos!

I have updated the repositories at
http://www.knowledgetools.de/tmp/temporaer/tomas/index.html with new
patches.  (Note that hu.dwim.perec repository is currently broken, see
below.)

I've got cl-perec to work on allegro, but when I switched to
hu.dwim.perec, there is one problem I haven't figured out yet.  The
patch to port slot-definition-class is in the above repo and it works
with cl-perec but not with hu.dwim.perec (broken both on sbcl and
allegro).  Basically, I replaced sb-pcl::%class with a new slot in
persistent-slot-definition to make it portable.  In hu.dwim.perec
however, slot-definition-class is called (recursively and) even for
non-persistent slots which seems wrong to me.  So far, I haven't figured
out why exactly, only that when slot-boundp-or-value-using-class is
called on a slot, persistent-p is called (which looks at the
non-persistent slot 'persistent' of the class persistent-object) and
then it fails with

There is no applicable method for the generic function
  #<STANDARD-GENERIC-FUNCTION
    HU.DWIM.PEREC::SLOT-DEFINITION-CLASS (1)>
when called with arguments
  (#<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION
     HU.DWIM.PEREC::PERSISTENT>).
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [TERMINATE-TRANSACTION] return (values) from the WITH-TRANSACTION block executing the current terminal action :COMMIT
 1: [COMMIT-TRANSACTION] mark transaction for commit only and return (values) from the WITH-TRANSACTION block
 2: [ROLLBACK-TRANSACTION] mark transaction for rollback only and return (values) from the WITH-TRANSACTION block
 3: [RESTART-TRANSACTION] rollback the transaction by unwinding the stack and restart the WITH-TRANSACTION block in a new database transaction
 4: [CONTINUE] Skip the rest of the test HU.DWIM.PEREC.TEST::TEST/PERSISTENCE/INSTANCE/MODIFIED/1 and continue by returning (values)
 5: [RETEST] Rerun the test HU.DWIM.PEREC.TEST::TEST/PERSISTENCE/INSTANCE/MODIFIED/1
 --more--

Backtrace:
  0: ((LAMBDA (SWANK-BACKEND::DEBUGGER-LOOP-FN)) #<FUNCTION (LAMBDA #) {AD5F36D}>)
  1: (SWANK::DEBUG-IN-EMACS #<SIMPLE-ERROR {CA78001}>)
  2: (SWANK:INVOKE-SLIME-DEBUGGER #<SIMPLE-ERROR {CA78001}>)
  3: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {CA7BCFD}>)
  4: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {CA7BCFD}>)
  5: (SWANK:SWANK-DEBUGGER-HOOK #<SIMPLE-ERROR {CA78001}> #<unavailable argument>)
  6: (SB-DEBUG::RUN-HOOK *DEBUGGER-HOOK* #<SIMPLE-ERROR {CA78001}>)
  7: (INVOKE-DEBUGGER #<SIMPLE-ERROR {CA78001}>)
  8: (HU.DWIM.STEFIL::RECORD-UNEXPECTED-ERROR #<SIMPLE-ERROR {CA78001}>)
  9: ((FLET #:LAMBDA79) #<SIMPLE-ERROR {CA78001}>)
 10: (SIGNAL #<SIMPLE-ERROR {CA78001}>)[:EXTERNAL]
 11: (ERROR "~@<There is no applicable method for the generic function ~2I~_~S~\n          ~I~_when called with arguments ~2I~_~S.~:>")[:EXTERNAL]
 12: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) #<unavailable argument> #<unavailable argument> #<STANDARD-GENERIC-FUNCTION HU.DWIM.PEREC::SLOT-DEFINITION-CLASS (1)>)[:EXTERNAL]
 13: ((SB-PCL::FAST-METHOD SB-MOP:SLOT-VALUE-USING-CLASS (HU.DWIM.PEREC:PERSISTENT-CLASS HU.DWIM.PEREC:PERSISTENT-OBJECT SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION)) #<error printing object>)
      Locals:
        SB-DEBUG::ARG-0 = :<NOT-AVAILABLE>
        SB-DEBUG::ARG-1 = #<CLOSURE (LAMBDA (CLASS SB-KERNEL:INSTANCE SB-PCL::SLOTD)) {CA72A5D}>
        SB-DEBUG::ARG-2 = #<HU.DWIM.PEREC:PERSISTENT-CLASS HU.DWIM.PEREC.TEST::INSTANCE-TEST>
        SB-DEBUG::ARG-3 = #<HU.DWIM.PEREC.TEST::INSTANCE-TEST <<error printing object>> {D207AB1}>
        SB-DEBUG::ARG-4 = #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION HU.DWIM.PEREC::PERSISTENT>
 14: (SLOT-VALUE #<error printing object>)
      Locals:
        SB-DEBUG::ARG-0 = #<HU.DWIM.PEREC.TEST::INSTANCE-TEST <<error printing object>> {D207AB1}>
        SB-DEBUG::ARG-1 = HU.DWIM.PEREC::PERSISTENT
 15: (HU.DWIM.PEREC::SLOT-BOUNDP-OR-VALUE-USING-CLASS #<error printing object>)
      Locals:
        SB-DEBUG::ARG-0 = #<HU.DWIM.PEREC:PERSISTENT-CLASS HU.DWIM.PEREC.TEST::INSTANCE-TEST>
        SB-DEBUG::ARG-1 = #<HU.DWIM.PEREC.TEST::INSTANCE-TEST <<error printing object>> {D207AB1}>
        SB-DEBUG::ARG-2 = #<HU.DWIM.PEREC:PERSISTENT-EFFECTIVE-SLOT-DEFINITION CODE {B73CF51}>
        SB-DEBUG::ARG-3 = #<FUNCTION (LAMBDA (HU.DWIM.PEREC::!1)) {CCD6235}>
 16: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE (SB-PCL::SLOT-OBJECT T)) #<error printing object>)[:EXTERNAL]
      Locals:
        SB-DEBUG::ARG-0 = 8
        SB-DEBUG::ARG-1 = :<NOT-AVAILABLE>
        SB-DEBUG::ARG-2 = :<NOT-AVAILABLE>
        SB-DEBUG::ARG-3 = #<HU.DWIM.PEREC.TEST::INSTANCE-TEST <<error printing object>> {D207AB1}>
        SB-DEBUG::ARG-4 = T
 17: ((SB-PCL::FAST-METHOD INITIALIZE-INSTANCE :AROUND (HU.DWIM.PEREC:PERSISTENT-OBJECT)) #<error printing object>)[:EXTERNAL]
 18: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS)) #<unavailable argument> #<unavailable argument> #<HU.DWIM.PEREC:PERSISTENT-CLASS HU.DWIM.PEREC.TEST::INSTANCE-TEST>)[:EXTERNAL]

Isn't it wrong that slot-definition-class is called even for slots that
are not persistent?  I haven't yet located where this happens so any
idea where is this happening would be great help.

Thank you,

Tomas




More information about the cl-perec-devel mailing list