Skip to content

norlen/clox-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clox-rust

Work in progress implementing the lox bytecode compiler and virtual machine.

Main differences currently from the reference implementation is the Objects are all separate values so the types can be checked and there are no global variables. The messiest part is probably the GC which should be refactored.

Usage

For computationally intensive programs it will be really slow without the release flag.

Build

cargo build

Run

cargo run -- <file> to run a file, otherwise cargo run will start it a REPL.

Progress

  • 14. Chunks of Bytecode
  • 15. A Virtual Machine
  • 16. Scanning on Demand
  • 17. Compiling Expressions
  • 18. Types of Values
  • 19. Strings
  • 20. Hash Tables using std::collections::HashMap instead
  • 21. Global Variables
  • 22. Local Variables
  • 23. Jumping Back and Forth
  • 24. Calls and Functions
  • 25. Closures
  • 26. Garbage Collection
  • 27. Classes and Instances
  • 28. Methods and Initializers
  • 29. Superclasses
  • 30. Optimization

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages