array/cut

arr start end


Summary

Return a newly allocated array with the values of ARR from START to END

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 'max))
(    2 ($push/int/byte 0))
(    4 ($get/val 'start))
(    6 ($apply 2))
(    8 ($set/val 'start))
(   10 ($drop))
(   11 ($get/val 'min))
(   13 ($get/val 'array/length))
(   15 ($get/val 'arr))
(   17 ($apply 1))
(   19 ($get/val 'end))
(   21 ($apply 2))
(   23 ($set/val 'end))
(   25 ($drop))
(   26 ($get/val 'array/allocate))
(   28 ($get/val 'max))
(   30 ($push/int/byte 0))
(   32 ($get/val 'end))
(   34 ($get/val 'start))
(   36 ($sub))
(   37 ($apply 2))
(   39 ($apply 1))
(   41 ($det/val 'ret))
(   43 ($drop))
(   44 ($get/val 'start))
(   46 ($det/val 'i))
(   48 ($drop))
(   49 ($push/nil))
(   50 ($jmp* 31))
(   53 ($drop))
(   54 ($get/val 'array/set!))
(   56 ($get/val 'ret))
(   58 ($get/val 'i))
(   60 ($get/val 'start))
(   62 ($sub))
(   63 ($get/val 'array/ref))
(   65 ($get/val 'arr))
(   67 ($get/val 'i))
(   69 ($apply 2))
(   71 ($apply 3))
(   73 ($drop))
(   74 ($get/val 'i))
(   76 ($push/int/byte 1))
(   78 ($add/int))
(   79 ($set/val 'i))
(   81 ($get/val 'i))
(   83 ($get/val 'end))
(   85 ($<))
(   86 ($jt* -33))
(   89 ($drop))
(   90 ($get/val 'ret))
(   92 ($ret))
(   93 ($ret))