Changeset 13516 for trunk/abcl/src/org


Ignore:
Timestamp:
08/20/11 10:03:52 (10 years ago)
Author:
ehuelsmann
Message:

Fix #161: READTABLE-CASE setting of *readtable* affects FASL content.

Note: Fix based on research by Alessio Stalla.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Primitives.java

    r13461 r13516  
    58485848    };
    58495849
     5850    private static final Primitive GET_FASL_READTABLE
     5851            = new pf_get_fasl_readtable();
     5852    private static class pf_get_fasl_readtable extends Primitive {
     5853        pf_get_fasl_readtable() {
     5854            super("get-fasl-readtable", PACKAGE_SYS, false);
     5855        }
     5856       
     5857        @Override
     5858        public LispObject execute() {
     5859            return FaslReadtable.getInstance();
     5860        }
     5861    }
     5862   
    58505863}
  • trunk/abcl/src/org/armedbear/lisp/dump-form.lisp

    r13380 r13516  
    121121         (%stream-output-object object stream))))
    122122
     123(defvar *the-fasl-printer-readtable*
     124  (copy-readtable (get-fasl-readtable))
     125  "This variable holds a copy of the FASL readtable which we need to bind
     126below, in order to prevent the current readtable from influencing the content
     127being written to the FASL: the READTABLE-CASE setting influences symbol printing.")
     128
    123129(declaim (ftype (function (t stream) t) dump-form))
    124130(defun dump-form (form stream)
     
    143149        (*print-right-margin* nil)
    144150        (*print-structure* t)
     151        (*readtable* *the-fasl-printer-readtable*)
    145152
    146153        ;; make sure to write all floats with their exponent marker:
Note: See TracChangeset for help on using the changeset viewer.