mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-08 07:20:28 -08:00
As the constraint logic of the compiler is not trivial and largely independent from the rest of the code move it into comp-cstr.el to ease separation and maintainability. This commit improve the conversion type specifier -> constraint for generality. Lastly this should help with bootstrap time as comp.el compilation unit is slimmed down. * lisp/emacs-lisp/comp-cstr.el: New file. (comp--typeof-types, comp--all-builtin-types): Move from comp.el. (comp-cstr, comp-cstr-f): Same + rename. (comp-cstr-ctxt): New struct. (comp-supertypes, comp-common-supertype-2) (comp-common-supertype, comp-subtype-p, comp-union-typesets) (comp-range-1+, comp-range-1-, comp-range-<, comp-range-union) (comp-range-intersection): Move from comp.el. (comp-cstr-union-no-range, comp-cstr-union): Move from comp.el and rename. (comp-cstr-union-make): New function. (comp-type-spec-to-cstr, comp-cstr-to-type-spec): Move from comp.el, rename it and rework it. * lisp/emacs-lisp/comp.el (comp-known-func-cstr-h): Rework. (comp-ctxt): Remove two fields and include `comp-cstr-ctxt'. (comp-mvar, comp-fwprop-call): Update for `comp-cstr' being renamed. (comp-fwprop-insn): Use `comp-cstr-union-no-range' or `comp-cstr-union'. (comp-ret-type-spec): Use `comp-cstr-union' and rework. * test/lisp/emacs-lisp/comp-cstr-tests.el: New file. (comp-cstr-test-ts, comp-cstr-typespec-test): New functions. (comp-cstr-typespec-tests-alist): New defconst to generate tests on. (comp-cstr-generate-tests): New macro. * test/src/comp-tests.el (comp-tests-type-spec-tests): Update. (ret-type-spec): Initialize constraint context. |
||
|---|---|---|
| .. | ||
| edebug-resources | ||
| eieio-tests | ||
| faceup-resources | ||
| faceup-tests | ||
| package-resources | ||
| shadow-resources | ||
| testcover-resources | ||
| backquote-tests.el | ||
| backtrace-tests.el | ||
| benchmark-tests.el | ||
| bindat-tests.el | ||
| bytecomp-tests.el | ||
| cconv-tests.el | ||
| check-declare-tests.el | ||
| checkdoc-tests.el | ||
| cl-extra-tests.el | ||
| cl-generic-tests.el | ||
| cl-lib-tests.el | ||
| cl-macs-tests.el | ||
| cl-preloaded-tests.el | ||
| cl-print-tests.el | ||
| cl-seq-tests.el | ||
| comp-cstr-tests.el | ||
| copyright-tests.el | ||
| derived-tests.el | ||
| easy-mmode-tests.el | ||
| edebug-tests.el | ||
| ert-tests.el | ||
| ert-x-tests.el | ||
| find-func-tests.el | ||
| float-sup-tests.el | ||
| generator-tests.el | ||
| gv-tests.el | ||
| hierarchy-tests.el | ||
| let-alist-tests.el | ||
| lisp-mode-tests.el | ||
| lisp-tests.el | ||
| map-tests.el | ||
| nadvice-tests.el | ||
| package-tests.el | ||
| pcase-tests.el | ||
| pp-tests.el | ||
| regexp-opt-tests.el | ||
| ring-tests.el | ||
| rmc-tests.el | ||
| rx-tests.el | ||
| seq-tests.el | ||
| shadow-tests.el | ||
| subr-x-tests.el | ||
| syntax-tests.el | ||
| tabulated-list-test.el | ||
| testcover-tests.el | ||
| text-property-search-tests.el | ||
| thunk-tests.el | ||
| timer-tests.el | ||
| unsafep-tests.el | ||
| warnings-tests.el | ||