all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Optimize assume(...) away? (agaiin)
@ 2013-10-09 16:43 Dmitry Antipov
  2013-10-09 17:21 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Antipov @ 2013-10-09 16:43 UTC (permalink / raw)
  To: Emacs development discussions; +Cc: Eli Zaretskii, Paul Eggert, Stefan Monnier

1) http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00238.html
2) http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15565

3) Consider non-trivial eassert like:

eassert ((BUFFERP (it->object)
           && IT_CHARPOS (*it) == it->bidi_it.charpos
           && IT_BYTEPOS (*it) == it->bidi_it.bytepos)
          || (STRINGP (it->object)
              && IT_STRING_CHARPOS (*it) == it->bidi_it.charpos
              && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos)
          || (CONSP (it->object) && it->method == GET_FROM_STRETCH))

   a) It takes some time to check whether there are side effects here;
   b) If someone change 'struct it' so IT_STRING_CHARPOS (*it)
      becomes a non-trivial function with side effects, it would be
      too annoying (and error-prone) to review all easserts.

Due to 1), 2) and 3) I strongly suggests to redesign eassert
to avoid any assumptions about its argument expression.

Dmitry



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

end of thread, other threads:[~2013-10-09 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09 16:43 Optimize assume(...) away? (agaiin) Dmitry Antipov
2013-10-09 17:21 ` Eli Zaretskii
2013-10-09 17:55   ` Paul Eggert

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.