Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/janbaig/bytecode-virtual-machine

Learning about and Implementing A Bytecode Virtual Machine
https://github.com/janbaig/bytecode-virtual-machine

bytecode-compiler interpreter virtual-machine

Last synced: 3 days ago
JSON representation

Learning about and Implementing A Bytecode Virtual Machine

Awesome Lists containing this project

README

        

# Bytecode-Virtual-Machine

A Bytecode Virtual Machine (VM) written in `C`. To avoid the overhead of traversing an AST, a bytecode representation is introduced. The `scanner` outputs tokens which are later given as input to the `compiler` to generate bytecode - similar to assembly code although magnitudes simpler with a limited set of instructions. The generated bytecode is later given as input to the `VM` that then executes and displays the output.

## Challenges Completed
- [x] Chapter 14 - Chunks of Bytecode
- [x] Chapter 15 - A Virtual Machine
- [ ] Chapter 16 - Scanning on Demand
- [ ] Chapter 17 - Compiling Expressions
- [ ] Chapter 18 - Types of Values

All solutions can be found in the `./challenges` folder

## Potential Improvements to Solutions

- [ ] (Chp15/#4) - Look into ways to more accurately measure performance. How is the memory/CPU affected?
- [ ] (Chp16/#1) - Understand how [Wren](https://github.com/wren-lang/wren/tree/8fae8e4f1e490888e2cc9b2ea6b8e0d0ff9dd60f) and other languages interpret string interpolations. Maybe add support for it later on.