clasp icon indicating copy to clipboard operation
clasp copied to clipboard

Circular list structures not always dumped correctly

Open Bike opened this issue 6 years ago • 0 comments

In 5e58789 I put a case into the literals compiler to treat long proper lists specially, by mapcaring over them instead of using the general recursive method for conses. This allows long lists to be compiled without blowing the stack, but there's a problem: conses internal to the list are not properly recorded in the circularity table. E.g., if you have a file containing

(defun foo () '(1 . #1=(2 3 #1# 5)))

and compile and load it, then in the repl (foo) => (1 2 3 #1=(2 3 #1# 5) 5), i.e. it duplicates the inner list once.

I'm not sure how to fix this immediately (while still allowing long lists to be compiled) but I don't expect it to come up much, so I'll just leave it here as an issue for now.

Bike avatar Apr 22 '19 14:04 Bike