mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Fix local-call-context dumping.
Reported by Shubhamkar Ayare.
This commit is contained in:
parent
ceabb4b9bc
commit
135afdf393
|
|
@ -18,7 +18,7 @@
|
|||
;;
|
||||
;; READ-FROM-STRING prevents making references to
|
||||
;; all these keywords from the source form itself.
|
||||
(read-from-string "
|
||||
(read-from-string "
|
||||
(;; :SB-AFTER-XC-CORE is essentially an option flag to make-host-2
|
||||
:SB-AFTER-XC-CORE
|
||||
;; CONS-PROFILING sets the initial compiler policy which persists
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
(public-features
|
||||
(cons
|
||||
sb-impl::!sbcl-architecture
|
||||
(read-from-string "
|
||||
(read-from-string "
|
||||
(:COMMON-LISP :SBCL :ANSI-CL :IEEE-FLOATING-POINT
|
||||
:64-BIT ; choice of word size. 32-bit if absent
|
||||
:BIG-ENDIAN :LITTLE-ENDIAN ; endianness: pick one and only one
|
||||
|
|
|
|||
|
|
@ -2664,8 +2664,15 @@
|
|||
;; Combinations have nil-fun-returned-error
|
||||
(setf (cast-%type-check cast) nil))
|
||||
(t
|
||||
(let ((context (node-source-form cast))
|
||||
(detail (lvar-all-sources (cast-value cast))))
|
||||
(let* ((source-form (node-source-form cast))
|
||||
(detail (lvar-all-sources (cast-value cast)))
|
||||
(context (cast-context cast))
|
||||
(context (if (opaque-box-p context)
|
||||
(opaque-box-value context)
|
||||
context))
|
||||
(context (if (local-call-context-p context)
|
||||
(local-call-context-var context)
|
||||
context)))
|
||||
(unless (cast-silent-conflict cast)
|
||||
(filter-lvar
|
||||
value
|
||||
|
|
@ -2683,17 +2690,16 @@
|
|||
',(type-specifier atype)
|
||||
',(type-specifier value-type)
|
||||
',detail
|
||||
',(compile-time-type-error-context context)
|
||||
',(cast-context cast))))
|
||||
,(internal-type-error-call dummy-sym atype
|
||||
(cast-context cast))
|
||||
',(compile-time-type-error-context source-form)
|
||||
',context)))
|
||||
,(internal-type-error-call dummy-sym atype context)
|
||||
,dummy-sym))
|
||||
`(%compile-time-type-error 'dummy
|
||||
',(type-specifier atype)
|
||||
',(type-specifier value-type)
|
||||
',detail
|
||||
',(compile-time-type-error-context context)
|
||||
',(cast-context cast)))))
|
||||
',(compile-time-type-error-context source-form)
|
||||
',context))))
|
||||
;; KLUDGE: FILTER-LVAR does not work for non-returning
|
||||
;; functions, so we declare the return type of
|
||||
;; %COMPILE-TIME-TYPE-ERROR to be * and derive the real type
|
||||
|
|
|
|||
|
|
@ -3068,3 +3068,8 @@
|
|||
(with-test (:name :fopcompile-specials)
|
||||
(ctu:file-compile
|
||||
"(locally (declare (special foo)) (print foo))"))
|
||||
|
||||
(with-test (:name :local-call-context)
|
||||
(ctu:file-compile
|
||||
"(lambda (&optional b) (declare (type integer b)) b)"
|
||||
:load t))
|
||||
|
|
|
|||
Loading…
Reference in a new issue