unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Vibhav Pant <vibhavp@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] feature/byte-switch 7c2d493: src/bytecode.c: Add optional sanity check for jump tables.
Date: Sat, 11 Feb 2017 23:18:42 +0530	[thread overview]
Message-ID: <CA+T2Sh3UdAzX_fN2_Ogjco_=BedLTtv=cK1GTO+KZqHLZAmOLw@mail.gmail.com> (raw)
In-Reply-To: <jwvbmu8spa0.fsf-monnier+emacsdiffs@gnu.org>

On Sat, Feb 11, 2017 at 9:21 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> +            /* Hash tables for switch are declared with :size set to the
>> +               exact number of cases.  */
>> +            if (BYTE_CODE_SAFE)
>> +              eassert (HASH_TABLE_SIZE (h) == h->count);
>
> Why should we force this constraint on the code that generates the
> hash-tables.  I think this is wrong.

Also, the rationale for putting a constraint on the :size of the hash
table was that it would save pure storage if the function (and thus
the jump table in the constant vector) was purecopied.

-- 
Vibhav Pant
vibhavp@gmail.com



  reply	other threads:[~2017-02-11 17:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170211144458.18694.21302@vcs0.savannah.gnu.org>
     [not found] ` <20170211144459.A837B2319A@vcs0.savannah.gnu.org>
2017-02-11 15:51   ` [Emacs-diffs] feature/byte-switch 7c2d493: src/bytecode.c: Add optional sanity check for jump tables Stefan Monnier
2017-02-11 17:48     ` Vibhav Pant [this message]
2017-02-11 19:50       ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CA+T2Sh3UdAzX_fN2_Ogjco_=BedLTtv=cK1GTO+KZqHLZAmOLw@mail.gmail.com' \
    --to=vibhavp@gmail.com \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).