Using the branch and jump instruction without labels is a bit tedious and error prone.
It would be nice to have labels that get resolved to the instruction index when compiling.
Could be simple as a fake instruction that looks like label somelabel and it gets removed from the resulting bytecode but all "somelabel" identifiers turns into the proper instruction index
Actually we need a construct of a target which can either be an exact index or a label name and on compilation we just add the "label " to some table in the function which can be referenced at run time by a target
Using the branch and jump instruction without labels is a bit tedious and error prone.
It would be nice to have labels that get resolved to the instruction index when compiling.
Could be simple as a fake instruction that looks like
label somelabel
and it gets removed from the resulting bytecode but all "somelabel" identifiers turns into the proper instruction index