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

Added support for load-time-value. Specifically, there is a new function

MAKE-LOAD-TIME-VALUE-TN that allocates a slot in the constant pool with
a marker that tells the dumper to use the supplied handle instead of trying
to dump a constant value.  Other than that, the resultant TN looks just
like a constant tn.
parent 4edf05d8
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/tn.lisp,v 1.14 1991/11/18 15:50:08 ram Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/tn.lisp,v 1.15 1991/11/24 23:47:32 wlott Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -245,6 +245,19 @@
res))
;;; MAKE-LOAD-TIME-VALUE-TN -- interface.
;;;
(defun make-load-time-value-tn (handle type)
(let* ((component (component-info *compile-component*))
(sc (svref (backend-sc-numbers *backend*)
(sc-number-or-lose 'constant *backend*)))
(res (make-tn 0 :constant (primitive-type type) sc))
(constants (ir2-component-constants component)))
(setf (tn-offset res) (fill-pointer constants))
(vector-push-extend (cons :load-time-value handle) constants)
(push-in tn-next res (ir2-component-constant-tns component))
res))
;;; MAKE-ALIAS-TN -- Interface
;;;
;;; Make a TN that aliases TN for use in local call argument passing.
......
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