Handbook
Glossary
with-fixup ( quot -- code )
Code generation from MR (machine representation)
Vocabulary
compiler
.
codegen
Inputs
quot
a
quotation
Outputs
code
a
sequence
Word description
Runs the quotation to emit compiled code. The output is a six-tuple with the same format as the one output by
generate
.
Definition
USING:
accessors
arrays
byte-arrays
compiler.cfg
compiler.codegen.gc-maps
compiler.codegen.labels
compiler.codegen.relocation
kernel
make
namespaces
sequences.generalizations
;
IN:
compiler.codegen
:
with-fixup
( quot -- code )
[
emit-binary-literals
emit-gc-maps
label-table
[
compute-labels
]
change
parameter-table
get
>array
literal-table
get
>array
relocation-table
get
>byte-array
label-table
get
]
compose
[
[
init-relocation
V{
}
clone
return-addresses
set
V{
}
clone
gc-maps
set
V{
}
clone
label-table
set
V{
}
clone
binary-literal-table
set
]
]
dip
[
B{
}
make
dup
check-fixup
cfg
get
[
stack-frame>>
[
total-size>>
]
[
0
]
if*
]
[
0
]
if*
]
curry
compose
call
6
narray
;
inline