From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Vibhav Pant Newsgroups: gmane.emacs.devel 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 Message-ID: References: <20170211144458.18694.21302@vcs0.savannah.gnu.org> <20170211144459.A837B2319A@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1486835377 27315 195.159.176.226 (11 Feb 2017 17:49:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2017 17:49:37 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 11 18:49:33 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccbnh-0006oX-0X for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2017 18:49:33 +0100 Original-Received: from localhost ([::1]:49109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccbnm-0004xX-9R for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2017 12:49:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccbnE-0004xS-Gk for emacs-devel@gnu.org; Sat, 11 Feb 2017 12:49:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccbnD-0008Ky-Hs for emacs-devel@gnu.org; Sat, 11 Feb 2017 12:49:04 -0500 Original-Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]:33378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ccbnD-0008Kk-Cs for emacs-devel@gnu.org; Sat, 11 Feb 2017 12:49:03 -0500 Original-Received: by mail-yw0-x242.google.com with SMTP id u68so4538405ywg.0 for ; Sat, 11 Feb 2017 09:49:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yagMMtBUhSQzvIF/YOi8+j5x3C+Fokd17vBdxCVcXZs=; b=sTbxtt+TB2cY46IIIiMEnnrxTczTmYz6ZRSvdK3FydlHFFK+NuFf7NfWzOJx0XQ+7q U9MK2HMxioeffLTGiBJNAV9jgcE0m1DgqAuSaqe0jXklBfV24UcFr1UYuJxUW9QzPauN MSY0XFdlcUHUSUU9QFrLknF3+RExntIlxSfNnQ/bnaFb47L5F5hMuj+lqlDMXFKdRcA2 ppmdK8lH7Au7Gj47o9WWYYAogkwNl8nyuy9HgbIbeRiskY4Pi+IIKaLO2zcyCdSR43Pk HwmxrnFiQOhtDqemmqBmXT8UBwyxyd0Z+CXflEnBVYEsfQYFhCYuprZBNi2uBanTdNkw ZoBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yagMMtBUhSQzvIF/YOi8+j5x3C+Fokd17vBdxCVcXZs=; b=WqZRZhKvcTaMpbMA+qg9L/U1lzt8BHXEXKBHYsUIaXeXydHLlZja2UTUoiLhckiboL yIRBI36vK6QQz+aD05O/T8T3psvdnBJ5TsCi2qsEcxPenIectXhVaBbwMZlbLoSLod/Z LyzxrobA6yZWhpvrIKEC0iy2xVBB546YAmDitrBvSxdsfrAMUbJzyR4jmLcu2sLaplpT G27D9mYnAJUo+c55OjOS54Jr6zxhiMvdg1ZFkXjAZDdXuzGVv9OXt7CVf2s0B4bggi2K EvAj4DB6La5o7P4lMhpjW1bFMGhwnLfg5KMJd6mCqRfueQGkkWy7QIcOHSZc0xd92uUi HjSg== X-Gm-Message-State: AMke39klkMGaVDfJVQpccgLwh4N3hD8M3Lm0YO8vIMWbMzsRtYgO/2pVVYiBAQewo2NYl8TmUxvCsZbsuZYT7w== X-Received: by 10.129.85.211 with SMTP id j202mr10452952ywb.287.1486835342557; Sat, 11 Feb 2017 09:49:02 -0800 (PST) Original-Received: by 10.129.153.77 with HTTP; Sat, 11 Feb 2017 09:48:42 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::242 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212236 Archived-At: On Sat, Feb 11, 2017 at 9:21 PM, Stefan Monnier 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