emacs/test/lisp/emacs-lisp
Andrea Corallo 23c082638e 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.
2020-11-26 22:02:30 +01:00
..
edebug-resources
eieio-tests Un-deprecate oset and oset-default 2020-06-06 17:24:00 +01:00
faceup-resources ; Fix more trivial typos 2020-09-21 15:51:07 +02:00
faceup-tests
package-resources Tweak test data for signed package installation 2020-10-20 18:26:38 +02:00
shadow-resources
testcover-resources
backquote-tests.el
backtrace-tests.el ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00
benchmark-tests.el
bindat-tests.el Remove incorrect use of decode-coding-string 2020-10-22 20:34:15 +02:00
bytecomp-tests.el Test for byte-compiler warning "variable lacks prefix" 2020-11-22 07:19:11 +01:00
cconv-tests.el Mark two cconv tests as :unstable 2020-08-06 09:09:57 +02:00
check-declare-tests.el
checkdoc-tests.el
cl-extra-tests.el
cl-generic-tests.el Adjust some tests so that they work in symlinked environs 2020-10-16 10:33:19 +02:00
cl-lib-tests.el Add tests for cl-{incf,decf} 2020-08-13 22:04:59 +02:00
cl-macs-tests.el Allow destructuring in &aux sections when using edebug (Bug#40431) 2020-06-10 15:34:41 +02:00
cl-preloaded-tests.el
cl-print-tests.el
cl-seq-tests.el Mark some tests as expensive 2020-09-10 20:25:19 +02:00
comp-cstr-tests.el Add comp-cstr.el and comp-cstr-tests.el 2020-11-26 22:02:30 +01:00
copyright-tests.el Use lexical-binding in copyright.el and add tests 2020-10-24 13:35:49 +02:00
derived-tests.el
easy-mmode-tests.el ; Silence byte-compiler warnings in tests 2020-11-05 18:25:40 +01:00
edebug-tests.el Fix file-name problems in several tests 2020-10-16 16:49:47 +03:00
ert-tests.el
ert-x-tests.el Remove some unnecessary compat code 2020-09-22 01:00:06 +02:00
find-func-tests.el ; Fix license statement in several files 2020-10-28 03:41:55 +01:00
float-sup-tests.el
generator-tests.el Merge from origin/emacs-27 2020-08-03 08:32:39 -07:00
gv-tests.el Adapt some tests for Emacs's excitingly variable quoting format 2020-09-12 11:57:42 -07:00
hierarchy-tests.el Use lexical-binding in more tests 2020-08-29 22:41:51 +02:00
let-alist-tests.el
lisp-mode-tests.el Convert manual indent test for lisp-mode into unit test 2020-09-21 16:46:21 +02:00
lisp-tests.el Update a failing lisp test 2020-09-24 12:46:19 -07:00
map-tests.el
nadvice-tests.el
package-tests.el Clean up temporary files after package tests 2020-10-23 12:58:01 +02:00
pcase-tests.el
pp-tests.el
regexp-opt-tests.el
ring-tests.el
rmc-tests.el ; Fix license statements. 2020-08-27 02:53:25 +02:00
rx-tests.el Better warning suppression in rx-tests 2020-11-09 18:05:08 +01:00
seq-tests.el
shadow-tests.el Use new resource directory macros in tests (Bug#43792) 2020-10-16 11:28:09 +02:00
subr-x-tests.el ; Fix license statements. 2020-08-27 02:53:25 +02:00
syntax-tests.el
tabulated-list-test.el
testcover-tests.el Fix file-name problems in several tests 2020-10-16 16:49:47 +03:00
text-property-search-tests.el ; Fix typo in my last commit 2020-10-30 14:16:25 +01:00
thunk-tests.el
timer-tests.el
unsafep-tests.el Trim and explain set of safe forms for 'unsafep' (bug#44018) 2020-10-31 13:42:07 +01:00
warnings-tests.el Use lexical-binding in warnings.el and add tests 2020-08-28 17:33:44 +02:00