disassemble

bc


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

Disassemble the bytecode array CODE, turning it into a list of dotted pairs, with the car containing the offset and the cdr containing assembler S-Expressions,

Bytecode

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

(    0 ($let))
(    1 ($get/val 'type-of))
(    3 ($get/val 'bc))
(    5 ($apply 1))
(    7 ($det/val 'ΓεnΣym-3))
(    9 ($drop))
(   10 ($get/val 'ΓεnΣym-3))
(   12 ($push/val :lambda))
(   14 ($=))
(   15 ($dup))
(   16 ($jt* 16))
(   19 ($drop))
(   20 ($get/val 'ΓεnΣym-3))
(   22 ($push/val :macro))
(   24 ($=))
(   25 ($dup))
(   26 ($jt* 6))
(   29 ($drop))
(   30 ($push/val #f))
(   32 ($jf* 16))
(   35 ($get/val 'disassemble/to-string))
(   37 ($get/val 'closure/code))
(   39 ($get/val 'bc))
(   41 ($apply 1))
(   43 ($apply 1))
(   45 ($jmp* 38))
(   48 ($get/val 'ΓεnΣym-3))
(   50 ($push/val :bytecode-array))
(   52 ($=))
(   53 ($jf* 12))
(   56 ($get/val 'disassemble/to-string))
(   58 ($get/val 'bc))
(   60 ($apply 1))
(   62 ($jmp* 21))
(   65 ($get/val 'throw))
(   67 ($get/val 'list))
(   69 ($push/val :type-error))
(   71 ($push/val Can't disassemble that))
(   73 ($get/val 'bc))
(   75 ($get/val 'current-lambda))
(   77 ($apply 0))
(   79 ($apply 4))
(   81 ($apply 1))
(   83 ($closure/pop))
(   84 ($ret))