Handbook
Glossary
with-cfg-builder ( nodes word label quot: ( ..a block -- ..b ) -- )
Final stage of compilation generates machine code from dataflow IR
Prev:
end-word ( block -- block' )
Next:
emit-call ( block word height -- block' )
Vocabulary
compiler
.
cfg
.
builder
Inputs
nodes
a
sequence
word
a
word
label
a
word
quot
a
quotation
Outputs
None
Word description
Combinator used to begin and end stack analysis so that the given quotation can build the cfg. The quotation is passed the initial basic block on the stack.
Definition
USING:
accessors
compiler.cfg.stacks
kernel
namespaces
sequences
;
IN:
compiler.cfg.builder
:
with-cfg-builder
( nodes word label quot: ( ..a block -- ..b ) -- )
[
[
entry>>
]
]
dip
compose
[
[
begin-stack-analysis
begin-cfg
[
procedures
get
push
]
]
]
dip
[
[
end-stack-analysis
]
tri
]
curry
compose
with-scope
;
inline