From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christian Wittern Newsgroups: gmane.emacs.bugs Subject: bug#26824: 24.5; Bytecode overflow error when byte compiling large .el file Date: Tue, 16 May 2017 11:08:24 +0900 Message-ID: <7050da4f-b89d-3b69-fa19-538443d75dcc@gmail.com> References: <8760h1wswo.fsf@drachen> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1494900556 17252 195.159.176.226 (16 May 2017 02:09:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 16 May 2017 02:09:16 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cc: 26824@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 16 04:09:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dARvE-0004PO-7v for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 May 2017 04:09:12 +0200 Original-Received: from localhost ([::1]:39533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dARvJ-0000IQ-Nz for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 May 2017 22:09:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dARv9-0000HS-Ns for bug-gnu-emacs@gnu.org; Mon, 15 May 2017 22:09:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dARv5-0003Ky-NY for bug-gnu-emacs@gnu.org; Mon, 15 May 2017 22:09:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44536) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dARv5-0003KG-K7 for bug-gnu-emacs@gnu.org; Mon, 15 May 2017 22:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dARv3-0000Pz-Np for bug-gnu-emacs@gnu.org; Mon, 15 May 2017 22:09:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christian Wittern Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 May 2017 02:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26824-submit@debbugs.gnu.org id=B26824.14949005171577 (code B ref 26824); Tue, 16 May 2017 02:09:01 +0000 Original-Received: (at 26824) by debbugs.gnu.org; 16 May 2017 02:08:37 +0000 Original-Received: from localhost ([127.0.0.1]:47213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dARuf-0000PL-4j for submit@debbugs.gnu.org; Mon, 15 May 2017 22:08:37 -0400 Original-Received: from mail-pg0-f52.google.com ([74.125.83.52]:35347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dARub-0000P8-Ss for 26824@debbugs.gnu.org; Mon, 15 May 2017 22:08:34 -0400 Original-Received: by mail-pg0-f52.google.com with SMTP id q125so49210070pgq.2 for <26824@debbugs.gnu.org>; Mon, 15 May 2017 19:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=IqbCP6og3nRTxZXabb1cEZtdVK7PhPiyYlQAUc8ThBY=; b=FiXKlddPiXhIUhHbVKgSUouZuUjcwdJIYpwaxFq4Jj+uib7sF1z4CkieqDv02W/TVU xqOGOy9QfWsBpACJ0Dt/awanSGAdZ6P9Sc3yxDyeRO0RvfP86R4gPIE+hzpVEmEx1bH/ 81SPnVm8WuaXVYsige0yCfXJSjLsTIfQE1QI6FULMCddHkq94cdtFdvnrXxMgoftDsrh 9EXlSStliFuxuU0Z6s6dyQEbCxK9fEfd0ufLLGWF7Lklh6Eyy9YnHF/byzWtMeo2/NSy QY6JmMtfbxzULVexDSQejIEtpW6IT3+Yx6nA4USV8Hggf1TNUIkFUe+dDaUtIDscfHHh k4RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=IqbCP6og3nRTxZXabb1cEZtdVK7PhPiyYlQAUc8ThBY=; b=CLRIoHzPjZ83XctFZMGwfafCejd2idbcyF27ZN86fqietND7X+m0tlsvJzjfD1m7Vt BGKBtg1DfSVJhYqMPPfweKqlME3UoKuyikE/jKZErMQxfigHHbeXLf5lind8H6lSykoH Ma17lLR7IDUutevAHABp1rk017qJ7YI1oMlv3lL4bN68kaA31jrVtOnot6r6708/GThN dnom5zUs2XoL5FxBKp8A6AJhjmpJEbiJ0kopNgZDLqbQQ1tDbydd0GTpvWcc5d9KV3G7 yY4jhXleD980YamWuuXJnsi0NJlUxrnuiynWJuYcK8uFKkRVUX8FtQ1Hlm7H5IF0NEtv Bm0Q== X-Gm-Message-State: AODbwcAxzo5hNlYyJIdOYBNpJETQcvvJQpy2EYDYjTiR+F08DVw9TjQm pinwWlb5DQYLrQ== X-Received: by 10.99.186.21 with SMTP id k21mr2293683pgf.165.1494900508125; Mon, 15 May 2017 19:08:28 -0700 (PDT) Original-Received: from [192.168.0.17] (119-231-66-83f1.kyt1.eonet.ne.jp. [119.231.66.83]) by smtp.gmail.com with ESMTPSA id n7sm25494291pfn.0.2017.05.15.19.08.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 May 2017 19:08:26 -0700 (PDT) In-Reply-To: <8760h1wswo.fsf@drachen> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132531 Archived-At: On 05/16/2017 09:24 AM, Michael Heerdegen wrote: > Christian Wittern writes: > >> Yes, that is right. This file is a bit of a crazy thing, if there is >> a better way to achieve this, I would be glad to know. > Use a data structure. > > In the simplest case (when lookup time is not critical), just use a > linear structure, an alist: For each VOL, define an alist with elements > (pagelimit . filename) with `defconst'. To implement > `mandoku-cbeta-vol-page-to-file', find the first entry whose car is not > smaller than the given page in a loop. Return the cdr of the found > cons. Well, yes. But I expect the timing then to be slower (although I did not really test this), because I would have to go sequentially through the alist, so I went with this inelegant method, which at least responses fast, even without bytecompiling. Christian