]> git.eshelyaron.com Git - emacs.git/commit
Introduce 'unreachable' LIMPLE operator
authorAndrea Corallo <akrl@sdf.org>
Thu, 31 Dec 2020 16:37:13 +0000 (17:37 +0100)
committerAndrea Corallo <akrl@sdf.org>
Fri, 1 Jan 2021 13:04:58 +0000 (14:04 +0100)
commit67c443adc1ef8a03d27c6172247e792421bb0e13
tree60e5bc9dba7be94302b5a085f08b5852c4743559
parente9f5fadb0ecb64148472f846a99a0d7e95daeaee
Introduce 'unreachable' LIMPLE operator

Introduce 'unreachable' as LIMPLE operater so we can handle correctly
in the CFG functions throwing values or signaling errors.

* src/comp.c (retrive_block): Better error diagnostic.
(emit_limple_insn): Add `unreachable'.
(compile_function): Fix block iteration.
(syms_of_comp): Define 'Qunreachable'.
* lisp/emacs-lisp/comp.el (comp-block): New variable.
(comp-block-lap): Add `non-ret-insn' slot.
(comp-branch-op-p): New predicate.
(comp-limple-lock-keywords): Color `unreachable' as red.
(comp-compute-edges): Add `unreachable'.
(comp-fwprop-call): Store non returning function call.
(comp-fwprop*): Update.
(comp-clean-orphan-blocks, comp-rewrite-non-locals): New functions.
(comp-fwprop): Call `comp-rewrite-non-locals'.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two
tests.
* test/src/comp-test-funcs.el (comp-test-non-local-1)
(comp-test-non-local-2, comp-test-non-local-3)
(comp-test-non-local-4): New functions.
lisp/emacs-lisp/comp.el
src/comp.c
test/src/comp-test-funcs.el
test/src/comp-tests.el