summaryrefslogtreecommitdiff
path: root/lisp/Makefile.in
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-11-23 23:51:17 +0100
committerAndrea Corallo <akrl@sdf.org>2020-11-26 22:02:30 +0100
commit23c082638e77219b51e14797a0edae27ae59a9d6 (patch)
tree51fa5935a1ba7b6991ee0e402eeaa0132e94d03b /lisp/Makefile.in
parent7a8370ed0f1b1d62657e385789ee2f81c5607ec5 (diff)
downloademacs-23c082638e77219b51e14797a0edae27ae59a9d6.tar.gz
Add comp-cstr.el and comp-cstr-tests.el
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.
Diffstat (limited to 'lisp/Makefile.in')
-rw-r--r--lisp/Makefile.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index d6bb4cf5570..5fec921b072 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -114,6 +114,7 @@ COMPILE_FIRST = \
$(lisp)/emacs-lisp/bytecomp.elc
ifeq ($(HAVE_NATIVE_COMP),yes)
COMPILE_FIRST += $(lisp)/emacs-lisp/comp.elc
+COMPILE_FIRST += $(lisp)/emacs-lisp/comp-cstr.elc
endif
COMPILE_FIRST += $(lisp)/emacs-lisp/autoload.elc