[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pathological byte-compilation

From: Stefan Monnier
Subject: pathological byte-compilation
Date: Mon, 24 Jun 2002 21:26:34 -0400

CL used to define `values' as an alias to `list'.
It has been changed (end of last year) to

        (defsubst values (&rest values)
          (apply 'list values))

This has the "interesting" side-effect that compiling the function
(defun foo () (values 1)) results in the following byte-code:

        byte code for foo:
          args: nil
        0       constant  1
        1       list1     
        2       varbind   values
        3       constant  apply
        4       constant  list
        5       varref    values
        6       call      2
        7       unbind    1
        8       return    

in other words, the same result as if we had compiled
(defun foo () (let ((values (list 1))) (apply 'list values)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]