Joshua Warner
82d2be0635
Introduce LineColumnRegion and force conversion
2022-01-01 18:20:05 -08:00
Joshua Warner
721233f9c8
More incremental changes
2022-01-01 18:20:05 -08:00
Joshua Warner
1b257da356
Make State::xyzlcol a LineColumn, and change everything wanting a Position to use State::pos() instead
2022-01-01 18:20:05 -08:00
Joshua Warner
d2dcb462c7
Rename State::pos -> xyzlcol, temporarily
2022-01-01 18:20:05 -08:00
Joshua Warner
bd7b1e5013
Make Loc::new take Positions
2022-01-01 18:20:05 -08:00
Brian Carroll
1de26c084d
Make Struct DecRef a no-op
2022-01-01 21:57:28 +00:00
Brian Carroll
98ab97083a
For DecRef, remove assumption that the refcounted symbol is ARG_1
2022-01-01 21:57:28 +00:00
Brian Carroll
176bb6f6aa
Use joinpoints for DecRef
2022-01-01 21:57:28 +00:00
Brian Carroll
e55806fe27
Update is_rc_implemented_yet
2022-01-01 12:33:36 +00:00
Brian Carroll
8078afc74f
Delete a stray println from debug
2022-01-01 11:39:55 +00:00
Brian Carroll
953d82b341
Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-refcount-struct
2022-01-01 11:33:27 +00:00
Brian Carroll
310de090a3
Wasm: Refcounting for struct fields
2022-01-01 11:32:53 +00:00
Richard Feldman
7476c2faf2
Merge pull request #2308 from rtfeldman/fix-2279
...
evaluate imported thunk when assigned to variable
2021-12-31 20:32:16 -05:00
Brian Carroll
ff0c0766ad
Note on why refcount tests need result type
2021-12-31 23:53:51 +00:00
Brian Carroll
12a330dd76
Refactor to move all refcount IR gen to the same file
2021-12-31 23:09:11 +00:00
Brian Carroll
6fabeb345b
edit comment
2021-12-31 21:23:15 +00:00
Brian Carroll
4a6b79b686
Wasm tests: Skip linking step (and all filesystem access) when not needed
2021-12-31 21:23:15 +00:00
Brian Carroll
84661b7ae1
Rename BuildType -> TestType
2021-12-31 21:23:15 +00:00
Brian Carroll
01f293125a
Delete debug code that has been superseded
2021-12-31 21:23:15 +00:00
Brian Carroll
a2e58f8530
Split wasm test code into smaller well-named functions
2021-12-31 21:23:15 +00:00
Brian Carroll
d66d432716
Wasm tests: speed up 3x by only exporting refcount symbols when used
...
49s vs 2m10s
2021-12-31 21:23:15 +00:00
Folkert
ee9f0b2f04
force imported thunks when assigned to a variable
2021-12-31 21:44:07 +01:00
Folkert
2c97c840fc
walk the chain till we find a tag union to make recursive
2021-12-31 14:26:23 +01:00
Brian Carroll
f767014f30
Merge pull request #2301 from rtfeldman/wasm-refcount-list
...
Wasm refcounting for lists
2021-12-31 13:25:38 +00:00
Richard Feldman
4c62e335e5
Merge pull request #2305 from rtfeldman/soundness-assignment-tag-destructure
...
Parse tag destructures in defs, and make sure they are type-checked as closed unions
2021-12-31 07:13:03 -05:00
ayazhafiz
f56754a539
Remove bad test
...
We shouldn't expect to generate code for tag destructures that are type
errors
2021-12-30 20:59:59 -06:00
ayazhafiz
983a9f7e17
Position correct basic block before calling error catcher
...
While building the main function for tests, we may need to generate
additional blocks while marshalling arugments to the error catcher into
the expected calling convention. This pushes the last block in the main
function down, so that the "entry" block may not be last BB in the
function. Instead, look up the last insertion block before generating
the catcher, and then add a call to the catcher at the end of this last
block.
Closes #2300
2021-12-30 20:55:43 -06:00
ayazhafiz
8e7ca57458
Close tag unions that are in the left hand side of an assignment
2021-12-30 19:51:14 -06:00
ayazhafiz
0c81302d29
Admit tag destructuring in definitions
2021-12-30 19:50:50 -06:00
ayazhafiz
fda6c70835
Mark patterns in lambda argument position as having a presence constraint
...
Closes #2299
2021-12-30 18:21:28 -06:00
Brian Carroll
101ac69de2
Disable refcounting test code when not in use
2021-12-30 20:00:25 +00:00
Folkert de Vries
aaa041cee5
Merge pull request #2295 from rtfeldman/wasm-refcount-tests
...
Create code gen tests for refcounting
2021-12-30 19:31:41 +01:00
Brian Carroll
c5663e3538
Generate IR helper proc for list refcounting
2021-12-30 17:15:31 +00:00
Brian Carroll
e612f51905
Tweak wasm test platform
2021-12-30 15:45:20 +00:00
Brian Carroll
83d6c82e0b
Wasm: avoid two memory loads for ListLen, at the cost of +1 instruction byte
2021-12-30 15:40:55 +00:00
Brian Carroll
0912f8fd45
Wasm: replace a local.set/get pair with a local.tee
2021-12-30 15:40:00 +00:00
Brian Carroll
acade33497
Wasm bugfix: allocate using the heap alignment, not the stack alignment
2021-12-30 15:37:09 +00:00
Brian Carroll
eeb4b20390
Improve string refcounting tests
2021-12-30 09:09:07 +00:00
Brian Carroll
59472d3310
Slightly improve pretty printing of inc statement
2021-12-30 09:01:22 +00:00
ayazhafiz
d966d8921f
Support nullable wrapped tag union layouts in REPL
2021-12-29 17:55:21 -06:00
ayazhafiz
f52cca40b5
Dereference small (non recursive) tag unions before storing them elsewhere
...
Closes #2290
2021-12-29 17:55:21 -06:00
ayazhafiz
71bd77e3b2
Handle flat variants of recursive tag unions in repl
2021-12-29 17:55:21 -06:00
ayazhafiz
6da9a58b22
Remove some dead code
2021-12-29 17:55:21 -06:00
rvcas
e7825127d6
Merge branch 'trunk' into str_to_num
2021-12-29 18:17:33 -05:00
Brian Carroll
6b932f9743
Clarify some lowlevel code to make it clearer what to do when adding new ones
2021-12-29 22:11:33 +00:00
rvcas
d0c4072362
fix:(llvm): StrToNum is safer if we match on either a Union or a Struct
2021-12-29 16:26:15 -05:00
Brian Carroll
f90d9a74bd
Do not inline builtin wrapper for Str.toNum
2021-12-29 21:08:16 +00:00
Brian Carroll
7aa3f77b3c
Handle freed values in refcount tests
2021-12-29 17:31:05 +00:00
Brian Carroll
4d2e4d454b
Create code gen tests for refcounting
2021-12-29 16:48:43 +00:00
rvcas
2cfd49f941
Merge branch 'trunk' into str_to_num
2021-12-28 21:39:10 -05:00