Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/janbaig/bytecode-virtual-machine
- Owner: JanBaig
- Created: 2022-11-20T01:17:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-01T13:12:56.000Z (about 1 year ago)
- Last Synced: 2023-09-02T10:44:05.771Z (about 1 year ago)
- Topics: bytecode-compiler, interpreter, virtual-machine
- Language: C
- Homepage:
- Size: 91.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 ValuesAll 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.