mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-31 14:50:50 -08:00
When upgrading the type of a node, cannot clone it or the parent-child chain will be broken
This commit is contained in:
parent
e5db4b4715
commit
97be1c6af5
2 changed files with 11 additions and 9 deletions
|
|
@ -190,9 +190,7 @@
|
|||
(funcall (if (eq mode :safe) #'cmperr #'cmpwarn)
|
||||
"~?, the type of the form ~s is ~s, not ~s." format-string
|
||||
format-args original-form type2 type))
|
||||
(unless (eq type1 type2)
|
||||
(setf form (copy-c1form form))
|
||||
(setf (c1form-type form) type1))
|
||||
(setf (c1form-type form) type1)
|
||||
form))
|
||||
|
||||
(defun default-init (var &optional warn)
|
||||
|
|
@ -390,12 +388,16 @@
|
|||
((endp fl))
|
||||
(unless (endp arg-types)
|
||||
;; Check the type of the arguments.
|
||||
(let ((new (and-form-type (pop arg-types) (first fl) (first al)
|
||||
:safe "In the argument ~d of a call to ~a" i fname)))
|
||||
;; In unsafe mode, we assume that the type of the
|
||||
(let* ((form (first fl))
|
||||
(lisp-form (first al))
|
||||
(expected-type (pop arg-types))
|
||||
(old-type (c1form-type form)))
|
||||
(and-form-type expected-type form lisp-form
|
||||
:safe "In the argument ~d of a call to ~a" i fname)
|
||||
;; In safe mode, we cannot assume that the type of the
|
||||
;; argument is going to be the right one.
|
||||
(when (zerop *safety*)
|
||||
(setf (car fl) new))))))
|
||||
(unless (zerop *safety*)
|
||||
(setf (c1form-type new) old-type))))))
|
||||
return-type))
|
||||
|
||||
(defmacro def-type-propagator (fname lambda-list &body body)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Returns, as a string, the location of the machine on which ECL runs."
|
|||
(defun lisp-implementation-version ()
|
||||
"Args:()
|
||||
Returns the version of your ECL as a string."
|
||||
"@PACKAGE_VERSION@ (CVS 2007-12-18 21:41)")
|
||||
"@PACKAGE_VERSION@ (CVS 2007-12-18 22:53)")
|
||||
|
||||
(defun machine-type ()
|
||||
"Args: ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue