\ fixnum-bitand [
"x" operand "y" operand "x" operand AND
] H{
{ +input { { f "x" } { f "y" } } }
{ +output { "x" } }
} define-intrinsic
This overrides the fixnum-bitand primitive in compiled code; instead of a call to the runtime function being compiled, it instead generates an AND instruction by calling the assembler word 'AND' with some arguments.
I think this is very neat and clean. I wonder if anybody find a use for this feature outside of the compiler core.
2 comments:
What makes something an intrinsic?
A word which has special behavior when compiled -- basically a primitive for which efficient inline assembly is providd.
Post a Comment