Function: byte-compile-stack-adjustment

byte-compile-stack-adjustment is a byte-compiled function defined in bytecomp.el.gz.

Signature

(byte-compile-stack-adjustment OP OPERAND)

Documentation

Return the amount by which an operation adjusts the stack.

OP and OPERAND are as passed to byte-compile-out.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
(defun byte-compile-stack-adjustment (op operand)
  "Return the amount by which an operation adjusts the stack.
OP and OPERAND are as passed to `byte-compile-out'."
  (if (memq op '(byte-call byte-discardN byte-discardN-preserve-tos))
      ;; For calls, OPERAND is the number of args, so we pop OPERAND + 1
      ;; elements, and then push the result, for a total of -OPERAND.
      ;; For discardN*, of course, we just pop OPERAND elements.
      (- operand)
    (or (aref byte-stack+-info (symbol-value op))
	;; Ops with a nil entry in `byte-stack+-info' are byte-codes
	;; that take OPERAND values off the stack and push a result, for
	;; a total of 1 - OPERAND
	(- 1 operand))))