all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* side-effect-free-fns
@ 2006-12-16 19:40 Eli Zaretskii
  2006-12-17  5:37 ` side-effect-free-fns Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2006-12-16 19:40 UTC (permalink / raw)


The ELisp manual says in the node "Writing Emacs Primitives":

       If you define a function which is side-effect free, update the code
    in `byte-opt.el' which binds `side-effect-free-fns' and
    `side-effect-and-error-free-fns' so that the compiler optimizer knows
    about it.

I notice that none of the w32-* primitives are on that list, although
quite a few of them are side-effect free and error free.  Is there any
reason not to add those functions to byte-opt.el now?  Are there any
known dangers?

Is there anything else to determining whether a function can be added
to that list besides examining the code for absence of calls to
Fsignal and making sure it doesn't produce any effects except the
values it returns?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: side-effect-free-fns
  2006-12-16 19:40 side-effect-free-fns Eli Zaretskii
@ 2006-12-17  5:37 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2006-12-17  5:37 UTC (permalink / raw)
  Cc: emacs-devel

    I notice that none of the w32-* primitives are on that list, although
    quite a few of them are side-effect free and error free.  Is there any
    reason not to add those functions to byte-opt.el now?  Are there any
    known dangers?

I don't know of any danger, but they are probably not used enough
to be worth the trouble to add.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-12-17  5:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-16 19:40 side-effect-free-fns Eli Zaretskii
2006-12-17  5:37 ` side-effect-free-fns Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.