Handbook
Glossary
binary-constant-fold* ( x y insn -- z )
Vocabulary
compiler
.
cfg
.
value-numbering
.
folding
Inputs
x
an
object
y
an
object
insn
an
object
Outputs
z
an
object
Definition
IN:
compiler.cfg.value-numbering.folding
GENERIC:
binary-constant-fold*
( x y insn -- z )
Methods
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
math
;
M:
##add-imm
binary-constant-fold*
drop
+
;
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
math
;
M:
##and-imm
binary-constant-fold*
drop
bitand
;
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
math
;
M:
##mul-imm
binary-constant-fold*
drop
*
;
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
math
;
M:
##or-imm
binary-constant-fold*
drop
bitor
;
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
math
;
M:
##sar-imm
binary-constant-fold*
drop
neg
shift
;
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
math
;
M:
##shl-imm
binary-constant-fold*
drop
shift
;
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
layouts
math
math.bitwise
;
M:
##shr-imm
binary-constant-fold*
drop
[
cell-bits
2^
wrap
]
dip
neg
shift
;
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
math
;
M:
##sub-imm
binary-constant-fold*
drop
-
;
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
math
;
M:
##xor-imm
binary-constant-fold*
drop
bitxor
;