Description
The existing system uses the Virtual Machine framework where the program which is written in Go is parsed into an Abstract Syntax Tree (AST) by PeggyJS, which is then compiled into Virtual Machine (VM) Instructions, then the executor will execute these instructions to run the program.
In the current project, the following features are supported in addition to the existing system:
- Functions returning multiple values at once
- Structs
- Pointers
Some enhancements to the existing system include:
- Fixing arrays being passed into functions to be immutable (mutation only on the copy of the array)
- Memory layout of arrays to be contiguous
- Goroutines using the copy of the variables instead of the actual variable in the caller function