Skip to content

Latest commit

 

History

History
26 lines (23 loc) · 1.06 KB

TASKS.md

File metadata and controls

26 lines (23 loc) · 1.06 KB

Parity with spec

  1. Floor division (DONE)
  2. exponentiation (DONE)
  3. Arrays (DONE)
  4. Make declaring an external function easier (DONE)
  5. to string conversion in VM itself
  6. Make Boolean a type in the expression engine so we can print it properly (DONE)
  7. Split bytecode struct into pieces (do a SOA optimization) (DONE)
  8. Move values to a constant table and make Load instructions read from this table (DONE)
  9. Add Immediate instructions for cases where one side is a constant

Features

  1. Constant folding (on AST level) Split vm math module into a runtime module so compiler can use it as well Fold +, -, *, %, /, // Possibly write a walk() and visit() interface like in the Expr library Also fold conditionals if the conditional is a constant
  2. Add constant array parsing where we identify if each element of an array is a fixed constant. Need to think through the details of this.
  3. Jump chaining (a peephole optimization)
  4. Implement local variables
  5. Implement SSA based IR
  6. Implement CSE and DCE (relies on the above 2)
  7. Implement closures