You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prompt$ nekoc gotos.neko
Called from neko/Main.nml line 153
Called from core/Args.nml line 57
Called from neko/Main.nml line 68
Called from core/Array.nml line 120
Called from neko/Bytecode.nml line 320
Called from core/Core.nml line 179
Called from core/Core.nml line 212
Exception : Invalid_argument(Array.get)
Fedora 27, from packages nekovm, nekovm-devel 2.2.0-4 x86_64
Replace the last $goto and all goes well.
The text was updated successfully, but these errors were encountered:
I can reproduce it with ToT revision on FreeBSD. It looks like an out-of-bounds error from the code calculating the jump target.
$ cat go2.neko
$print("start");
next:
$print("continue");
$goto(next);
$ bin/nekoc go2.neko
Called from neko/Main.nml line 153
Called from core/Args.nml line 57
Called from neko/Main.nml line 68
Called from core/Array.nml line 120
Called from neko/Bytecode.nml line 320
Called from core/Core.nml line 179
Called from core/Core.nml line 212
Exception : Invalid_argument(Array.get)
What is interesting, is that removing the first $print makes the error go away as well:
This should be infinite loop code, I think, while experimenting with Neko programming.
Instead, the VM translation fails
Fedora 27, from packages nekovm, nekovm-devel 2.2.0-4 x86_64
Replace the last $goto and all goes well.
The text was updated successfully, but these errors were encountered: