Skip to content

jasukej/binterpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Binterpreter

A simple bytecode interpreter with a compiler frontend. Largely based off Bob Nystrom's clox in the book Crafting Interpreters, with more advanced garbage collection (Generational GC) to better simulate modern runtimes.

Prerequisites

  • gcc
  • make

Build

make

The build output can be found in out/binterpreter. The executable current runs as a REPL.

Running a source file

WIP

Debugging

Compile with the following to:

  • Print compiled bytecode chunk: make CFLAGS="-Wall -Wextra -Isrc -g -fsanitize=address -DDEBUG_PRINT_CODE"
  • Trace VM execution: make CFLAGS="-Wall -Wextra -Isrc -g -fsanitize=address -DDEBUG_TRACE_EXECUTION

About

bytecode interpreter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages