Commit graph

5986 commits

Author SHA1 Message Date
Brian Carroll
e088eceb29 Generate refcounting procs in gen_dev 2021-12-02 15:41:09 +00:00
Brian Carroll
d0ef1e5b36 Route IdentIds to refcount proc generator in dev backend 2021-12-02 09:58:34 +00:00
Brian Carroll
b193483756 Refactor contents of gen_dev's main loops into helper functions 2021-12-01 22:36:43 +00:00
Richard Feldman
e6bec46898
Merge pull request #2109 from rtfeldman/refactor-passed-function
refactor passed (to higher order lowlevel) funcion
2021-12-01 08:17:39 -05:00
Brian Carroll
a3827d6636
Merge pull request #2071 from rtfeldman/refcount-mono-ir
Start generating refcounting code as mono IR
2021-12-01 12:59:16 +00:00
Folkert de Vries
d37ddeb162
Merge pull request #2113 from rtfeldman/joshuawarner32/fix-indentation-within-parens
Fix formatting of if as an left-hand-side of an operator
2021-12-01 13:38:22 +01:00
Folkert de Vries
1c7671c9ab
Merge pull request #2111 from rtfeldman/joshuawarner32/multiline-string-asserts
Make assert output for fmt+parse tests more understandable
2021-12-01 13:35:20 +01:00
Folkert
834ba77046 missed a bool 2021-12-01 12:53:47 +01:00
Joshua Warner
3228a23c98 Fix formatting of if as an left-hand-side of an operator 2021-11-30 17:53:26 -08:00
Joshua Warner
fdeafe4bab Make assert output more understandable 2021-11-30 17:48:24 -08:00
Brian Carroll
6b30ab79ac Fix release build of Wasm backend 2021-12-01 00:03:01 +00:00
Folkert
bec74c36c5 refactor passed (to higher order lowlevel) funcion 2021-11-30 21:50:27 +01:00
Richard Feldman
68e206f42c
Merge pull request #2108 from rtfeldman/implement_num_to_str
Implement Num.toStr
2021-11-30 15:34:39 -05:00
rvcas
40090f20e6 test: update tests to use Num.toStr 2021-11-30 14:56:08 -05:00
rvcas
00bd77bf1d chore: update builtin docs 2021-11-30 14:55:41 -05:00
rvcas
f995a07029 feat: Num.toStr
* add type for Num.toStr
  * create new lowlevel
  * delete types and Symbol for fromInt and fromFloat
  * leave LowLevel::{StrFromFloat,StrFromInt}
  * match on LowLevel::NumToStr and figure out the layout to decide
    which build function to delegate to
2021-11-30 14:52:06 -05:00
Ivo-Balbaert
ea742b93d5 correcting 2 typos in README.md compiler folder 2021-11-30 19:53:33 +01:00
Brian Carroll
2bb49f55f8 Doc comment for RefcountProcGenerator 2021-11-30 15:48:35 +00:00
Brian Carroll
45302d996b Update small string tests in wasm_str 2021-11-30 13:02:08 +00:00
Brian Carroll
1c3b76ba03 Fix a bug in generated refcount proc for str 2021-11-30 12:59:22 +00:00
Brian Carroll
ea64b6488c Add some disabled debugging statements 2021-11-30 12:59:03 +00:00
Brian Carroll
b1ba1d2db9 WasmBackend no longer needs any public fields, only methods 2021-11-30 10:58:03 +00:00
Brian Carroll
a08633fd36 Debugging improvements 2021-11-30 10:58:03 +00:00
Brian Carroll
8a137126fe Fix bug with linker info for refcount procs 2021-11-30 10:57:59 +00:00
Brian Carroll
22ccb6eca4 Prefix string constants with REFCOUNT_MAX 2021-11-30 09:57:31 +00:00
Brian Carroll
c2a2ff2957 Create Expr::to_pretty in mono IR 2021-11-30 09:57:26 +00:00
Brian Carroll
079a8311ec Delete HeapMemory variant of WasmLayout, just treat pointers as Primitive
When I created this (at the very beginning of the Wasm backend),
I didn't really have a clear reason for it. I just thought it might end up
making sense treat heap pointers differently from numbers, somehow.

But the semantic differences between pointers and other numbers is not relevant
to WasmLayout. The semantics are clear from where the Symbol appears in the IR.

Also we were storing heap pointers in locals, for no real reason.
And the fact that it's *different* meant a lot of new cases in match expressions,
to do the exact same thing as Primitives but with a pointless difference.

Until now, we haven't really used this variant in any of our tests.
But the refcount pointer needed it... and everything broke!
2021-11-30 09:57:00 +00:00
Brian Carroll
3581c7f5be Use readable debug names throughout refcount proc generator 2021-11-30 09:57:00 +00:00
Brian Carroll
820d9e0ab4 Register debug names for new Symbols, and refactor to avoid borrow-checker issues 2021-11-30 09:57:00 +00:00
Brian Carroll
e7d8c7c895 Make gen_wasm's Env mutable 2021-11-30 09:57:00 +00:00
Brian Carroll
f4d52f7084 Add alignment argument to Zig decref call 2021-11-30 09:57:00 +00:00
Brian Carroll
7b5fb2577b Delete unused bash scripts 2021-11-30 09:57:00 +00:00
Brian Carroll
38e3386b80 Formatting & comments 2021-11-30 09:57:00 +00:00
Brian Carroll
ebc1fd6880 Get rid of special ModuleId for refcounting code 2021-11-30 09:57:00 +00:00
Brian Carroll
9bb5335c8d Delete unused tests 2021-11-30 09:57:00 +00:00
Brian Carroll
2ad032f894 Integrate refcount proc generator with Wasm backend 2021-11-30 09:57:00 +00:00
Brian Carroll
61575cea7e Generate calls to refcount procs from Wasm backend 2021-11-30 09:57:00 +00:00
Brian Carroll
985fa9dade Generate refcounting code as IR 2021-11-30 09:57:00 +00:00
Brian Carroll
264927fb85 Wasm code gen for new refcount lowlevels 2021-11-30 09:57:00 +00:00
Brian Carroll
6e5acadfea Create new lowlevels for refcounting 2021-11-30 09:57:00 +00:00
Brian Carroll
c8278dcb1c Add a comment on REFCOUNT_MAX 2021-11-30 09:57:00 +00:00
rvcas
6305947b1a fix: exclude gen-dev from gen_list test compilation 2021-11-29 18:08:12 -05:00
rvcas
27e77f446f feat(wasm): implement EmptyArray 2021-11-29 15:08:52 -05:00
rvcas
7657d5b192 test: enable wasm in gen_list 2021-11-29 15:06:45 -05:00
Richard Feldman
adb8ff881c
Merge pull request #2096 from rtfeldman/alias-analysis-pull-heap-cell-out
alias analysis: recursive tag union refactor
2021-11-29 09:27:54 -05:00
Folkert de Vries
167af34d4b
Merge pull request #2097 from rtfeldman/wasm-empty-record
Wasm empty record
2021-11-29 13:15:40 +01:00
Brian Carroll
1f747e971f Clippy & fmt 2021-11-29 01:09:31 +00:00
Brian Carroll
dcd4914ac1 Fix and enable tests involving empty records 2021-11-29 00:57:28 +00:00
Brian Carroll
88bf6bf1b7 Clean up Wasm calling convention code 2021-11-29 00:17:45 +00:00
Folkert
ab1787937d shrink CallSpecId and UpdateModeId to u32; assuming a 4GiB file that should be more than enough 2021-11-28 22:59:23 +01:00