assemble*

code


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

Assemble all arguments into a single :bytecode-array

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 'tree/new))
(    2 ($push/nil))
(    3 ($apply 1))
(    5 ($det/val 'sym-map))
(    7 ($drop))
(    8 ($get/val 'array/new))
(   10 ($push/nil))
(   11 ($apply 1))
(   13 ($det/val 'lit-arr))
(   15 ($drop))
(   16 ($get/val 'assemble/build-lit-arr))
(   18 ($get/val 'assemble/flatten))
(   20 ($get/val 'code))
(   22 ($apply 1))
(   24 ($get/val 'lit-arr))
(   26 ($apply 2))
(   28 ($det/val 'tmp))
(   30 ($drop))
(   31 ($get/val 'assemble/build-sym-map))
(   33 ($get/val 'tmp))
(   35 ($get/val 'sym-map))
(   37 ($push/int/byte 0))
(   39 ($apply 3))
(   41 ($drop))
(   42 ($get/val 'array/allocate))
(   44 ($get/val 'tree/ref))
(   46 ($get/val 'sym-map))
(   48 ($push/val :last-op))
(   50 ($apply 2))
(   52 ($apply 1))
(   54 ($det/val 'out))
(   56 ($drop))
(   57 ($get/val 'assemble/emit-relocated-ops))
(   59 ($get/val 'tmp))
(   61 ($get/val 'sym-map))
(   63 ($push/int/byte 255))
(   65 ($get/val 'out))
(   67 ($apply 4))
(   69 ($drop))
(   70 ($get/val 'arr->bytecode-arr))
(   72 ($get/val 'out))
(   74 ($get/val 'lit-arr))
(   76 ($apply 2))
(   78 ($ret))