mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
Clean-up now unnecessary 'comp-primitive-type-specifiers'
This commit is contained in:
parent
acb5199752
commit
e8ef297bbe
@ -68,17 +68,6 @@ Used to modify the compiler environment."
|
||||
:risky t
|
||||
:version "28.1")
|
||||
|
||||
(defconst comp-primitive-type-specifiers
|
||||
(let (res)
|
||||
(mapatoms (lambda (atom)
|
||||
(when-let ((f (symbol-function atom))
|
||||
(primitive (subr-primitive-p f))
|
||||
(type (subr-type f)))
|
||||
(push `(,atom ,type) res))))
|
||||
res)
|
||||
"Alist used for type propagation.")
|
||||
|
||||
|
||||
(defconst comp-limple-calls '(call
|
||||
callref
|
||||
direct-call
|
||||
|
@ -179,14 +179,15 @@ Each function in FUNCTIONS is run after PASS.
|
||||
Useful to hook into pass checkers.")
|
||||
|
||||
(defconst comp-primitive-func-cstr-h
|
||||
(cl-loop
|
||||
with comp-ctxt = (make-comp-cstr-ctxt)
|
||||
with h = (make-hash-table :test #'eq)
|
||||
for (f type-spec) in comp-primitive-type-specifiers
|
||||
for cstr = (comp-type-spec-to-cstr type-spec)
|
||||
do (puthash f cstr h)
|
||||
finally return h)
|
||||
"Hash table function -> `comp-constraint'.")
|
||||
(let ((comp-ctxt (make-comp-cstr-ctxt))
|
||||
(h (make-hash-table :test #'eq)))
|
||||
(mapatoms (lambda (atom)
|
||||
(when-let ((f (symbol-function atom))
|
||||
(primitive (subr-primitive-p f))
|
||||
(type (subr-type f)))
|
||||
(puthash f (comp-type-spec-to-cstr type) h))))
|
||||
h)
|
||||
"Hash table primtive -> `comp-constraint'.")
|
||||
|
||||
(defun comp--get-function-cstr (function)
|
||||
"Given FUNCTION return the corresponding `comp-constraint'."
|
||||
|
Loading…
Reference in New Issue
Block a user