From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aemon Cannon Newsgroups: gmane.emacs.devel Subject: Re: Difficulties byte-compiling very large .el file Date: Thu, 20 Aug 2009 09:07:01 -0400 Message-ID: <794057160908200607h50353f90o3bd175f1fca84e47@mail.gmail.com> References: <794057160908191449t4b23080cjf2b85cb0f8e4f589@mail.gmail.com> Reply-To: aemoncannon@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1250773695 9456 80.91.229.12 (20 Aug 2009 13:08:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Aug 2009 13:08:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 20 15:08:08 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Me7N7-0004bI-Qo for ged-emacs-devel@m.gmane.org; Thu, 20 Aug 2009 15:08:06 +0200 Original-Received: from localhost ([127.0.0.1]:47661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Me7N7-0002is-5Z for ged-emacs-devel@m.gmane.org; Thu, 20 Aug 2009 09:08:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Me7M7-0002OG-CD for emacs-devel@gnu.org; Thu, 20 Aug 2009 09:07:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Me7M6-0002Nt-Ki for emacs-devel@gnu.org; Thu, 20 Aug 2009 09:07:02 -0400 Original-Received: from [199.232.76.173] (port=46498 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Me7M6-0002Nn-EI for emacs-devel@gnu.org; Thu, 20 Aug 2009 09:07:02 -0400 Original-Received: from qw-out-1920.google.com ([74.125.92.145]:28005) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Me7M5-00038B-Pg for emacs-devel@gnu.org; Thu, 20 Aug 2009 09:07:01 -0400 Original-Received: by qw-out-1920.google.com with SMTP id 5so2904379qwf.24 for ; Thu, 20 Aug 2009 06:07:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=r1umFCFoG7QMoNmXREYwzcoqMVbKeo1r63BWDsAgGvc=; b=Fu7xA07+8MyTMy0SudmPxIKqwbgVivm26z9IJeHRuEPO+I0hIzpZbJ6J0jUxSZyiEs p1MQ+dTI7qlKf2x5NvSzbwTRA3fJcsyM+KoQRYhu/NZE+x5oV+c02PkdUvhSMtWXlR6T MMhRUUjfBeGHq25gVhjWAWsRBmK3h0CYqHIq8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; b=ika+a4L2ipyzgcWdUUpqKuiNtTVvITCKLWy7COFJVIUdDVm10/Q0fwmADty+s+F2PS NnIYDISmtxTgPGXetdgbJ1j7ic2r06ZYSHz8JcVaB49GodoUh0QSOgPUB7fh3MULUFVY A7324guOo1opITca9o4Bh4pIh1td+m2S0pqbE= Original-Received: by 10.229.19.149 with SMTP id a21mr2964498qcb.29.1250773621214; Thu, 20 Aug 2009 06:07:01 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114441 Archived-At: Bingo! ../test/grammars/as3_elispParser.el:31515:33:Error: Bytecode overflow I'm not super familiar with emacs byte-compiling, but my guess is that increasing the size of the operands is not an option. Should I look for a conditional that spans a lot of code, and try to fix it that way? Thoughts? On Thu, Aug 20, 2009 at 4:27 AM, Andreas Schwab wrot= e: > Aemon Cannon writes: > >> The generated parser for ActionScript 3 is over 30k lines long and >> fails to byte-compile with the message in Emacs 22: >> as3_elispParser.el:31515:33:Error: Invalid character: 256, #o400, >> #x100 >> >> ..and this message in Emacs 23: >> ../test/grammars/as3_elispParser.el:31515:33:Error: Args out of range: >> 256, 0, 255 > > Probably the bytecode string is becoming too large so that a byte-goto > operand overflows. =A0Try this patch to verify: > > --- lisp/emacs-lisp/bytecomp.el.~2.248.~ =A0 =A0 =A0 =A02009-08-06 13:15:= 39.000000000 +0200 > +++ lisp/emacs-lisp/bytecomp.el 2009-08-20 10:26:05.000000000 +0200 > @@ -853,7 +853,8 @@ otherwise pop it") > =A0 =A0 =A0 =A0 =A0 =A0 =A0(t =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0; Absolute jump > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq pc (car (cdr (car bytes)))) =A0 =A0 =A0= =A0; Pick PC from tag > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setcar (cdr bytes) (logand pc 255)) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0(setcar bytes (lsh pc -8)))) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0(setcar bytes (lsh pc -8)) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0(if (> (car bytes) 255) (error "Bytecode ove= rflow")))) > =A0 =A0 =A0 =A0(setq patchlist (cdr patchlist)))) > =A0 =A0 (apply 'unibyte-string (nreverse bytes)))) > > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756 =A001D3 44D5 214B 8276 4= ED5 > "And now for something completely different." >