From 759b117be422d88032775f4804b552d45cb97e4f Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Mon, 8 Oct 2007 15:35:37 +0000 Subject: [PATCH] Fix problem with cross-compiles needing SXHASH-INSTANCE because TRACE uses EQUAL hash-tables now to keep track of labels/flets. Basically moved the implementation of sxhash-instance from pcl/low.lisp to hash-new.lisp. --- code/hash-new.lisp | 15 ++++++++++++++- pcl/low.lisp | 10 +--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/code/hash-new.lisp b/code/hash-new.lisp index dec9890fd..8f3c03b1c 100644 --- a/code/hash-new.lisp +++ b/code/hash-new.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/hash-new.lisp,v 1.44 2007/09/28 17:07:21 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/hash-new.lisp,v 1.45 2007/10/08 15:35:36 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -960,6 +960,19 @@ ); eval-when (compile eval) +;; Taken from pcl/low.lisp, and manually macroexpanded. This needs to +;; be here so we can cross-compile. (Due to tracing using an equal +;; table now.) + +(defun sxhash-instance (instance) + (cond ((%instancep instance) + (%instance-ref instance 2)) + ((funcallable-instance-p instance) + (%funcallable-instance-info instance 2)) + (t + (error "What kind of instance is this?")))) + +;; End pcl/low.lisp (defun internal-sxhash (s-expr depth) (declare (type index depth) (values hash)) diff --git a/pcl/low.lisp b/pcl/low.lisp index 507693cde..4da7e0c2c 100644 --- a/pcl/low.lisp +++ b/pcl/low.lisp @@ -26,7 +26,7 @@ ;;; (file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/low.lisp,v 1.34 2007/09/13 04:11:45 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/low.lisp,v 1.35 2007/10/08 15:35:37 rtoy Rel $") ;;; ;;; This file contains optimized low-level constructs for PCL. @@ -314,14 +314,6 @@ the compiler as completely as possible. Currently this means that ,wrapper nil))) -(defmacro get-hash (instance) - `(cond ((std-instance-p ,instance) (std-instance-hash ,instance)) - ((fsc-instance-p ,instance) (fsc-instance-hash ,instance)) - (t (internal-error "What kind of instance is this?")))) - -(defun lisp::sxhash-instance (instance) - (get-hash instance)) - (defmacro get-slots (inst) `(cond ((std-instance-p ,inst) (std-instance-slots ,inst)) ((fsc-instance-p ,inst) (fsc-instance-slots ,inst)) -- GitLab