An open API service indexing awesome lists of open source software.

https://github.com/hiperiondev/stack_vm

Generic Stack VM for Scripting Languages
https://github.com/hiperiondev/stack_vm

scripting scripting-language stack virtual-machine vm

Last synced: 4 months ago
JSON representation

Generic Stack VM for Scripting Languages

Awesome Lists containing this project

README

          





Logo

Stack VM


Generic Stack VM for Scripting Languages



## About The Project
Stack VM is a virtual machine oriented towards scripting languages, especially glue ones, prioritizing low memory consumption and predictability.

It has very useful features for use in microcontrollers such as: Fixed stack size, gc per frame with optional shrink and management of both local variables in the stack and a generic heap.

Functions that are not essential must be implemented through FFI (example: strings) but have the minimum constructs so that the VM can handle them.
Also the use of native data types has generic options for use as well as the definition of external functions to be interpreted within the VM.



backtotop

## Features
- [x] Fully commented code in Doxygen format
- [x] 6 bits op (easily extendable)
- [x] An indirection register with automatic increment/decrement
- [x] Heap with automatic growth and optional shrink. Allocation management by bit mask (simple and fast)
- [x] Call with frame placement and stack space reservation for local variables
- [x] Heap management per frame with automatic release at the exit of the frame
- [x] Generic data objects in HEAP and static attribute (survive to frame GC)
- [x] Native external data management (via custom function)
- [x] Libraries for custom data types
- [x] Simple external functions (FFI)
- [x] Global variables and arrays allocated in heap
- [x] Can allocate local arrays
- [x] Arrays can contain any type of value, including arrays
- [x] Constants in the program area
- [x] Complete Assembler/Disassembler with directives easily expandable



backtotop

## Usage
See [Documentation](https://stack-vm.readthedocs.io)



backtotop

## Roadmap

See the [open issues](https://github.com/hiperiondev/stack_vm/issues) for a full list of proposed features (and known issues).



backtotop

## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!

1. Fork it ()
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request



backtotop

## License

Distributed under the MIT License. See `LICENSE.txt` for more information.



backtotop

## Contact

*Emiliano Augusto Gonzalez - egonzalez.hiperion@gmail.com*

Project Link: [https://github.com/hiperiondev/stack_vm](https://github.com/hiperiondev/stack_vm)



backtotop