From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Difficulties byte-compiling very large .el file Date: Thu, 20 Aug 2009 10:27:48 +0200 Message-ID: References: <794057160908191449t4b23080cjf2b85cb0f8e4f589@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250756921 24520 80.91.229.12 (20 Aug 2009 08:28:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Aug 2009 08:28:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: aemoncannon@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 20 10:28:33 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 1Me30Z-00067D-Jm for ged-emacs-devel@m.gmane.org; Thu, 20 Aug 2009 10:28:32 +0200 Original-Received: from localhost ([127.0.0.1]:44538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Me30Y-0003Ia-P3 for ged-emacs-devel@m.gmane.org; Thu, 20 Aug 2009 04:28:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Me30K-0003Aa-Sw for emacs-devel@gnu.org; Thu, 20 Aug 2009 04:28:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Me30F-00034q-NA for emacs-devel@gnu.org; Thu, 20 Aug 2009 04:28:15 -0400 Original-Received: from [199.232.76.173] (port=33996 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Me30F-00034W-GD for emacs-devel@gnu.org; Thu, 20 Aug 2009 04:28:11 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:64241) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Me30E-00005n-O8 for emacs-devel@gnu.org; Thu, 20 Aug 2009 04:28:11 -0400 Original-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7K8RqCm026761; Thu, 20 Aug 2009 04:27:52 -0400 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7K8RoAp020059; Thu, 20 Aug 2009 04:27:51 -0400 Original-Received: from hase.home (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7K8Rme8012205; Thu, 20 Aug 2009 04:27:49 -0400 X-Yow: Bagels... In-Reply-To: <794057160908191449t4b23080cjf2b85cb0f8e4f589@mail.gmail.com> (Aemon Cannon's message of "Wed, 19 Aug 2009 17:49:20 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:114432 Archived-At: 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. Try this patch to verify: --- lisp/emacs-lisp/bytecomp.el.~2.248.~ 2009-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") (t ; Absolute jump (setq pc (car (cdr (car bytes)))) ; Pick PC from tag (setcar (cdr bytes) (logand pc 255)) - (setcar bytes (lsh pc -8)))) + (setcar bytes (lsh pc -8)) + (if (> (car bytes) 255) (error "Bytecode overflow")))) (setq patchlist (cdr patchlist)))) (apply 'unibyte-string (nreverse bytes)))) Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."