1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-26 23:20:29 -08:00
Commit graph

118 commits

Author SHA1 Message Date
Andrea Corallo
4f0e879030 Rework `native-compile' interface so it can return compiled functions
* lisp/emacs-lisp/comp.el (native-compile): Return the compiled
	function when the input is a symbol or a form.
	* test/src/comp-tests.el (free-fun, tco, fw-prop): Update tests
	for new `native-compile' interface.
2020-10-14 11:04:36 +02:00
Andrea Corallo
f43dbe65ce Add a test for primitive redefinition
* test/src/comp-tests.el (primitive-redefine): New test.
	* test/src/comp-test-funcs.el (comp-test-primitive-redefine-f):
	New function.
2020-10-05 21:32:38 +02:00
Andrea Corallo
f345622152 Clean-up testsuite for vanilla builds
Tag all native compiler tests and skip them in vanilla builds

	* test/Makefile.in (SELECTOR_DEFAULT, SELECTOR_EXPENSIVE)
	(SELECTOR_ALL): Define selectors for vanilla or nativecomp builds.
	* test/src/comp-tests.el: Do not native compile test files on
	vanilla.
	(comp-deftest): New macro to define tests tagging as :nativecomp.
2020-10-02 10:24:32 +02:00
Andrea Corallo
ddf1b1931c * test/src/comp-tests.el (comp-tests-bootstrap): Tag it as expensive. 2020-10-01 18:04:00 +02:00
Andrea Corallo
0cc1804d42 Add a test for primitive advicing effectiveness
* test/src/comp-test-funcs.el (comp-test-primitive-advice-f): New
	function.
	* test/src/comp-tests.el (comp-test-primitive-advice): New test.
