1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

remove comp-stack-adjust

This commit is contained in:
Andrea Corallo 2019-10-19 18:15:00 +02:00
parent f0e83548ee
commit 661567b7cd

View file

@ -642,10 +642,6 @@ Return value is the fall through block name."
handler-bb handler-bb
guarded-bb))))) guarded-bb)))))
(defun comp-stack-adjust (n)
"Move sp by N."
(cl-incf (comp-sp) n))
(defun comp-limplify-listn (n) (defun comp-limplify-listn (n)
"Limplify list N." "Limplify list N."
(comp-with-sp (+ (comp-sp) n -1) (comp-with-sp (+ (comp-sp) n -1)
@ -760,7 +756,7 @@ the annotation emission."
,(concat "LAP op " op-name))) ,(concat "LAP op " op-name)))
;; Emit the stack adjustment if present. ;; Emit the stack adjustment if present.
,(when (and sp-delta (not (eq 0 sp-delta))) ,(when (and sp-delta (not (eq 0 sp-delta)))
`(comp-stack-adjust ,sp-delta)) `(cl-incf (comp-sp) ,sp-delta))
,@(comp-body-eff body op-name sp-delta)) ,@(comp-body-eff body op-name sp-delta))
else else
collect `(',op (error ,(concat "Unsupported LAP op " collect `(',op (error ,(concat "Unsupported LAP op "
@ -791,7 +787,7 @@ the annotation emission."
(make-comp-mvar :constant arg) (make-comp-mvar :constant arg)
(comp-slot+1)))) (comp-slot+1))))
(byte-call (byte-call
(comp-stack-adjust (- arg)) (cl-incf (comp-sp) (- arg))
(comp-emit-set-call (comp-callref 'funcall (1+ arg) (comp-sp)))) (comp-emit-set-call (comp-callref 'funcall (1+ arg) (comp-sp))))
(byte-unbind (byte-unbind
(comp-emit (comp-call 'helper_unbind_n (comp-emit (comp-call 'helper_unbind_n
@ -945,20 +941,20 @@ the annotation emission."
(byte-numberp auto) (byte-numberp auto)
(byte-integerp auto) (byte-integerp auto)
(byte-listN (byte-listN
(comp-stack-adjust (- 1 arg)) (cl-incf (comp-sp) (- 1 arg))
(comp-emit-set-call (comp-callref 'list arg (comp-sp)))) (comp-emit-set-call (comp-callref 'list arg (comp-sp))))
(byte-concatN (byte-concatN
(comp-stack-adjust (- 1 arg)) (cl-incf (comp-sp) (- 1 arg))
(comp-emit-set-call (comp-callref 'concat arg (comp-sp)))) (comp-emit-set-call (comp-callref 'concat arg (comp-sp))))
(byte-insertN (byte-insertN
(comp-stack-adjust (- 1 arg)) (cl-incf (comp-sp) (- 1 arg))
(comp-emit-set-call (comp-callref 'insert arg (comp-sp)))) (comp-emit-set-call (comp-callref 'insert arg (comp-sp))))
(byte-stack-set (byte-stack-set
(comp-with-sp (1+ (comp-sp)) ;; FIXME!! (comp-with-sp (1+ (comp-sp)) ;; FIXME!!
(comp-copy-slot (comp-sp) (- (comp-sp) arg)))) (comp-copy-slot (comp-sp) (- (comp-sp) arg))))
(byte-stack-set2 (cl-assert nil)) ;; TODO (byte-stack-set2 (cl-assert nil)) ;; TODO
(byte-discardN (byte-discardN
(comp-stack-adjust (- arg))) (cl-incf (comp-sp) (- arg)))
(byte-switch (byte-switch
;; Assume to follow the emission of a setimm. ;; Assume to follow the emission of a setimm.
;; This is checked into comp-emit-switch. ;; This is checked into comp-emit-switch.
@ -968,7 +964,7 @@ the annotation emission."
(byte-constant (byte-constant
(comp-emit-set-const arg)) (comp-emit-set-const arg))
(byte-discardN-preserve-tos (byte-discardN-preserve-tos
(comp-stack-adjust (- arg)) (cl-incf (comp-sp) (- arg))
(comp-copy-slot (+ arg (comp-sp))))))) (comp-copy-slot (+ arg (comp-sp)))))))
(defun comp-emit-narg-prologue (minarg nonrest) (defun comp-emit-narg-prologue (minarg nonrest)