$push/int/byte

a


Warning

This function is declared internal, so there are no guarantees whatsoever regarding its existence or functionality.

Have fun playing around with the internals but please try not to use any of these in any library or application.

Summary

() -> (a) --- Push A on the stack as an :int that fits within a byte

Bytecode

Probably only interesting to you if you want to understand more about the Nujel VM or care very much about performance.

(    0 ($get/val 'int-fit-in-byte?))
(    2 ($get/val 'a))
(    4 ($apply 1))
(    6 ($jf* 7))
(    9 ($push/nil))
(   10 ($jmp* 21))
(   13 ($get/val 'throw))
(   15 ($get/val 'list))
(   17 ($push/val :invalid-bc-op))
(   19 ($push/val $push/int/byte can only push a signed 8-bit value))
(   21 ($get/val 'a))
(   23 ($get/val 'current-lambda))
(   25 ($apply 0))
(   27 ($apply 4))
(   29 ($apply 1))
(   31 ($drop))
(   32 ($get/val 'list))
(   34 ($push/val #$2))
(   36 ($get/val 'int->bytecode-op))
(   38 ($get/val 'a))
(   40 ($apply 1))
(   42 ($apply 2))
(   44 ($ret))