Skip to content
Snippets Groups Projects
Commit 26120804 authored by gerd's avatar gerd
Browse files

* src/pcl/method-slot-access-optimization.lisp (pv-slot-value):

	Execute more control of the code being generated; avoid
	jumps in the common case.
parent 0fe03287
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@
;;;
(file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/method-slot-access-optimization.lisp,v 1.3 2003/05/04 13:11:21 gerd Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/method-slot-access-optimization.lisp,v 1.4 2003/05/08 11:21:33 gerd Exp $")
(in-package "PCL")
......@@ -511,12 +511,19 @@
(let ((slot-type (if use-type-p slot-type t)))
(if check-bound-p
`(the ,slot-type
(let* ((.location. (%svref .pv. ,pv-offset))
(.slot-value. (if ,predicate ,read-form +slot-unbound+)))
(locally
(declare #.*optimize-speed*)
(if (eq .slot-value. +slot-unbound+)
,fallback-access
.slot-value.)))
(block nil
(let ((.location. (%svref .pv. ,pv-offset)))
(tagbody
(unless ,predicate
(go miss))
(let ((.slot-value. ,read-form))
(when (eq +slot-unbound+ .slot-value.)
(go miss))
(return .slot-value.))
miss
(return ,fallback-access))))))
`(the ,slot-type
(let ((.location. (%svref .pv. ,pv-offset)))
(declare #.*optimize-speed*)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment