Commit graph

7030 commits

Author SHA1 Message Date
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
Chelsea Troy
6cf755ad8d Resolve a bunnnch of merge conflicts 2021-11-29 23:14:29 -06:00
Chelsea Troy
50e0bee22f Fix test for string literal 2021-11-29 22:25:28 -06: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
Brian Carroll
27af5897d1 Handle zero-size structs 2021-11-28 21:04:40 +00:00
Brendan Hansknecht
fd9a9fad72
Merge pull request #2094 from rtfeldman/gen-dev/remove-results
Gen dev/remove results
2021-11-28 10:28:31 -08:00
Folkert
5b8c63d292 move the heap cell out of the union 2021-11-28 17:51:43 +01:00
Folkert
92cca127b1 refactor 2021-11-28 16:08:11 +01:00
Folkert
8bcb985a80 always also add heap cell to nulled tags 2021-11-28 15:53:05 +01:00
Folkert
537cf69344 add helper for adding a heap cell to values 2021-11-28 15:41:46 +01:00
Folkert
aefe719e56 hook up update mode for reset/reuse 2021-11-28 14:25:51 +01:00
Folkert
0bdda2506c add update mode to reset and reuse 2021-11-28 14:13:02 +01:00
Folkert
1241d5ccbd make UpdateModeIds a proper type 2021-11-28 14:03:48 +01:00
Folkert de Vries
8eb74da0f3
Merge pull request #2083 from rtfeldman/layout-soa
Layout Struct of Arrays
2021-11-28 12:43:37 +01:00
Richard Feldman
f80409800d
Merge pull request #2091 from rtfeldman/remove-empty-layouts
Remove empty layouts
2021-11-27 23:32:15 -05:00
Brendan Hansknecht
eff4da1938 appease clippy 2021-11-27 17:03:55 -08:00
Brendan Hansknecht
55f0329e5c Merge remote-tracking branch 'origin/trunk' into gen-dev/remove-results 2021-11-27 16:57:00 -08:00
Brendan Hansknecht
a63dd1eb61 use unimplemented! and internal_error! instead of result in dev backend 2021-11-27 12:38:29 -08:00
Brendan Hansknecht
57d9ce3fdd
Merge pull request #2043 from rtfeldman/dev-backend-num-is-zero
add x86_64 Int is zero support for gen_dev
2021-11-27 09:53:59 -08:00
Folkert
3d1035a11f fix bug with lists and * type variables 2021-11-27 16:57:50 +01:00
Folkert
79d5c82dfb cleanup 2021-11-27 16:36:43 +01:00