comp: Recompute type slots after byte compilation for user types

* lisp/emacs-lisp/comp-cstr.el (comp--compute-typeof-types)
(comp--compute--pred-type-h): New functions.
(comp-cstr-ctxt): Make use of.
(comp-cstr-ctxt-update-type-slots): New function.

* lisp/emacs-lisp/comp.el (comp-spill-lap): Use
`comp-cstr-ctxt-update-type-slots'.
This commit is contained in:
Andrea Corallo 2023-05-28 14:49:19 +02:00
parent edcdb4c2ec
commit 56a8d57d03
2 changed files with 30 additions and 13 deletions

View file

@ -1431,11 +1431,13 @@ clashes."
"Byte-compile and spill the LAP representation for INPUT.
If INPUT is a symbol, it is the function-name to be compiled.
If INPUT is a string, it is the filename to be compiled."
(let ((byte-native-compiling t)
(byte-to-native-lambdas-h (make-hash-table :test #'eq))
(byte-to-native-top-level-forms ())
(byte-to-native-plist-environment ()))
(comp-spill-lap-function input)))
(let* ((byte-native-compiling t)
(byte-to-native-lambdas-h (make-hash-table :test #'eq))
(byte-to-native-top-level-forms ())
(byte-to-native-plist-environment ())
(res (comp-spill-lap-function input)))
(comp-cstr-ctxt-update-type-slots comp-ctxt)
res))
;;; Limplification pass specific code.