[armedbear-cvs] r13515 - trunk/abcl/src/org/armedbear/lisp
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Fri Aug 19 21:47:22 UTC 2011
Author: ehuelsmann
Date: Fri Aug 19 14:47:21 2011
New Revision: 13515
Log:
Extend overly long serialization strings storage mechanism to
normal strings as well.
Modified:
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp Fri Aug 19 13:43:00 2011 (r13514)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp Fri Aug 19 14:47:21 2011 (r13515)
@@ -1169,10 +1169,14 @@
(defun serialize-string (string)
"Generate code to restore a serialized string."
- (emit-new +lisp-simple-string+)
- (emit 'dup)
- (emit 'ldc (pool-string string))
- (emit-invokespecial-init +lisp-simple-string+ (list +java-string+)))
+ (cond
+ ((< (length string) #xFFFF)
+ (emit-new +lisp-simple-string+)
+ (emit 'dup)
+ (emit 'ldc (pool-string string))
+ (emit-invokespecial-init +lisp-simple-string+ (list +java-string+)))
+ (t
+ (serialize-object string))))
(defun serialize-package (pkg)
"Generate code to restore a serialized package."
More information about the armedbear-cvs
mailing list