-
Notifications
You must be signed in to change notification settings - Fork 0
RoadMap
Spotandjake edited this page Jul 29, 2021
·
22 revisions
- Write a Lexer
- Write A Grammer
- Determine which parser i would like to do
- Write an analysis pass
- determine function variables and closures
- determine function flags
- Write a module linking pass
- determine what needs to be linked
- determine how linker will inject code
- determine how to deal with modules that require other modules
- write main linker
- ensure no cyclic dependency
- change the grammar for imports to support names imports
- perform macro running phase
- Write a type checking pass
- Implement a basic type checker
- add type checking of function calls.
- Write a validity check pass
- write an optimization pass
- Remove Comments from parsetree
- Remove Compiler Flags From parsetree
- perform constant propagation
- perform dead code removal
- call known functions directly
- Replace commander in cli with a custom solution
- Unit Tests
- write a basic unit testing library
- write unit tests for lexer output
- write unit tests for parser output
- write unit tests for module linking output
- write unit tests for type checker output
- write unit tests for all intermediate phases
- write unit tests for compiler output
- perform a phase for gc instruction insertion
- write a compiler phase
- add support for 64 bit pointers
- wasm imports
- strings
- wasm datatypes, i32, i64.
- add basic support for wasm datatypes
- add a way to specify that the datatypes are wasm in function call parameters
- Numbers
- negatives
- positives
- floats
- 64 bit numbers
- Rationals
- Arbitrary precision integers
- Closures
- implement closures
- allow closures to reference the function they are assigned too.
- Add in functions that correspond to wasm instructions
- write a parser
- Write A runtime in Brisk
- Write memory management
- write garbage collection
- Write A standard library
- memory access
-
memory.load(ptr: i32, offset: i32) -> i32
; -
memory.load(ptr: i32, offset: i32, data: i32) -> Void
;
-
- wagi calls
- io
- process
-
process.args() -> String[]
-
- Print function
- println
- Control flow
- if
if(condition: boolean, ifTrue: Function, ifFalse: Function) -> Void
- loop
loop(body: () -> boolean) -> Void
- When you return true the loop will continue otherwise returning false will cause a break
- if
- Math
- Addition
- Subtraction
- Division
- Multiplication
- memory access
- Write A Lexer in Brisk
- Write A Parser in Brisk
- Port the rest of Brisk from ts to js
- write all other passes, basically just changing the syntax and optimizing
- write a new compiler that does not depend on binaryen: probably the hardest part to do well.
========
- Version 1: Determine what needs to be done and get everything working
- Version 2: Rewrite Version 1, this is good because it means things are more organized because I understand what I need at which point instead of snaking stuff through
- Version 3: Remove Binaryen
- Version 4: Rewrite in itself