Update of /cvsroot/sbcl/sbcl/src/compiler
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27440/src/compiler
Modified Files:
fun-info-funs.lisp
Log Message:
1.0.17.4: support for dynamic-extent structures
* Replace %MAKE-INSTANCE-WITH-LAYOUT with %MAKE-STRUCTURE-INSTANCE,
which has an IR2 transform that can handle both initialization and
allocation of the structure. On x86 and x86-64 it can initialize
all slots, whereas on other platforms it only does the layout and
non-raw slots. (See RAW-INSTANCE-INIT/* below.)
* EMIT-INITS needs two new kinds of inits to handle: :SLOT for
instance slots, and :DD for the defstruct-description/layout.
* DEF-ALLOC doesn't anymore use a simple boolean for denoting
variable length allocation, but instead a keyword: either
:VAR-ALLOC, :FIXED-ALLOC, or :STRUCTURE-ALLOC.
* New VOPs: RAW-INSTANCE-INIT/* for all raw slot types, which are
almost identical to RAW-INSTANCE-SET[-C]/* VOPs, except that they
always have a constant index and do not return a result. Structures
with raw slots can be stack allocated only on platforms that
implement these VOPs, denoted in make-config.sh by the
:RAW-INSTANCE-INIT-VOPS feature. ...we really could use a
*VM-FEATURES* or something.
Index: fun-info-funs.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/fun-info-funs.lisp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fun-info-funs.lisp 15 Jul 2007 22:28:13 -0000 1.4
+++ fun-info-funs.lisp 28 May 2008 22:32:28 -0000 1.5
@@ -23,16 +23,22 @@
(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)
- (if variable-length-p
- (lambda (node block)
+ (ecase allocation-style
+ (:var-alloc
+ (lambda (node block)
(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)
(defun %def-casser (name offset lowtag)
|