Opened 11 years ago

Closed 11 years ago

#473 closed defect (fixed)

ARGLIST-FROM-MAP confused by supplied-p variables

Reported by: gb Owned by: gb
Priority: normal Milestone:
Component: other Version: 1.3
Keywords: Cc:


[I have a fix for this and will close this ticket as soon as I check it in; if I missed some case, we can re-open the ticket.]

In the absence of better information, CCL:ARGLIST tries to construct a function's arglist from the function's symbol map (and lfun-bits.) Entries in the map generally appear in the reverse of the order in which variables come into scope, and supplied-p variables for optional args generally come into scope before subsequent optional args do; ARGLIST can't assume that ordered entries in the symbol map correspond to the names of arguments that can be passed by the caller unless we add some additional information or take some other steps to ensure this.

(The "shape" of the argument list has been correct, but getting the names wrong can be confusing, especially since backtrace uses the same mechanism to identify arguments and other values.)

Change History (2)

comment:1 Changed 11 years ago by gb

  • Owner set to gb
  • Status changed from new to assigned
? (defun foo (a &optional (b nil b-p) c) (list a b b-p c))
? (arglist #'foo)

Not the end of the world, but can make backtrace more confusing than it needs to be.

comment:2 Changed 11 years ago by gb

  • Resolution set to fixed
  • Status changed from assigned to closed

This is supposed to be fixed in the trunk in r12063.

Note: See TracTickets for help on using tickets.