Handbook
Glossary
check-node* ( node -- )
Vocabulary
compiler
.
tree
.
checker
Inputs
node
an
object
Outputs
None
Definition
IN:
compiler.tree.checker
GENERIC:
check-node*
( node -- )
Methods
USING:
arrays
compiler.tree
compiler.tree.checker
;
M:
#copy
check-node*
inputs/outputs
2array
check-lengths
;
USING:
accessors
arrays
compiler.tree
compiler.tree.checker
compiler.tree.recursive
kernel
;
M:
#enter-recursive
check-node*
[
[
label>>
enter-out>>
]
[
out-d>>
]
bi
assert=
]
[
[
in-d>>
]
[
out-d>>
]
bi
2array
check-lengths
]
[
recursive-phi-in
check-lengths
]
tri
;
USING:
accessors
arrays
columns
compiler.tree
compiler.tree.checker
kernel
;
M:
#phi
check-node*
[
[
phi-in-d>>
<flipped>
]
[
out-d>>
]
bi
2array
check-lengths
]
[
phi-in-d>>
check-lengths
]
bi
;
USING:
accessors
compiler.tree
compiler.tree.checker
kernel
sequences
;
M:
#push
check-node*
out-d>>
length
1
=
[
"Bad #push"
throw
]
unless
;
USING:
arrays
compiler.tree
compiler.tree.checker
;
M:
#return-recursive
check-node*
inputs/outputs
2array
check-lengths
;
USING:
accessors
assocs
compiler.tree
compiler.tree.checker
kernel
sequences
sets
;
M:
#shuffle
check-node*
[
[
mapping>>
values
]
[
[
in-d>>
]
[
in-r>>
]
bi
append
]
bi
subset?
[
"Bad mapping inputs"
throw
]
unless
]
[
[
mapping>>
keys
]
[
[
out-d>>
]
[
out-r>>
]
bi
append
]
bi
set=
[
"Bad mapping outputs"
throw
]
unless
]
bi
;
USING:
compiler.tree
compiler.tree.checker
kernel
;
M:
node
check-node*
drop
;