Changes between Initial Version and Version 1 of Ticket #1253


Ignore:
Timestamp:
Dec 12, 2014, 8:52:30 PM (6 years ago)
Author:
rme
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1253 – Description

    initial v1  
    44
    55As demonstrated in the CLHS example:
    6 
     6{{{
    77(define-compiler-macro square (x) ...)
    88(funcall (compiler-macro-function 'square) '(funcall #'square x) nil) => (EXPT X 2)
    9 
     9}}}
    1010This does not work on CCL:
    11 
     11{{{
    1212(funcall (compiler-macro-function 'square) '(funcall #'square x) nil)
    1313(#'SQUARE X) can't be destructured against the lambda list (ARG), because it contains 2 elements, and exactly one are expected.             
    1414   [Condition of type CCL::SIMPLE-PROGRAM-ERROR]
    15 
     15}}}
    1616CCL presumably doesn't try to compiler-macroexpand funcall forms, so this error doesn't come up during compilation, but the CLHS is still pretty clear that c-m-fs should work on funcall forms regardless. (Also, CCL actually trying to compiler macroexpand funcall forms might help optimization.)
    1717