[Bese-devel] Re: invalid number of arguments: 3

Aleksandar Bakic a_bakic at yahoo.com
Fri Oct 21 01:56:29 UTC 2005


Hi,

I am investigating this error again, in the context of some other but similar
code. I verified that it does not occur with CMUCL, just SBCL. I'll continue
looking into the ucw/arnesi code; so far, it seems that the place getter, which
should be a function of one argument, is passed three arguments.

>From backtracking.lisp:

(defmacro make-place (form &optional (copyer '#'identity))
  "Create a new place around FORM."
  (with-unique-names (v)
    `(make-instance 'place
                    :getter (lambda () ,form)
                    :setter (lambda (,v) (setf ,form ,v))
                    :copyer ,copyer
                    :form ',form)))

(also see methods place and (setf place) and from the backtrace:

 16: ((LAMBDA (SB-PCL::.ARG0. SB-PCL::.ARG1. #1="#<...>" . #1#))
#<IT.BESE.ARNESI::CLOSURE/CC {99BFFFD}> NIL (IT.BESE.ARNESI::TOPLEVEL-K))
      Locals:
        SB-DEBUG::ARG-0 = 3
        SB-DEBUG::ARG-1 = #<IT.BESE.ARNESI::CLOSURE/CC {99BFFFD}>
        SB-DEBUG::ARG-2 = NIL
        SB-DEBUG::ARG-3 = (IT.BESE.ARNESI::TOPLEVEL-K)
        SB-DEBUG::ARG-4 = #<unknown immediate object, lowtag=#b110,
widetag=#x3E {170273E}>

where the inspector describes the closure:

An object.
 [type: IT.BESE.ARNESI::CLOSURE/CC]
--------------------
Class: #<SB-MOP:FUNCALLABLE-STANDARD-CLASS IT.BESE.ARNESI::CLOSURE/CC>
Slots:
CODE = #<IT.BESE.ARNESI::LAMBDA-FUNCTION-FORM # {A0430F1}>
ENV = ((:TAG #<IT.BESE.ARNESI::TAGBODY-FORM # {A025EA1}> .
#1=(IT.BESE.ARNESI::K-FOR-EVALUATE-LET*/CC OLFO::SERVICE-DATE (# # #)
(#<IT.BESE.ARNESI::IF-FORM # {9F7BAB9}>) #2=(# # # # # # # # # #) NIL
#3=(IT.BESE.ARNESI::TOPLEVEL-K))) (:LET OLFO::SD) (:BLOCK NIL . #1#) . #2#)

and CODE as:

An object.
 [type: IT.BESE.ARNESI::LAMBDA-FUNCTION-FORM]
--------------------
Class: #<STANDARD-CLASS IT.BESE.ARNESI::LAMBDA-FUNCTION-FORM>
Slots:
BODY = (#<IT.BESE.ARNESI::LOCAL-VARIABLE-REFERENCE OLFO::SD {A0455D1}>)
DECLARES = NIL
PARENT = #<IT.BESE.ARNESI::FREE-APPLICATION-FORM # {A03F609}>
SOURCE = (LAMBDA NIL OLFO::SD)   ; <=== looks like the getter as make-place is
passed sd
ARGUMENTS = NIL

I am guessing that this might have something to do with differences in macro
expansion between CMUCL and SBCL... Unless it is a subtle bug in arnesi/ucw.
Any hints as to where I should look further?

Thanks,
Alex


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



More information about the bese-devel mailing list