Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

long form define-method-combination problem #492

Open
yitzchak opened this issue May 22, 2024 · 4 comments
Open

long form define-method-combination problem #492

yitzchak opened this issue May 22, 2024 · 4 comments

Comments

@yitzchak
Copy link
Contributor

CCL is unable to use the latest ansi-test because it fails in the long form of define-method-combination. The issue appears to be that long-form-define-method-combination uses destructuring-bind to parse the lambda list which is not sufficient since the lambda list to define-method-combination is not a destructuring lambda list, but an ordinary lambda list.

$ ccl --load doit.lsp 
;Compiler warnings for "home:Documents;git;ansi-test;auxiliary;ansi-aux.lsp.newest" :
;   Clause (SINGLE-FLOAT SINGLE-FLOAT-EPSILON) ignored in ETYPECASE form - shadowed by (SHORT-FLOAT SHORT-FLOAT-EPSILON) .
;   Clause (LONG-FLOAT LONG-FLOAT-EPSILON) ignored in ETYPECASE form - shadowed by (DOUBLE-FLOAT DOUBLE-FLOAT-EPSILON) .
;   Clause (SINGLE-FLOAT SINGLE-FLOAT-NEGATIVE-EPSILON) ignored in ETYPECASE form - shadowed by (SHORT-FLOAT SHORT-FLOAT-NEGATIVE-EPSILON) .
;   Clause (LONG-FLOAT LONG-FLOAT-NEGATIVE-EPSILON) ignored in ETYPECASE form - shadowed by (DOUBLE-FLOAT DOUBLE-FLOAT-NEGATIVE-EPSILON) .
;Compiler warnings for "/home/yitzi/Documents/git/ansi-test/eval-and-compile/declaration.lsp" :
;   In an anonymous lambda form inside an anonymous lambda form at position 847: Unused lexical variable C
;Compiler warnings for "home:Documents;git;ansi-test;data-and-control-flow;flet.lsp.newest" :
;   In (COMPILER-MACRO-FUNCTION FLET.74): Unused lexical variable FORM
;Compiler warnings for "home:Documents;git;ansi-test;data-and-control-flow;labels.lsp.newest" :
;   In (COMPILER-MACRO-FUNCTION LABELS.52): Unused lexical variable FORM
;Compiler warnings for "home:Documents;git;ansi-test;data-and-control-flow;macrolet.lsp.newest" :
;   In (COMPILER-MACRO-FUNCTION MACROLET.52): Unused lexical variable FORM
;Compiler warnings for "home:Documents;git;ansi-test;auxiliary;defclass-aux.lsp.newest" :
;   In DEFCLASS-WITH-TESTS: Unused lexical variable ALLOCATION
;   In DEFCLASS-WITH-TESTS: Unused lexical variable INITARG-LIST
;Compiler warnings for "/home/yitzi/Documents/git/ansi-test/objects/with-slots.lsp" :
;   In (SLOT-UNBOUND (T WITH-SLOTS-CLASS-01 T)) inside an anonymous lambda form: Unused lexical variable SLOT-NAME
;Compiler warnings for "/home/yitzi/Documents/git/ansi-test/objects/define-method-combination-long-form.lsp" :
;   In an anonymous lambda form inside an anonymous lambda form at position 4336: Unused lexical variable IGNORED-METHODS
;Compiler warnings for "/home/yitzi/Documents/git/ansi-test/objects/define-method-combination-long-form.lsp" :
;   In an anonymous lambda form inside an anonymous lambda form at position 4336: IGNORABLE declaration for unknown variable IGNORED-METHODS
;Compiler warnings for "/home/yitzi/Documents/git/ansi-test/objects/define-method-combination-long-form.lsp" :
;   In an anonymous lambda form inside an anonymous lambda form at position 5414: Unused lexical variable IGNORED-METHODS
;Compiler warnings for "/home/yitzi/Documents/git/ansi-test/objects/define-method-combination-long-form.lsp" :
;   In an anonymous lambda form inside an anonymous lambda form at position 5414: IGNORABLE declaration for unknown variable IGNORED-METHODS
> Error: The value (Y1 :Y1 Y1-SUPPLIED) is not of the expected type SYMBOL.
> While executing: CCL::LONG-FORM-DEFINE-METHOD-COMBINATION, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Skip loading "doit.lsp"
> Type :? for other options.
1 > :b
*(7F0D50A17380) : 0 (LONG-FORM-DEFINE-METHOD-COMBINATION MC-LONG-11 NIL ((METHOD-LIST *)) ((LIST* # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 402
 (7F0D50A17430) : 1 (FUNCALL #<Compiled-function DEFINE-METHOD-COMBINATION Macroexpander #x3000009AAF5F> (DEFINE-METHOD-COMBINATION MC-LONG-11 NIL (#) (:ARGUMENTS X1 &OPTIONAL # &REST ...) ...) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 149
 (7F0D50A17460) : 2 (MACROEXPAND-1 (DEFINE-METHOD-COMBINATION MC-LONG-11 NIL (#) (:ARGUMENTS X1 &OPTIONAL # &REST ...) ...) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 261
 (7F0D50A17490) : 3 (NX-TRANSFORM (DEFINE-METHOD-COMBINATION MC-LONG-11 NIL (#) (:ARGUMENTS X1 &OPTIONAL # &REST ...) ...) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD> #<HASH-TABLE :TEST EQ size 903/1031 #x30200177733D>) 2453
 (7F0D50A17508) : 4 (NX-TRANSFORM-ARGLIST (CCL::%DEFPARAMETER '*DMC-LONG-11* (DEFINE-METHOD-COMBINATION MC-LONG-11 NIL # # ...) NIL) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD> #<HASH-TABLE :TEST EQ size 903/1031 #x30200177733D>) 221
 (7F0D50A17568) : 5 (NX-TRANSFORM (CCL::%DEFPARAMETER '*DMC-LONG-11* (DEFINE-METHOD-COMBINATION MC-LONG-11 NIL # # ...) NIL) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD> #<HASH-TABLE :TEST EQ size 903/1031 #x30200177733D>) 1013
 (7F0D50A175F0) : 6 (NX1-TYPED-FORM :RETURN (CCL::%DEFPARAMETER '*DMC-LONG-11* (DEFINE-METHOD-COMBINATION MC-LONG-11 NIL # # ...) NIL) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 101
 (7F0D50A17620) : 7 (NX1-FORM :RETURN (CCL::%DEFPARAMETER '*DMC-LONG-11* (DEFINE-METHOD-COMBINATION MC-LONG-11 NIL # # ...) NIL) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 493
 (7F0D50A17688) : 8 (NX1-PROGN-BODY :RETURN ((CCL::%DEFPARAMETER # # NIL))) 405
 (7F0D50A176C8) : 9 (NX1-COMBINATION :RETURN (PROGN (EVAL-WHEN # #) (CCL::%DEFPARAMETER # # NIL)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 549
 (7F0D50A17730) : 10 (NX1-TRANSFORMED-FORM :RETURN (PROGN (EVAL-WHEN # #) (CCL::%DEFPARAMETER # # NIL)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 333
 (7F0D50A17788) : 11 (NX1-TYPED-FORM :RETURN (PROGN (DEFPARAMETER *DMC-LONG-11* #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 261
 (7F0D50A177E8) : 12 (NX1-FORM :RETURN (PROGN (DEFPARAMETER *DMC-LONG-11* #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 493
 (7F0D50A17850) : 13 (FUNCALL #'#<CCL::NX1-RETURN-FROM> :VALUE (RETURN-FROM #:G15340 (PROGN #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 581
 (7F0D50A178D0) : 14 (NX1-COMBINATION :VALUE (RETURN-FROM #:G15340 (PROGN #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 549
 (7F0D50A17938) : 15 (NX1-TRANSFORMED-FORM :VALUE (RETURN-FROM #:G15340 (PROGN #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 333
 (7F0D50A17990) : 16 (NX1-TYPED-FORM :VALUE (RETURN-FROM #:G15340 (PROGN #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 261
 (7F0D50A179F0) : 17 (NX1-FORM :VALUE (RETURN-FROM #:G15340 (PROGN #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEABD>) 493
 (7F0D50A17A58) : 18 (NX1-ENV-BODY :VALUE ((RETURN-FROM #:G15340 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEB6D> T) 189
 (7F0D50A17A90) : 19 (FUNCALL #'#<CCL::NX1-LET*> :VALUE (LET* (#) (DECLARE #) (RETURN-FROM #:G15340 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEB6D>) 1221
 (7F0D50A17B88) : 20 (NX1-COMBINATION :VALUE (LET* (#) (DECLARE #) (RETURN-FROM #:G15340 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEB6D>) 549
 (7F0D50A17BF0) : 21 (NX1-TRANSFORMED-FORM :VALUE (LET* (#) (DECLARE #) (RETURN-FROM #:G15340 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEB6D>) 333
 (7F0D50A17C48) : 22 (NX1-TYPED-FORM :VALUE (LET (#) (DECLARE #) (RETURN-FROM #:G15340 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEB6D>) 261
 (7F0D50A17CA8) : 23 (NX1-FORM :VALUE (LET (#) (DECLARE #) (RETURN-FROM #:G15340 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEB6D>) 493
 (7F0D50A17D10) : 24 (NX1-CATCH-BODY :VALUE ((LET # # #))) 213
 (7F0D50A17D58) : 25 (FUNCALL #'#<CCL::NX1-CATCH> :VALUE (CATCH #:G15341 (LET # # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEEFD>) 205
 (7F0D50A17DA8) : 26 (NX1-COMBINATION :VALUE (CATCH #:G15341 (LET # # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEEFD>) 549
 (7F0D50A17E10) : 27 (NX1-TRANSFORMED-FORM :VALUE (CATCH #:G15341 (LET # # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEEFD>) 333
 (7F0D50A17E68) : 28 (NX1-TYPED-FORM :VALUE (CATCH #:G15341 (LET # # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEEFD>) 261
 (7F0D50A17EC8) : 29 (NX1-FORM :VALUE (CATCH #:G15341 (LET # # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FEEFD>) 493
 (7F0D50A17F30) : 30 (NX1-ENV-BODY :VALUE ((CATCH #:G15341 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D> T) 189
 (7F0D50A17F68) : 31 (FUNCALL #'#<CCL::NX1-LET*> :VALUE (LET* (#) (DECLARE #) (CATCH #:G15341 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D>) 1221
 (7F0D50A18060) : 32 (NX1-COMBINATION :VALUE (LET* (#) (DECLARE #) (CATCH #:G15341 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D>) 549
 (7F0D50A180C8) : 33 (NX1-TRANSFORMED-FORM :VALUE (LET* (#) (DECLARE #) (CATCH #:G15341 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D>) 333
 (7F0D50A18120) : 34 (NX1-TYPED-FORM :VALUE (LET* (#) (DECLARE #) (CATCH #:G15341 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D>) 261
 (7F0D50A18180) : 35 (NX1-FORM :VALUE (LET* (#) (DECLARE #) (CATCH #:G15341 #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D>) 493
 (7F0D50A181E8) : 36 (NX1-FORMLIST :RETURN ((LET* # # #))) 101
 (7F0D50A18220) : 37 (NX1-LAMBDA-BIND :RETURN (CONDITION) ((LET* # # #)) ((PRINC CONDITION) (TERPRI) (WHEN *REPORT-AND-IGNORE-ERRORS-BREAK* #) (VALUES NIL CONDITION)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D>) 965
 (7F0D50A18368) : 38 (NX1-TRANSFORMED-FORM :RETURN ((LAMBDA # # # # ...) (LET* # # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D>) 333
 (7F0D50A183C0) : 39 (NX1-TYPED-FORM :RETURN ((LAMBDA # # # # ...) (LET* # # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D>) 261
 (7F0D50A18420) : 40 (NX1-FORM :RETURN ((LAMBDA # # # # ...) (LET* # # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF24D>) 493
 (7F0D50A18488) : 41 (FUNCALL #'#<CCL::NX1-BLOCK> :RETURN (BLOCK #:G15340 (# #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF66D>) 613
 (7F0D50A18520) : 42 (NX1-COMBINATION :RETURN (BLOCK #:G15340 (# #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF66D>) 549
 (7F0D50A18588) : 43 (NX1-TRANSFORMED-FORM :RETURN (BLOCK #:G15340 (# #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF66D>) 333
 (7F0D50A185E0) : 44 (NX1-TYPED-FORM :RETURN (PROGN (LET NIL #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF66D>) 261
 (7F0D50A18640) : 45 (NX1-FORM :RETURN (PROGN (LET NIL #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF66D>) 493
 (7F0D50A186A8) : 46 (NX1-ENV-BODY :RETURN ((PROGN #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF70D> T) 189
 (7F0D50A186E0) : 47 (NX1-LAMBDA NIL ((PROGN #)) NIL) 1477
 (7F0D50A187B8) : 48 (NX1-COMPILE-LAMBDA NIL (LAMBDA NIL (PROGN #)) #<CCL::AFUNC #x3020019FF75D> NIL #<CCL::LEXICAL-ENVIRONMENT #x3020019FF82D> #<CCL:COMPILER-POLICY #x3020001D1A7D> NIL) 2373
 (7F0D50A18A70) : 49 (COMPILE-NAMED-FUNCTION (LAMBDA NIL (PROGN #)) :NAME NIL :ENV #<CCL::LEXICAL-ENVIRONMENT #x3020019FF9DD> :FUNCTION-NOTE #<SOURCE-NOTE "/home/yitzi/Documents/git/ansi-test/objects/define-method-combination-long-form.lsp":10584-10927 "(report-and-ignore-errors (defparameter *dmc-long-11* (define-method-combination mc-long-11 () ((method-list *)) (:argum..."> :KEEP-LAMBDA NIL :KEEP-SYMBOLS T :SOURCE-NOTES #<HASH-TABLE :TEST EQ size 903/1031 #x30200177733D>) 2733
 (7F0D50A18CF0) : 50 (CHEAP-EVAL-FUNCTION NIL (LAMBDA NIL (PROGN #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF9DD>) 229
 (7F0D50A18D20) : 51 (CHEAP-EVAL-IN-ENVIRONMENT (LET NIL (COMMON-LISP:HANDLER-CASE # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020019FF9DD>) 3205
 (7F0D50A18D48) : 52 (FUNCALL #'#<(:INTERNAL CCL::PROGN-IN-ENV CCL::CHEAP-EVAL-IN-ENVIRONMENT)> ((REPORT-AND-IGNORE-ERRORS #) (REPORT-AND-IGNORE-ERRORS # # #)) #<CCL::LEXICAL-ENVIRONMENT #x3020017773CD> #<CCL::LEXICAL-ENVIRONMENT #x3020019FFB7D>) 325
 (7F0D50A18D90) : 53 (FUNCALL #'#<(:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM)>) 781
 (7F0D50A18E08) : 54 (CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM) #x7F0D7137D45F> :OVERRIDE NIL) 197
 (7F0D50A18E50) : 55 (LOAD-FROM-STREAM #<BASIC-FILE-CHARACTER-INPUT-STREAM ("/home/yitzi/Documents/git/ansi-test/objects/define-method-combination-long-form.lsp"/8 UTF-8) #x302001777E8D> NIL) 397
 (7F0D50A18E90) : 56 (%LOAD #P"/home/yitzi/Documents/git/ansi-test/objects/define-method-combination-long-form.lsp" NIL NIL :ERROR :DEFAULT NIL) 5565
 (7F0D50A18FD8) : 57 (LOAD "define-method-combination-long-form.lsp" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT :PRESERVE-OPTIMIZATION-SETTINGS NIL) 1061
 (7F0D50A19080) : 58 (FUNCALL #'#<Anonymous Function #x30200148E63F>) 1597
 (7F0D50A190A8) : 59 (FUNCALL #'#<(:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM)>) 781
 (7F0D50A19120) : 60 (CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM) #x7F0D7137D7AF> :OVERRIDE NIL) 197
 (7F0D50A19168) : 61 (LOAD-FROM-STREAM #<BASIC-FILE-CHARACTER-INPUT-STREAM ("/home/yitzi/Documents/git/ansi-test/objects/load.lsp"/7 UTF-8) #x30200144BFFD> NIL) 397
 (7F0D50A191A8) : 62 (%LOAD #P"/home/yitzi/Documents/git/ansi-test/objects/load.lsp" NIL NIL :ERROR :DEFAULT NIL) 5565
 (7F0D50A192F0) : 63 (LOAD "objects/load.lsp" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT :PRESERVE-OPTIMIZATION-SETTINGS NIL) 1061
 (7F0D50A19398) : 64 (CALL-CHECK-REGS LOAD "objects/load.lsp") 229
 (7F0D50A193D0) : 65 (FUNCALL #'#<(:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM)>) 781
 (7F0D50A19448) : 66 (CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM) #x7F0D7137DB2F> :OVERRIDE NIL) 197
 (7F0D50A19490) : 67 (LOAD-FROM-STREAM #<BASIC-FILE-CHARACTER-INPUT-STREAM ("/home/yitzi/Documents/git/ansi-test/gclload2.lsp"/6 UTF-8) #x30200115C9CD> NIL) 397
 (7F0D50A194D0) : 68 (%LOAD #P"/home/yitzi/Documents/git/ansi-test/gclload2.lsp" NIL NIL :ERROR :DEFAULT NIL) 5565
 (7F0D50A19618) : 69 (LOAD "gclload2.lsp" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT :PRESERVE-OPTIMIZATION-SETTINGS NIL) 1061
 (7F0D50A196C0) : 70 (FUNCALL #'#<Anonymous Function #x302000E82C1F>) 853
 (7F0D50A196F0) : 71 (FUNCALL #'#<(:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM)>) 781
 (7F0D50A19768) : 72 (CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM) #x7F0D7137DE7F> :OVERRIDE NIL) 197
 (7F0D50A197B0) : 73 (LOAD-FROM-STREAM #<BASIC-FILE-CHARACTER-INPUT-STREAM ("/home/yitzi/Documents/git/ansi-test/init.lsp"/5 UTF-8) #x302000E7D33D> NIL) 397
 (7F0D50A197F0) : 74 (%LOAD #P"/home/yitzi/Documents/git/ansi-test/init.lsp" NIL NIL :ERROR :DEFAULT NIL) 5565
 (7F0D50A19938) : 75 (LOAD "init.lsp" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT :PRESERVE-OPTIMIZATION-SETTINGS NIL) 1061
 (7F0D50A199E0) : 76 (FUNCALL #'#<Anonymous Function #x302000E7D7AF>) 269
 (7F0D50A19A18) : 77 (FUNCALL #'#<(:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM)>) 781
 (7F0D50A19A90) : 78 (CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM) #x7F0D7137E1CF> :OVERRIDE NIL) 197
 (7F0D50A19AD8) : 79 (LOAD-FROM-STREAM #<BASIC-FILE-CHARACTER-INPUT-STREAM ("/home/yitzi/Documents/git/ansi-test/doit.lsp"/4 UTF-8) #x302000E7F1AD> NIL) 397
 (7F0D50A19B18) : 80 (%LOAD #P"/home/yitzi/Documents/git/ansi-test/doit.lsp" NIL NIL :ERROR :DEFAULT NIL) 5565
 (7F0D50A19C60) : 81 (LOAD "doit.lsp" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT :PRESERVE-OPTIMIZATION-SETTINGS NIL) 1061
 (7F0D50A19D08) : 82 (FUNCALL #'#<(:INTERNAL CCL::LOAD-FILE CCL::STARTUP-CCL)> "doit.lsp") 501
 (7F0D50A19D50) : 83 (STARTUP-CCL ("home:ccl-init" "home:\\.ccl-init")) 1773
 (7F0D50A19DB0) : 84 (FUNCALL #'#<(:INTERNAL (CCL:TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 69
 (7F0D50A19DD0) : 85 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 661
 (7F0D50A19E68) : 86 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active] #x302000482EBD> (#<CCL:COMPILED-LEXICAL-CLOSURE # #x3020004829EF>)) 717
 (7F0D50A19EF0) : 87 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS)))> #<TTY-LISTENER listener(1) [Active] #x302000482EBD> (#<CCL:COMPILED-LEXICAL-CLOSURE # #x3020004829EF>)) 581
 (7F0D50A19F98) : 88 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 277
1 > 
@xrme
Copy link
Member

xrme commented May 22, 2024

For ease of reference, copied from https://gitlab.common-lisp.net/ansi-test/ansi-test/-/blob/master/objects/define-method-combination-long-form.lsp?ref_type=heads#L316

(defparameter *dmc-long-11*
  (define-method-combination mc-long-11 () ((method-list *))
    (:arguments x1 &optional (y1 :y1 y1-supplied) &rest r1 &key (z1 :z1 z1-supplied))
    `(vector ,x1 ,y1 ,y1-supplied ,r1 ,z1 ,z1-supplied
             ,@(mapcar #'(lambda (m) `(call-method ,m)) method-list))))

(defgeneric dmc-long-gf-11a () (:method-combination mc-long-11))
(defgeneric dmc-long-gf-11b (x1 &optional y1 &key z1) (:method-combination mc-long-11))
(defgeneric dmc-long-gf-11c (x1 &optional y1 &rest r1) (:method-combination mc-long-11))

@xrme xrme changed the title CCL and ansi-test long form define-method-combination problem May 22, 2024
@xrme
Copy link
Member

xrme commented May 28, 2024

We're checking that the lambda list in (:arguments . lambda-list) contains all symbols for some reason.

(case (caar forms)
(:arguments
(when args-specified? (error ":ARGUMENTS specified twice"))
(setq arguments (cdr (pop forms))
args-specified? t)
(do ((args arguments (cdr args)))
((null args))
(setf (car args) (require-type (car args) 'symbol))))

If I remove that check, then it looks like many of the tests mentioned above work (but at least one fails).

@yitzchak
Copy link
Contributor Author

Yes, that appears to make the tests load for me also. They crash later in the UPGRADED-ARRAY-ELEMENT-TYPE tests, but that is probably unrelated.

@yitzchak
Copy link
Contributor Author

The test that is causing a crash for me is UPGRADED-ARRAY-ELEMENT-TYPE.NIL.1. On failure it prints a list of objects that fail a type predicate. One of the objects in *universe* is causing the printer to crash. I temporarily disabled the print in that test and got the following failures. So yes, your fix makes the tests load.

65 failures with 65 unexpected failures and 0 unexpected successes out of 21923 tests.
Failures: 
  MACROLET.36
  LOOP.1.39
  LOOP.1.40
  LOOP.1.41
  LOOP.1.42
  LOOP.1.43
  CLASS-04.ERROR.5
  MAKE-LOAD-FORM.ORDER.8
  MAKE-LOAD-FORM.ORDER.13
  MAKE-LOAD-FORM.ORDER.14
  DEFINE-METHOD-COMBINATION-LONG.11.3
  DEFINE-METHOD-COMBINATION-LONG.11.4
  MAKE-CONDITION.3
  MAKE-CONDITION.4
  UPGRADED-ARRAY-ELEMENT-TYPE.8
  UPGRADED-ARRAY-ELEMENT-TYPE.NIL.1
  EXP.ERROR.8
  EXP.ERROR.9
  EXP.ERROR.10
  EXP.ERROR.11
  EXPT.ERROR.8
  EXPT.ERROR.9
  EXPT.ERROR.10
  EXPT.ERROR.11
  MAP.ERROR.11
  SUBTYPEP.CONS.43
  SUBTYPEP.CONS.44
  SUBTYPEP-COMPLEX.8
  STRING.FOLD.1
  CHAR-UPCASE.2
  CHAR-DOWNCASE.2
  PARSE-NAMESTRING.5
  ENSURE-DIRECTORIES-EXIST.8
  STREAM-ELEMENT-TYPE.2
  STREAM-ELEMENT-TYPE.3
  READ-BYTE.4
  FILE-LENGTH.4
  FILE-LENGTH.5
  FILE-POSITION.8
  OPEN.OUTPUT.19
  OPEN.IO.19
  PRINT-UNREADABLE-OBJECT.2
  FORMAT.F.5
  FORMAT.F.8
  FORMAT.F.45
  FORMATTER.F.45
  FORMAT.F.46
  FORMATTER.F.46
  FORMAT.F.47
  FORMATTER.F.47
  FORMAT.E.1
  FORMAT.E.2
  FORMAT.E.3
  FORMAT.E.4
  FORMAT.E.5
  FORMAT.E.7
  FORMAT.E.8
  FORMAT.E.9
  FORMAT.E.26
  FORMAT.JUSTIFY.33
  FORMAT.JUSTIFY.34
  FORMAT.JUSTIFY.36
  SET-SYNTAX-FROM-CHAR.SHARP.1
  SYNTAX.SHARP-COLON.ERROR.1
  COMPILE-FILE.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants