Skip to content

JanBaig/Bytecode-Virtual-Machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Chapter 14 - Chunks of Bytecode
  • 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 and other languages interpret string interpolations. Maybe add support for it later on.

About

Implementing A Bytecode Virtual Machine

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages