File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5252 (set :nadjoinf (bir :scope dynamic-environment) ib)
5353 ib))
5454
55+ ; ;; Make a function's initial iblock.
56+ ; ;; make-iblock can do this too, since the inserter is only used
57+ ; ;; for defaults that a start iblock doesn't need, but this function
58+ ; ;; lets you do it without an inserter, and also sets it up in the
59+ ; ;; function for you.
60+ (defun make-start-iblock (function &key (name ' #:start))
61+ (let ((ib (make-instance ' bir:iblock
62+ :name name
63+ :function function :dynamic-environment function)))
64+ (setf (bir :start function) ib)
65+ (set :nadjoinf (bir :scope function) ib)
66+ ib))
67+
5568; ;; Function called to carry out any convenient post-processing
5669; ;; called when an instruction is built.
5770; ;; NOTE: An alternate design would be to make INSERT and TERMINATE generic,
Original file line number Diff line number Diff line change 44 (# :set # :cleavir-set))
55 (:export # :inserter # :constant # :vcell # :fcell # :adjoin-variable)
66 (:export # :begin # :proceed # :insert # :terminate)
7- (:export # :make-iblock))
7+ (:export # :make-iblock # :make-start-iblock ))
You can’t perform that action at this time.
0 commit comments