projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reduce random casting in looks_like_valid_lisp_pointer_p().
[sbcl.git]
/
src
/
compiler
/
fun-info-funs.lisp
diff --git
a/src/compiler/fun-info-funs.lisp
b/src/compiler/fun-info-funs.lisp
index
a5b6290
..
d399be7
100644
(file)
--- a/
src/compiler/fun-info-funs.lisp
+++ b/
src/compiler/fun-info-funs.lisp
@@
-23,14
+23,26
@@
(ir2-convert-setter node block name offset lowtag)))))
name)
(ir2-convert-setter node block name offset lowtag)))))
name)
-(defun %def-alloc (name words variable-length-p header lowtag inits)
+(defun %def-alloc (name words allocation-style header lowtag inits)
(let ((info (fun-info-or-lose name)))
(setf (fun-info-ir2-convert info)
(let ((info (fun-info-or-lose name)))
(setf (fun-info-ir2-convert info)
- (if variable-length-p
- (lambda (node block)
+ (ecase allocation-style
+ (:var-alloc
+ (lambda (node block)
(ir2-convert-variable-allocation node block name words header
(ir2-convert-variable-allocation node block name words header
- lowtag inits))
- (lambda (node block)
- (ir2-convert-fixed-allocation node block name words header
- lowtag inits)))))
+ lowtag inits)))
+ (:fixed-alloc
+ (lambda (node block)
+ (ir2-convert-fixed-allocation node block name words header
+ lowtag inits)))
+ (:structure-alloc
+ (lambda (node block)
+ (ir2-convert-structure-allocation node block name words header
+ lowtag inits))))))
name)
name)
+
+(defun %def-casser (name offset lowtag)
+ (let ((fun-info (fun-info-or-lose name)))
+ (setf (fun-info-ir2-convert fun-info)
+ (lambda (node block)
+ (ir2-convert-casser node block name offset lowtag)))))