path/dirname

path


Summary

Return the directory part of a PATH

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 'last-index-of))
(    2 ($get/val 'path))
(    4 ($push/val /))
(    6 ($apply 2))
(    8 ($det/val 'last-slash))
(   10 ($drop))
(   11 ($get/val 'last-slash))
(   13 ($push/int/byte 0))
(   15 ($>=))
(   16 ($jf* 16))
(   19 ($get/val 'string/cut))
(   21 ($get/val 'path))
(   23 ($push/int/byte 0))
(   25 ($get/val 'last-slash))
(   27 ($apply 3))
(   29 ($jmp* 5))
(   32 ($push/val ))
(   34 ($ret))