[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Difficulties byte-compiling very large .el file
From: |
Andreas Schwab |
Subject: |
Re: Difficulties byte-compiling very large .el file |
Date: |
Thu, 20 Aug 2009 10:27:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Aemon Cannon <address@hidden> 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, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."