Handbook
Glossary
inline-new ( class -- quot/f )
Vocabulary
compiler
.
tree
.
propagation
.
transforms
Inputs
class
an
object
Outputs
quot/f
an
object
Definition
USING:
accessors
classes.struct
classes.tuple
classes.tuple.private
combinators
kernel
quotations
sequences
stack-checker.dependencies
;
IN:
compiler.tree.propagation.transforms
:
inline-new
( class -- quot/f )
{
{
[
dup
struct-class?
]
[
dup
dup
struct-slots
add-depends-on-struct-slots
[
<struct>
]
curry
]
}
{
[
dup
tuple-class?
]
[
dup
tuple-layout
[
add-depends-on-tuple-layout
]
[
drop
all-slots
[
initial>>
literalize
]
[
]
map-as
]
[
nip
]
2tri
[
<tuple-boa>
]
curry
compose
]
}
[
drop
f
]
}
cond
;