2020-09-24 09:57:17 +02:00
Andrea Corallo
5f37c18581 * test/src/comp-tests.el (comp-tests-bootstrap): Print compilation time. 2020-09-14 23:06:42 +02:00
Andrea Corallo
c6f42387e3 Fix describe function arglist for native compiled lisp/d (bug#42572)
* lisp/help.el (help-function-arglist): Handle the case of native
	compiled lisp/d.

	* src/data.c (syms_of_data): Register new subrs.
	(Fsubr_native_dyn_p, Fsubr_native_lambda_list): New primitives.

	* test/src/comp-tests.el (comp-tests-dynamic-help-arglist): New test.
2020-08-31 22:36:58 +02:00
Andrea Corallo
ea35a62e6e * test/src/comp-tests.el (comp-tests-doc): Update test. 2020-08-29 16:08:03 +02:00
Andrea Corallo
114b1d8f90 * test/src/comp-tests.el (comp-tests-bootstrap): Fix test for new eln setup. 2020-08-17 18:04:23 +02:00
Andrea Corallo
2c2cc21f1b Add a testcase for bug#42360
* test/src/comp-tests.el (comp-test-42360): New testcase.

	* test/src/comp-test-funcs.el (comp-test-42360-f): New function.
2020-07-15 23:13:36 +02:00
Andrea Corallo
02bf2e08e2 * Disable ipa-pure in comp-tests-tco
* test/src/comp-tests.el (comp-tests-tco): Disable ipa-pure to
	check effectively for tail recursion elimination.
2020-07-09 16:23:34 +01:00
Andrea Corallo
a53b446cb0 Add some tests for pure function optimization
* test/src/comp-tests.el (comp-tests-fw-prop): Fix docstring.
	(comp-tests-pure-checker-1, comp-tests-pure-checker-2): New
	functions.
	(comp-tests-pure): New test testing for pure function
	optimization.
2020-07-09 16:23:31 +01:00
Andrea Corallo
e6ab4e3dfe * Add a test targeting forward propagation
* test/src/comp-tests.el (comp-tests-fw-prop-checker-1): New
	function.
	(comp-tests-fw-prop): New test.
2020-07-09 16:22:37 +01:00
Andrea Corallo
b31b0ebefe * Rework some test logic for generality
* test/src/comp-tests.el (comp-tests-make-insn-checker): New
	function splitting logic from `comp-tests-tco-checker' to have it
	more general.
	(comp-tests-tco-checker): Make use of
	`comp-tests-make-insn-checker'.
2020-07-08 17:29:24 +01:00
Andrea Corallo
7e004d24a4 * Add a test to verify tail recursion elimination
* test/src/comp-tests.el (comp-tests-tco): Compile a recursive
	functions at speed 3 and verify the tail recursion elimination.
	(comp-tests-tco-checker, comp-tests-mentioned-p)
	(comp-tests-mentioned-p-1): New support functions.
2020-07-02 22:55:42 +02:00
Andrea Corallo
0f964db327 Add a test for lambda list containing uninterned symbols
* test/src/comp-test-funcs-dyn.el
	(comp-tests-cl-uninterned-arg-parse-f): New function.

	* test/src/comp-tests.el (comp-tests-cl-uninterned-arg-parse-f):
	New test.
2020-06-30 21:30:44 +02:00
Andrea Corallo
5b8b298283 Add a test to verify CL macro expansion in dynamic scope
* test/src/comp-tests.el (comp-tests-cl-macro-exp): New test.

	* test/src/comp-test-funcs-dyn.el: Require `cl-lib'.
	(comp-tests-cl-macro-exp-f): New function.
2020-06-28 15:53:08 +01:00
Andrea Corallo
1179a1c748 * Add a func-arity test for dynamic functions
* test/src/comp-tests.el (comp-tests-dynamic-arity): New test.
2020-06-22 00:13:18 +02:00
Andrea Corallo
34117dea77 Add a test for speed -1
* test/src/comp-tests.el (comp-test-speed--1): New test

	* test/src/comp-test-funcs.el (comp-test-speed--1-f): New
	function.
2020-06-22 00:11:40 +02:00
Andrea Corallo
47ab6c237e Add some testing for dynamic scope
* test/src/comp-test-funcs-dyn.el: New file.

	* test/src/comp-tests.el (comp-tests-dynamic-ffuncall): Add
	new tests.
2020-06-22 00:02:57 +02:00
Andrea Corallo
3fa73fa0fb Add a compiler hint test
Test that compiler hints are executed transparently.

* test/src/comp-tests.el (comp-tests-type-hints): New test.

* test/src/comp-test-funcs.el (comp-tests-hint-fixnum-f)
(comp-tests-hint-cons-f): New functions.
2020-05-25 22:24:53 +01:00
Andrea Corallo
e5b24b85a2 * Native compiler test update
* test/src/comp-tests.el (comp-tests-lambda-return): Add a test
	verifying that the returned lambda is actually native compiled.
2020-05-15 20:06:49 +01:00
Andrea Corallo
28df049b8d * test/src/comp-tests.el (comp-tests-bootstrap): Fix test. 2020-05-14 07:14:27 +01:00
Andrea Corallo
c69c185109 Add comp-test-40187 checking function shadowing. 2020-03-29 12:30:33 +01:00
Andrea Corallo
89cbff32e4 * test/src/comp-tests.el (comp-tests-doc): Fix 2020-03-29 12:30:33 +01:00
Andrea Corallo
3130690882 Fix `comp-tests-free-fun'
Address the case were comp-tests.el is byte-compiled.
2020-02-22 10:45:33 +00:00
Andrea Corallo
93f86a2378 Test 'comp-eq' should not assume any string hashing policy 2020-02-21 19:00:59 +00:00
Andrea Corallo
81c34a35aa Update copyright years plus two style nits 2020-02-16 18:34:22 +01:00
AndreaCorallo
0c6f4caeb3 Clean-up old gc disable refuse in comp-tests-non-locals 2020-02-14 23:26:20 +01:00
Andrea Corallo
a0c6ee6fc5 Do no force speed while running the testsuite 2020-01-20 21:59:40 +00:00
Andrea Corallo
e83bc2503b Always force debug 0 for bootstrap test
Debug symbols would make it fail otherwise.
2020-01-20 21:57:11 +00:00
Andrea Corallo
6c9acd13d0 single function native compilation doc + interactive support + tests 2020-01-01 11:38:12 +01:00
Andrea Corallo
b3db331e8c add native interactive support test 2020-01-01 11:38:12 +01:00
Andrea Corallo
3345399e87 add native documentation support test 2020-01-01 11:38:12 +01:00
Andrea Corallo
0c94e69fa6 add comp-tests-free-fun 2020-01-01 11:38:09 +01:00
Andrea Corallo
c039822082 better style into comp-tests-bootstrap 2020-01-01 11:38:09 +01:00
Andrea Corallo
d0e6a27664 better ert usage into tests 2020-01-01 11:38:08 +01:00
Andrea Corallo
0c60b3bae7 fix comp-tests-bootstrap 2020-01-01 11:38:07 +01:00
Andrea Corallo
16fe8a4678 allow for pure function call removal optimization 2020-01-01 11:38:07 +01:00
Andrea Corallo
41bfb91f5d add comp-tests-jump-table-2-f 2020-01-01 11:38:07 +01:00
Andrea Corallo
77c9236957 add comp-tests-signal 2020-01-01 11:38:07 +01:00
Andrea Corallo
f7c52087b2 do not force compiler settings within the testsuite 2020-01-01 11:38:06 +01:00
Andrea Corallo
11b34169f8 add comp-tests-trampoline-removal 2020-01-01 11:38:05 +01:00
Andrea Corallo
b91cbf80ae add comp-tests-bootstrap 2020-01-01 11:38:05 +01:00
Andrea Corallo
c9f3679506 compile tests with debug 1 2020-01-01 11:38:03 +01:00
Andrea Corallo
f97c03ebca add comp-tests-string-trim 2020-01-01 11:38:01 +01:00
Andrea Corallo
9ee6b685a3 add test for macro definition 2020-01-01 11:38:01 +01:00
Andrea Corallo
809bd5aa34 test provide 2020-01-01 11:38:01 +01:00
Andrea Corallo
a18e54f54b add a test for functions with more than 8 arguments 2020-01-01 11:38:00 +01:00
Andrea Corallo
59035c17d0 add test for recursive calls 2020-01-01 11:37:47 +01:00