Commit Graph

33 Commits

Author SHA1 Message Date
Emi Simpson a673db77ca
BUG: Codegen optimization for + failed to fire 2024-03-17 10:00:56 -04:00
Emi Simpson 37c809f5c0
Restructure how builtins work to improve inspectability 2024-03-17 09:03:23 -04:00
Emi Simpson b0ccfc6309
Optimization: Special case for simplying recursive let bindings codegen 2024-03-16 22:23:06 -04:00
Emi Simpson 6f89dfa1c5
Optimization: Remove redundant let expressions 2024-03-16 22:21:02 -04:00
Emi Simpson 719de87ea9
Perform match elimination at IR generation rather than codegen 2024-03-16 19:42:09 -04:00
Emi Simpson e6d8933ccf
BUG: Substitution does not penetrate Switch expressions 2024-03-16 18:08:40 -04:00
Emi Simpson 55fa7add0e
Add special case to improve quality of generated code for simple functions 2024-03-16 09:36:30 -04:00
Emi Simpson 79deebabf4
Fix bug: Recursion shares a single variable between all stack frames when compiling to JS 2024-03-16 09:18:41 -04:00
Emi Simpson 2238d363e5
Generate slightly smaller code for switch and let 2024-03-15 20:21:48 -04:00
Emi Simpson 237c83f511
Fix bug: Switch statements crash when switching to the fallback branch 2024-03-15 20:21:48 -04:00
Emi Simpson f04553ac4d
Clean up some type errors
And in doing so, fix some real errors and remove some unused code
2024-03-15 20:21:47 -04:00
Emi Simpson 7b59e21183
Improve compilation output for builtins in special contexts 2024-03-15 20:21:47 -04:00
Emi Simpson fbcbe0215a
Hide builtins from compilation output 2024-03-15 20:21:47 -04:00
Emi Simpson d0ebd8cfa5
Make compiled bindings const 2024-03-15 20:21:46 -04:00
Emi Simpson 88399fff69
Implement compilation 2024-03-15 20:21:46 -04:00
Emi Simpson 8f69581893
Pair down generated js a bit 2024-03-15 20:21:45 -04:00
Emi Simpson cdf33bd6da
Add compilation to JavaScript 2024-03-15 20:21:45 -04:00
Emi Simpson 792674797d
Buggy typechecking 2024-03-15 20:21:43 -04:00
Emi Simpson 224ec0bc98
Add a repl 2024-03-15 20:21:42 -04:00
Emi Simpson 0383bc5b82
Take out the old recursion thingy 2024-03-15 20:21:42 -04:00
Emi Simpson a49b7b5baf
Add let statements 2024-03-15 20:21:42 -04:00
Emi Simpson c27852daba
Add in IR generation 2024-03-15 20:21:42 -04:00
Emi Simpson 206c0a0ec0
Start making a grammar then realize there's a builtin json parser 2024-03-15 20:21:41 -04:00
Emi Simpson 6f0d15ee3f
Finagle some types and imports 2024-03-15 20:21:39 -04:00
Emi Simpson fe8d9b766c
Allow hashing clauses 2024-03-15 20:21:38 -04:00
Emi Simpson ad4ed220b6
Add sub_all_clause 2024-03-15 20:21:36 -04:00
Emi Simpson 8d3edb1ea8
Add a notation of cantions 2024-03-15 20:21:35 -04:00
Emi Simpson 1cf1acaa08
Add in support for unification 2024-03-15 20:21:35 -04:00
Emi Simpson eacf7542e5
Fixed order in Subst __repr__ 2024-03-15 20:21:34 -04:00
Emi Simpson ad31d63450
Implement substitution 2024-03-15 20:21:34 -04:00
Emi Simpson 0fef3804a4
Use strings in IR rather than lexemes 2024-03-15 20:21:34 -04:00
Emi Simpson ad012184c5
Add docs 2024-03-15 20:21:34 -04:00
Emi Simpson f84a340f0a
Factor out IR and Tok 2024-03-15 20:21:33 -04:00