There are two different types of names.
Vm
function command names are used by VM
call commands. The name must be unmodified so that
call commands in other VM files can call the function. For example, the VM command
function Sys.main
generates the assembly language label
(Sys.main)
Vm
label command names are used by VM
goto and
if-goto commands to build loops and conditional code within individual functions. A
label command in function Main.main may use the same name as a
label command in function Main.run, so the name must be modified.
The suggested modification is to combine the name of the current function with the
label command's name using a '$' character. For example
function Main.main
...
label loop
...
goto loop
...
function Main.run
...
label loop
...
goto loop
generates the assembly language
(Main.main)
...
(Main.main$loop)
...
@Main.main$loop
0;JMP
...
(Main.run)
...
(Main.main$run)
...
@Main.main$run
0;JMP