Skip to content
Snippets Groups Projects
Commit 4e53cbef authored by wlott's avatar wlott
Browse files

Added a symbol-hash slot to symbols under the gengc system. When symbols

are created, this is filled in with a random value.  Things that want a
fast hashing of symbols but don't want to depend on the address can use
this value.
parent c0a6edc3
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/objdef.lisp,v 1.31 1993/05/13 13:09:00 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/objdef.lisp,v 1.32 1993/05/18 19:18:28 wlott Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
(export '(%numerator %denominator %realpart %imagpart (export '(%numerator %denominator %realpart %imagpart
%code-code-size %code-entry-points %code-debug-info %code-code-size %code-entry-points %code-debug-info
%function-self %function-next %function-name %function-arglist %function-self %function-next %function-name %function-arglist
%function-type)) %function-type %make-symbol symbol-hash))
(in-package "VM") (in-package "VM")
...@@ -337,20 +337,6 @@ ...@@ -337,20 +337,6 @@
:ref-known (flushable) :ref-known (flushable)
:init :arg)) :init :arg))
(define-primitive-object (symbol :lowtag other-pointer-type
:header symbol-header-type
:alloc-trans make-symbol)
(value :set-trans %set-symbol-value
:init :unbound)
unused
(plist :ref-trans symbol-plist
:set-trans %set-symbol-plist
:init :null)
(name :ref-trans symbol-name :init :arg)
(package :ref-trans symbol-package
:set-trans %set-symbol-package
:init :null))
(define-primitive-object (sap :lowtag other-pointer-type (define-primitive-object (sap :lowtag other-pointer-type
:header sap-type) :header sap-type)
(pointer :c-type "char *")) (pointer :c-type "char *"))
...@@ -431,3 +417,32 @@ ...@@ -431,3 +417,32 @@
(storebuf-fill-pointer :c-type "lispobj **") (storebuf-fill-pointer :c-type "lispobj **")
(storebuf-end :c-type "lispobj **") (storebuf-end :c-type "lispobj **")
(words-consed :c-type "unsigned long")) (words-consed :c-type "unsigned long"))
;;;; Symbols
#+gengc
(defknown %make-symbol (index simple-string) symbol
(flushable movable))
#+gengc
(defknown symbol-hash (symbol) index
(flushable movable))
(define-primitive-object (symbol :lowtag other-pointer-type
:header symbol-header-type
:alloc-trans
#-gengc make-symbol
#+gengc %make-symbol)
(value :set-trans %set-symbol-value
:init :unbound)
#-gengc unused
#+gengc (hash :init :arg)
(plist :ref-trans symbol-plist
:set-trans %set-symbol-plist
:init :null)
(name :ref-trans symbol-name :init :arg)
(package :ref-trans symbol-package
:set-trans %set-symbol-package
:init :null))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment