Opened 5 years ago

Closed 5 years ago

#1290 closed defect (fixed)

Dispatch macros inadvertently affect read-table copies

Reported by: jared Owned by:
Priority: normal Milestone:
Component: Compiler Version: trunk
Keywords: readtable, copy-readtable, set-dispatch-macro-character Cc:



I believe there is a new bug on CCL related to reader tables. In particular it appears that doing a copy-readtable no longer produces a deep enough copy. The following small test code illustrates the problem:

(defparameter *my-readtable* (copy-readtable))

(defun my-sharp-dot-read (stream char n)
  (declare (ignore char n stream))
  (format t "My sharp-dot-read invoked!~%"))

(let ((*readtable* *my-readtable*))
  (set-dispatch-macro-character #\# #\. 'my-sharp-dot-read))

(format t "Are they the same?  ~a~%"
        (eq (get-dispatch-macro-character #\# #\. *readtable*)
            (get-dispatch-macro-character #\# #\. *my-readtable*)))

I believe this should print:

    Are they the same?  NIL

And indeed this is what gets printed on a recent copy of SBCL and also on the slightly older version of CCL: CCL 1.11-dev-r16394M-trunk (LinuxX8664).

However, the bleeding-edge CCL, Version 1.11-dev-r16446M-trunk (LinuxX8664), instead prints:

    Are they the same?  T

I can see from the commit log that there has been some recent work on reader macros, so this is perhaps related to those recent changes.



Change History (1)

comment:1 Changed 5 years ago by gb

  • Resolution set to fixed
  • Status changed from new to closed

(In [16447]) finish removing alist-based readtable macro tables. fix typo in COPY-MACRO-TABLE (fixes ticket:1290 in the trunk) Get back to work.

Note: See TracTickets for help on using tickets.