Skip to content
Snippets Groups Projects
Commit 56808b64 authored by rtoy's avatar rtoy
Browse files

Use -1 instead of 0 as the uninitialized hash indicator.

parent 70ac7f13
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/symbol.lisp,v 1.35 2004/05/17 17:22:30 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/symbol.lisp,v 1.36 2004/05/18 01:14:04 rtoy Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -98,9 +98,9 @@ ...@@ -98,9 +98,9 @@
"Make and return a new symbol with the STRING as its print name." "Make and return a new symbol with the STRING as its print name."
#-(or gengc x86 sparc) (make-symbol string) #-(or gengc x86 sparc) (make-symbol string)
#+gengc (%make-symbol (random most-positive-fixnum) string) #+gengc (%make-symbol (random most-positive-fixnum) string)
;; Initialize the symbol-hash to 0 to make this fast. It will get ;; Initialize the symbol-hash to -1 to make this fast. It will get
;; computed correctly later on. ;; computed correctly later on.
#+(or sparc x86) (%make-symbol 0 string)) #+(or sparc x86) (%make-symbol -1 string))
#+(or gengc x86 sparc) #+(or gengc x86 sparc)
(defun symbol-hash (symbol) (defun symbol-hash (symbol)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/objdef.lisp,v 1.53 2004/05/17 17:22:30 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/objdef.lisp,v 1.54 2004/05/18 01:14:04 rtoy Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -471,7 +471,7 @@ ...@@ -471,7 +471,7 @@
(flushable movable)) (flushable movable))
#+(or gengc sparc x86) #+(or gengc sparc x86)
(defknown symbol-hash (symbol) index (defknown symbol-hash (symbol) fixnum
(flushable movable)) (flushable movable))
#+(or gencgc sparc x86) #+(or gencgc sparc x86)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/cell.lisp,v 1.25 2004/05/17 17:22:30 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/cell.lisp,v 1.26 2004/05/18 01:14:05 rtoy Rel $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
(:translate symbol-hash) (:translate symbol-hash)
(:args (symbol :scs (descriptor-reg null))) (:args (symbol :scs (descriptor-reg null)))
(:results (res :scs (any-reg))) (:results (res :scs (any-reg)))
(:result-types positive-fixnum) (:result-types tagged-num)
(:generator 2 (:generator 2
;; the symbol-hash slot of NIL holds NIL because it is also the cdr ;; the symbol-hash slot of NIL holds NIL because it is also the cdr
;; slot, so we have to strip off the two low bits to make sure it is ;; slot, so we have to strip off the two low bits to make sure it is
......
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