Function: byte-compile-stack-ref

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

Signature

(byte-compile-stack-ref STACK-POS)

Documentation

Output byte codes to push the value at stack position STACK-POS.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
(defun byte-compile-stack-ref (stack-pos)
  "Output byte codes to push the value at stack position STACK-POS."
  (let ((dist (- byte-compile-depth (1+ stack-pos))))
    (if (zerop dist)
        ;; A simple optimization
        (byte-compile-out 'byte-dup)
      ;; normal case
      (byte-compile-out 'byte-stack-ref dist))))