In porting some code from Lispworks to Cmucl, I encountered
the following.  It seems that when there's a quoted list
in compiled code that EQUAL sublists are made EQ to each other.
I don't know if this would be considered a bug or a feature, but
it seems a bit non-intuitive. 


Interestingly, it doesn't do this when the form is compiled
in the emacs buffer.

I'm running cmucl-18e on Linux.


- Bob



===============================================================


Starting /usr/bin/lisp ...
ILISP V5.12.0  Use M-x ilisp-bug for problems and suggestions.
CMU Common Lisp 18e, running on localhost.localdomain
With core: /usr/lib/cmucl/lib/lisp.core
Dumped on: Thu, 2003-04-03 08:47:12-05:00 on orion
See <http://www.cons.org/cmucl/> for support information.
Loaded subsystems:
    Python 1.1, target Intel x86
    CLOS 18e (based on PCL September 16 92 PCL (f))


* *features*
(:PCL-STRUCTURES :PORTABLE-COMMONLOOPS :PCL :PYTHON :PENTIUM :I486
 :LINKAGE-TABLE :MP :GENCGC :GLIBC2.1 :CMU18 :CMU18E :RELATIVE-PACKAGE-NAMES
 :CONSERVATIVE-FLOAT-TYPE :RANDOM-MT19937 :HASH-NEW :X86 :LINUX :GLIBC2 
:UNIX
 :COMMON :CMU :NEW-COMPILER :COMMON-LISP :ANSI-CL :IEEE-FLOATING-POINT)

===================================================================
*** file contents ***
===================================================================

(in-package :cl-user)

(defvar foo)

(setq foo '((0 0)(0 0)(0 0)(0 0)))

===================================================================
*** compiling/loading the file ***
===================================================================

* (compile-file "/usr/local/lib/test.lisp")
; Python version 1.1, VM version Intel x86 on 05 JUN 03 09:22:53 am.
; Compiling: /usr/local/lib/test.lisp 05 JUN 03 09:22:31 am


; [GC threshold exceeded with 14,063,568 bytes in use.  Commencing GC.]
; [GC completed with 3,365,616 bytes retained and 10,697,952 bytes freed.]
; [GC will next occur when at least 15,365,616 bytes are in use.]
; Byte Compiling Top-Level Form:

; /usr/local/lib/test.x86f written.
; Compilation finished in 0:00:01.
#p"/usr/local/lib/test.x86f"
NIL
NIL
* (load *)
; Loading #p"/usr/local/lib/test.x86f".
T
* foo
((0 0) (0 0) (0 0) (0 0))
* (eq (first foo) (second foo))
T


===================================================================
*** compiling in the emacs buffer ***
===================================================================

* ;;; Compiling setq
; Compiling LAMBDA NIL:
; Compiling Top-Level Form:
((0 0) (0 0) (0 0) (0 0))
* (eq (first foo) (second foo))
NIL
*



Reply via email to