22 Roadmap
Bobbi Webber-Manners edited this page 2018-06-18 15:32:18 -04:00

Roadmap

This is where I keep track of what to do next ...

Near-Term

  • A way to pass string literals as subroutine arguments
  • Try to squeeze the interpreter / compiler code down a bit to save memory.
    • There is duplication that can be eliminated by reorganizing the logic and/or factoring out into functions. For example, getintvar()/setintvar().
    • Also, use preprocessor to allow compiler and/or interpreter to be disabled.

Medium-Term

  • Wishlist features:
    • Multidimensional arrays
      • 2D array is implemented as array of pointers to arrays of word or byte.
      • 3D array is implemented as array of pointers to array of pointers to arrays of word or byte.
      • etc.
    • Module system
      • Would be good to make bytecode relocatable by using relative addresses
      • Need to add new relative jump / branch instructions for this)
      • Drawback is it makes the code harder to read for humans, but this can be overcome with better tools
      • Need to think about how a module system should work
      • Which is more useful: dynamic loading of modules at runtime, or static linking?
  • Optimize virtual machine bytecodes, based on study of real code
    • Compiler often writes variable, and immediately needs it again.

Long-Term

  • High performance VM
    • Hand-coded in 6502 assembly

Ground Rules

Features will only be added if:

  1. They do not increase the code size so much that it is no longer practical to run EightBall on Apple II and C64. (VIC20+32K is already a tight fit.) Contributions that reduce the code size are especially welcome!
  2. Language features must have both an interpreter and compiler implementation.