L1VM - overview

Here I want to show for which use cases my virtual machine L1VM can be used. I did develop my own programming language Brackets. In Brackets you can use all features of my VM. The range goes from simple CLI programs up to full GFX/GUI programs. You can write code which runs multiple threads of execution. And you can use my modules I did develop. You can write your own modules in C, if you want.

When I started my L1VM project I did know C very good. So I did write my VM in C. The clang/gcc C compiler has a killer feature for VM developers: labels as values. So you can jump to the opcodes code with a jump table. This is very fast! It reduces the code to dispatch to a minimum.

I did research in how to write a VM in Go. Well I did write a byte code compatible VM in Go. It can’t use labels as values, as this feature is not in Go! It uses a switch to branch to the opcode. This is a lot slower than my C L1VM! I know that C is not memory safe like Go and Rust are.

I did put safety functions into my C code. The memory access is checked at runtime. If a program uses a wrong index on an array, or does make a string overflow, then you get a runtime exception. So my L1VM is a lot safer as running for example C code!