unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: aemoncannon@gmail.com
Cc: emacs-devel@gnu.org
Subject: Re: Difficulties byte-compiling very large .el file
Date: Thu, 20 Aug 2009 10:27:48 +0200	[thread overview]
Message-ID: <m37hwyopob.fsf@hase.home> (raw)
In-Reply-To: <794057160908191449t4b23080cjf2b85cb0f8e4f589@mail.gmail.com> (Aemon Cannon's message of "Wed, 19 Aug 2009 17:49:20 -0400")

Aemon Cannon <aemoncannon@gmail.com> 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."




  reply	other threads:[~2009-08-20  8:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19 21:49 Difficulties byte-compiling very large .el file Aemon Cannon
2009-08-20  8:27 ` Andreas Schwab [this message]
2009-08-20 13:07   ` Aemon Cannon
2009-08-20 13:23     ` Andreas Schwab
2009-08-20 14:29       ` Aemon Cannon
2009-08-20 18:30     ` Eli Zaretskii
2009-08-25 10:16 ` Aidan Kehoe
2009-08-25 11:07   ` Miles Bader
2009-08-25 11:50     ` Aidan Kehoe
2009-08-25 15:04       ` Aemon Cannon
2009-09-01 22:41         ` Aemon Cannon
2009-08-29  0:37   ` 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=m37hwyopob.fsf@hase.home \
    --to=schwab@linux-m68k.org \
    --cc=aemoncannon@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).