[armedbear-cvs] r12378 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Fri Jan 15 20:40:35 UTC 2010


Author: ehuelsmann
Date: Fri Jan 15 15:40:31 2010
New Revision: 12378

Log:
Create a dependable reader dynamic environment.

Modified:
   trunk/abcl/src/org/armedbear/lisp/AutoloadedFunctionProxy.java

Modified: trunk/abcl/src/org/armedbear/lisp/AutoloadedFunctionProxy.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/AutoloadedFunctionProxy.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/AutoloadedFunctionProxy.java	Fri Jan 15 15:40:31 2010
@@ -81,6 +81,7 @@
         return load();
     }
 
+
     final private synchronized Function load() {
         if (fun != null)
             return fun;
@@ -91,6 +92,14 @@
         for (int i = 0; i < symsToSave.length; i++)
             thread.bindSpecial(symsToSave[i], savedSyms[i]);
 
+        // set a specific reader environment, because we may be triggered in
+        // any undefined dynamic environment; we want something predictable
+        thread.bindSpecial(Symbol.READ_SUPPRESS, NIL);
+        thread.bindSpecial(Symbol.READ_EVAL, T);
+        thread.bindSpecial(Symbol.READ_BASE, LispInteger.getInstance(10));
+        // don't need to bind *READ-DEFAULT-FLOAT-FORMAT*,
+        // because DUMP-FORM sets it to NIL, forcing exponent markers everywhere
+
         byte[] classbytes =
             (byte[])((Hashtable)cache.javaInstance()).get(name);
         try {




More information about the armedbear-cvs mailing list