mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
better comp-limplify-block
do not non fall through blocks
This commit is contained in:
parent
45158ed98b
commit
67ac8603ea
1 changed files with 6 additions and 9 deletions
|
|
@ -1079,21 +1079,18 @@ The block name is returned."
|
||||||
(comp-func-lap comp-func))
|
(comp-func-lap comp-func))
|
||||||
for inst = (car inst-cell)
|
for inst = (car inst-cell)
|
||||||
for next-inst = (car-safe (cdr inst-cell))
|
for next-inst = (car-safe (cdr inst-cell))
|
||||||
for fall-through = (comp-lap-fall-through-p inst)
|
|
||||||
do (comp-limplify-lap-inst inst)
|
do (comp-limplify-lap-inst inst)
|
||||||
(cl-incf (comp-limplify-pc comp-pass))
|
(cl-incf (comp-limplify-pc comp-pass))
|
||||||
(pcase next-inst
|
when (comp-lap-fall-through-p inst)
|
||||||
|
do (pcase next-inst
|
||||||
(`(TAG ,_label . ,label-sp)
|
(`(TAG ,_label . ,label-sp)
|
||||||
(when (and label-sp fall-through)
|
(when label-sp
|
||||||
(cl-assert (= (1- label-sp) (comp-sp))))
|
(cl-assert (= (1- label-sp) (comp-sp))))
|
||||||
(let* ((stack-depth (if label-sp
|
(let* ((stack-depth (if label-sp
|
||||||
(1- label-sp)
|
(1- label-sp)
|
||||||
(if fall-through
|
(comp-sp)))
|
||||||
(comp-sp)
|
(next-bb (comp-add-pending-block stack-depth)))
|
||||||
(error "Unknown stack depth."))))
|
(unless (comp-block-closed bb)
|
||||||
(next-bb (comp-add-pending-block stack-depth)))
|
|
||||||
(when (and fall-through
|
|
||||||
(not (comp-block-closed bb)))
|
|
||||||
(comp-emit `(jump ,next-bb))))
|
(comp-emit `(jump ,next-bb))))
|
||||||
(cl-return)))
|
(cl-return)))
|
||||||
until (comp-lap-eob-p inst)))
|
until (comp-lap-eob-p inst)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue