emacs-devel
[Top][All Lists]
Advanced

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

Re: "simplifications"


From: Richard Stallman
Subject: Re: "simplifications"
Date: Mon, 19 Nov 2007 22:59:14 -0500

    >> it doesn't account for the case where
    >> you do
    >> (defsubst cadr (debug-on-error) (car (cdr debug-on-error)))
    >> in which case the optimization is not semantics preserving"

I think it is fine to treat the args of a defsubst function
in a special way, as long as we document that.  However,
it would be easy enough to turn off the optimization for variables
that are defvar'd.

    Well, my optimization is not specific to defsubst, so it will also
    remove the let-binding in:

       (let ((debug-on-error t))
         (car (car (cdr x))))

Which optimization is that one?  It too needs something to prevent it
from removing that binding, such as don't remove bindings for
variables that have been defvar'd.

The optimization I suggested would apply to the expansion of defsubst
calls.  So it would not apply to `let' expressions that originate
in other ways.




reply via email to

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