Ayaz Hafiz
45aa9768f7
Hide lambda set runtime representation
2023-01-11 14:38:42 -06:00
Ayaz Hafiz
fa8effd3e8
Make all layouts interned in mono
2023-01-11 14:38:41 -06:00
Folkert
cf15654ee5
implement standard as patterns in mono IR
2023-01-11 14:18:13 +01:00
Richard Feldman
94ccb0fd8d
Merge pull request #4849 from roc-lang/intern-layouts-5-lambda-set-layout-cache
...
Reduce layout intern allocations
2023-01-10 20:35:09 -05:00
Ayaz
9a146d80a4
Merge pull request #4874 from roc-lang/borrow-own-host-exposed
...
force host-exposed to always own params
2023-01-10 14:09:09 -06:00
Folkert
a9cd6c6832
test forcing host-exposed always owning params
2023-01-10 19:17:39 +01:00
Ayaz
73020ca696
Merge pull request #4869 from roc-lang/josh-recursive-union-bug-2
...
Skip nullable ID in nullable wrapped tags when iterating
2023-01-10 12:05:42 -06:00
Ayaz Hafiz
ce717dca8b
Do not require allocating Layouts in arena before interning
...
This should reduce memory spend, the interner has its own effective
arena anyway
2023-01-10 09:47:13 -06:00
Folkert de Vries
61a2091b27
Merge pull request #4851 from JTeeuwissen/main
...
replace borrowed boolean with ownership enum
2023-01-09 23:24:39 +01:00
Ayaz Hafiz
b2688dd3b1
Skip nullable ID in nullable wrapped tags when iterating
2023-01-09 11:54:51 -06:00
J.Teeuwissen
b28b32cdc4
moved Ownership to borrow
2023-01-09 18:15:34 +01:00
Ayaz
7c61d0d278
Merge pull request #4843 from roc-lang/pattern-as-can
...
Pattern as can
2023-01-08 19:36:40 -06:00
J.Teeuwissen
1f10d0cb92
Added traits and updated remaining borrowed
2023-01-05 12:02:20 +01:00
Folkert
1c1112ec35
Merge remote-tracking branch 'origin/main' into glue-getters-rtfeldman
2023-01-04 20:45:01 +01:00
J.Teeuwissen
09f9df1f40
specification
2023-01-04 15:43:21 +01:00
J.Teeuwissen
6c95bc1fb9
replace borrowed boolean with ownership enum
2023-01-04 13:30:42 +01:00
Ayaz Hafiz
fdbc0ebdad
Thread LayoutInterner trait through
2023-01-03 11:48:46 -06:00
Folkert
905341d849
can for normal (no-list) as
2022-12-31 15:46:11 +01:00
Ayaz Hafiz
972046445b
Lift Niche from just captures-niche to generic niche
2022-12-29 18:43:26 -06:00
Ayaz
ea53a50447
Merge pull request #4836 from roc-lang/intern-layouts-2
...
Intern list element layouts and thread mut layout interner through LLVM backend
2022-12-29 18:41:35 -06:00
Ayaz
858670fac7
Merge pull request #4833 from roc-lang/intern-layouts
...
Intern all the layouts
2022-12-29 18:28:44 -06:00
Ayaz Hafiz
d6669aed2e
Don't assume tag id is in the tag arguments in making decision tree
2022-12-29 12:26:13 -06:00
Ayaz Hafiz
3aab378bab
Correct pattern matching of nullable wrapped tag unions
...
The nullable ID always has zero tags. For everything else, we should
just match with the arity of the number of arguments, which doesn't
include the tag ID.
2022-12-29 12:22:05 -06:00
Ayaz Hafiz
e4b5252e51
List takes interned element
2022-12-29 08:52:37 -06:00
Ayaz Hafiz
7045001f64
Intern captures layouts
2022-12-28 17:05:04 -06:00
Ayaz
b400851586
Merge branch 'main' into i4717
...
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-12-27 18:58:16 -06:00
Ayaz Hafiz
23fc7f1413
Appropriately substitute symbols in switch conditions
...
Closes #4557
2022-12-27 12:29:23 -06:00
Ayaz Hafiz
d23d0b9b88
Remove unneeded branch when extending lambda dispatch with closure args
...
If we pass ClosureInfo that indicates that a lambda captures, then when
we extend the lambda's argument list with the lambda set it appears it,
the extension must necessarily be material.
2022-12-27 10:56:23 -06:00
Ayaz Hafiz
25117bf50e
More do not ignore the specialized layout
2022-12-27 10:52:47 -06:00
Ayaz Hafiz
6ed1ad9fd5
Do not ignore layout, base it off specialization
2022-12-27 10:48:24 -06:00
Ayaz Hafiz
468f76a424
Remove unused layout cache parameters
2022-12-27 10:39:44 -06:00
Ayaz Hafiz
3e906855e3
Extend called lambda argument lists only with explicit lambda names
2022-12-27 10:37:25 -06:00
Ayaz Hafiz
679557e44e
ProcLayout::new is crate-public
2022-12-27 10:33:38 -06:00
Ayaz Hafiz
8431b27282
Remove redundant parameter in from_raw_named
...
The captures niche is already accounted for by the lambda name, so we
don't need that as an extra param.
2022-12-27 10:30:07 -06:00
Ayaz Hafiz
0b57d2f74f
Remove unneeded import
2022-12-27 10:27:19 -06:00
Ayaz Hafiz
198417c183
Remove ProcLayout::from_raw
2022-12-27 10:25:43 -06:00
Ayaz Hafiz
7a6e68861c
Account for non-capturing functions in larger lambda sets passed to HOLLs
...
Previously, if the lambda set passed to a HOLL contained any function
that captured, we would assume that the specialization of the HOLL we
should make for each function in the lambda set that we dispatch to
should capture.
This is not right. Instead, we should specialize for each lambda in the
set passed to the HOLL. The present patch enforces that, making sure
that for each lambda in the set, we compute the exact proc layout needed
to call the lambda, based on the captures of the specific lambda in the
set, rather than looking at the set entirely.
2022-12-27 10:22:18 -06:00
Ayaz Hafiz
bb0493918e
Update more usages of from_raw
2022-12-27 09:54:18 -06:00
Ayaz Hafiz
ccd68b70e1
Do not associate top-level accessor thunks as closures
...
Leftover follow-up to #4645
2022-12-27 09:49:51 -06:00
Ayaz Hafiz
fe58a0591b
Migrate some more uses of from_raw
2022-12-27 09:27:29 -06:00
Ayaz Hafiz
54bb258aac
Remove stale uniqueness inference comment
2022-12-27 09:26:08 -06:00
Ayaz Hafiz
1e847efbfe
Correctly choose specialized shapes for anonymous closures
2022-12-27 09:18:41 -06:00
Ayaz Hafiz
593344f5c5
Determine the proc layout based on captures of an individual lambda
...
Previously, we determined whether a closure argument should be added to
the proc layout of a compiled function by checking whether the lambda
set was material at all. But, the extension for a single function should
be added if and only if the function itself captures.
2022-12-27 09:15:21 -06:00
Folkert
f76df8a356
make dbg transparent to refcounting
2022-12-22 01:03:03 +01:00
Folkert de Vries
f550f049db
Merge pull request #4768 from roc-lang/expects-store-specialized-variable
...
Support using dbg/expect in polymorphic functions
2022-12-16 00:10:40 +01:00
Ayaz Hafiz
4315a36e90
Refine imported ZAT/function compilation
2022-12-14 17:13:59 -06:00
Ayaz Hafiz
02eec1f60c
Simplify the model of handling imported/unloaded symbol specializations
2022-12-14 17:13:58 -06:00
Ayaz Hafiz
b8aa8df100
Make sure to resolve lambda sets for imported top-levels correctly
...
Part of #4733
2022-12-14 17:13:43 -06:00
Ayaz Hafiz
a96225e92e
Store specialized variable for use in dbg as fake symbol in lowlevel call
2022-12-14 17:00:37 -06:00
Ayaz Hafiz
fe90355265
Store specialized variables of expect lookups in expect frames
2022-12-14 17:00:36 -06:00