diff --git a/src/c/symbols_list.h b/src/c/symbols_list.h index a2cf087b4..54d6c8eb7 100755 --- a/src/c/symbols_list.h +++ b/src/c/symbols_list.h @@ -2014,6 +2014,8 @@ cl_symbols[] = { {EXT_ "COMPILER-TYPECASE", EXT_ORDINARY, NULL, -1, OBJNULL}, {SYS_ "ASSERT-FAILURE", SI_ORDINARY, NULL, -1, OBJNULL}, +{SYS_ "ECASE-ERROR", SI_ORDINARY, NULL, -1, OBJNULL}, +{SYS_ "ETYPECASE-ERROR", SI_ORDINARY, NULL, -1, OBJNULL}, {SYS_ "SERIALIZE", SI_ORDINARY, si_serialize, 1, OBJNULL}, {SYS_ "DESERIALIZE", SI_ORDINARY, si_deserialize, 1, OBJNULL}, @@ -2075,7 +2077,7 @@ cl_symbols[] = { {SYS_ "PROPER-LIST-P", SI_ORDINARY, si_proper_list_p, 1, OBJNULL}, {SYS_ "TRACED-OLD-DEFINITION", SI_ORDINARY, ECL_NAME(si_traced_old_definition), 1, OBJNULL}, -{SYS_ "*TRACE-LIST*", SI_ORDINARY, NULL, -1, Cnil}, +{SYS_ "*TRACE-LIST*", SI_SPECIAL, NULL, -1, Cnil}, {SYS_ "FUNCTION-BOUNDARY", SI_ORDINARY, NULL, -1, OBJNULL}, diff --git a/src/c/symbols_list2.h b/src/c/symbols_list2.h index 1191983b3..605f12129 100644 --- a/src/c/symbols_list2.h +++ b/src/c/symbols_list2.h @@ -2014,6 +2014,8 @@ cl_symbols[] = { {EXT_ "COMPILER-TYPECASE",NULL}, {SYS_ "ASSERT-FAILURE",NULL}, +{SYS_ "ECASE-ERROR",NULL}, +{SYS_ "ETYPECASE-ERROR",NULL}, {SYS_ "SERIALIZE","si_serialize"}, {SYS_ "DESERIALIZE","si_deserialize"}, diff --git a/src/cmp/proclamations.lsp b/src/cmp/proclamations.lsp index ce51c7342..71f9c4503 100644 --- a/src/cmp/proclamations.lsp +++ b/src/cmp/proclamations.lsp @@ -256,6 +256,10 @@ (proclamation si:bds-val (si::index) t) (proclamation si:sch-frs-base (si::index si::index) (or null si::index)) +(proclamation si::ecase-error (t t) t) +(proclamation si::etypecase-error (t t) t) +(proclamation si::do-check-type (t t t t) t) + ;;; ;;; 7. OBJECTS ;;; @@ -1327,7 +1331,7 @@ (proclamation associate-methods-to-gfun (generic-function *) generic-function) #+clos -(proclamation clos::need-to-make-load-form-p (t) gen-bool :pure) +(proclamation clos::need-to-make-load-form-p (t t) gen-bool :pure) #+clos (proclamation clos::load-defclass (t t t t) t) diff --git a/src/cmp/sysfun.lsp b/src/cmp/sysfun.lsp index df6099b4f..997790ff4 100644 --- a/src/cmp/sysfun.lsp +++ b/src/cmp/sysfun.lsp @@ -972,6 +972,7 @@ si::coerce-to-list si::coerce-to-vector si::fill-array-with-seq si::assert-failure + si::ecase-error si::etypecase-error si::traced-old-definition #+formatter diff --git a/src/lsp/assert.lsp b/src/lsp/assert.lsp index c40334087..be409ea96 100644 --- a/src/lsp/assert.lsp +++ b/src/lsp/assert.lsp @@ -87,7 +87,7 @@ for the error message and ARGs are arguments to the format string." `(while (not ,test-form) ,repl))) -(defun accumulate-cases (macro-name cases list-is-atom-p) +(defun accumulate-cases (cases list-is-atom-p) (declare (si::c-local)) (do ((c cases (cdr c)) (l '())) @@ -97,7 +97,7 @@ for the error message and ARGs are arguments to the format string." (list-is-atom-p (push keys l)) (t (setq l (append keys l))))))) -(defun ecase-error (keyform value values) +(defun ecase-error (value values) (error 'CASE-FAILURE :name 'ECASE :datum value :expected-type (cons 'MEMBER values) @@ -113,7 +113,7 @@ signals an error." (let ((key (gensym))) `(let ((,key ,keyform)) (case ,key ,@clauses - (t (si::ecase-error ',keyform ,key ',(accumulate-cases 'ECASE clauses nil))))))) + (t (si::ecase-error ,key ',(accumulate-cases clauses nil))))))) (defun ccase-error (keyform key values) (restart-case (error 'CASE-FAILURE @@ -155,7 +155,7 @@ becomes EQL to one of the KEYs." (case ,key ,@clauses (t (setf ,keyplace (si::ccase-error ',keyplace ,key - ',(accumulate-cases 'CCASE clauses nil))) + ',(accumulate-cases clauses nil))) (go ,repeat))))))))) (defmacro typecase (keyform &rest clauses) @@ -175,7 +175,7 @@ be used as a TYPE to specify the default case." ,form)))) ) -(defun etypecase-error (keyform value types) +(defun etypecase-error (value types) (error 'CASE-FAILURE :name 'ETYPECASE :datum value :expected-type (cons 'OR types) @@ -188,8 +188,7 @@ If found, then evaluates FORMs that follow the TYPE and returns all values of the last FORM. If not, signals an error." (setq clauses (remove-otherwise-from-clauses clauses)) (do ((l (reverse clauses) (cdr l)) ; Beppe - (form `(etypecase-error ',keyform ,key - ',(accumulate-cases 'ETYPECASE clauses t)))) + (form `(etypecase-error ,key ',(accumulate-cases clauses t)))) ((endp l) `(let ((,key ,keyform)) ,form)) (setq form `(if (typep ,key ',(caar l)) (progn ,@(cdar l)) @@ -224,4 +223,4 @@ Repeats this process until the value of PLACE becomes of one of the TYPEs." (return (progn ,@(cdr l))))) clauses) (setf ,keyplace (ctypecase-error ',keyplace ,key - ',(accumulate-cases 'CTYPECASE clauses t)))))) + ',(accumulate-cases clauses t))))))