all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Emacs development discussions <emacs-devel@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>, Paul Eggert <eggert@cs.ucla.edu>,
	Stefan Monnier <monnier@IRO.UMontreal.CA>
Subject: Optimize assume(...) away? (agaiin)
Date: Wed, 09 Oct 2013 20:43:17 +0400	[thread overview]
Message-ID: <525587A5.3040101@yandex.ru> (raw)

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



             reply	other threads:[~2013-10-09 16:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 16:43 Dmitry Antipov [this message]
2013-10-09 17:21 ` Optimize assume(...) away? (agaiin) Eli Zaretskii
2013-10-09 17:55   ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=525587A5.3040101@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.