Open yitzchak opened 5 months ago
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))
We're checking that the lambda list in (:arguments . lambda-list)
contains all symbols for some reason.
https://github.com/Clozure/ccl/blob/3cdcedae9f8097eb2b2dafc06746a69a8cb23642/lib/method-combination.lisp#L569-L576
If I remove that check, then it looks like many of the tests mentioned above work (but at least one fails).
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.
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
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 thatlong-form-define-method-combination
usesdestructuring-bind
to parse the lambda list which is not sufficient since the lambda list todefine-method-combination
is not a destructuring lambda list, but an ordinary lambda list.