Commit graph

187 commits

Author SHA1 Message Date
Ayaz Hafiz
3a130acc32
Fix mut in test 2022-08-31 15:01:01 -05:00
Ayaz Hafiz
c2d042eba2
Stray dbg 2022-08-31 14:53:52 -05:00
Ayaz Hafiz
95765bcb1e
Intern the lambda set representation 2022-08-31 14:50:56 -05:00
Ayaz Hafiz
3b4b1838b8
Push layout interner further through Layout 2022-08-31 14:33:52 -05:00
Ayaz Hafiz
ed04c2040a
Push the layout interner through the backends 2022-08-31 14:33:52 -05:00
Ayaz Hafiz
c5466810a4
Add LayoutInterner to LayoutCache
Adds a thread-local interner of layouts to LayoutCache, and updates all
references appropriately.

This is a bit suboptimal for single-threaded workloads that will look at
creating layout caches again, like the REPL, but I think that's okay for
now - since the global interner will be uncontested for those workloads, it
should still be plenty fast to access the interner, even behind a lock.
2022-08-31 14:33:51 -05:00
Ayaz Hafiz
261cd75a71
Invalidate layout-cached variables correctly after merging 2022-08-31 14:33:50 -05:00
Ayaz Hafiz
7a7a4fa680
Use fnv hasher for layout cache 2022-08-31 14:26:16 -05:00
Ayaz Hafiz
c57fe24805
Use OptVariable rather than Option<Variable> 2022-08-31 14:23:50 -05:00
Ayaz Hafiz
9b1f3e6fde
Remove unused marker 2022-08-31 14:17:38 -05:00
Ayaz Hafiz
9fb9ca4cbc
return result, not cacheable 2022-08-31 14:17:15 -05:00
Ayaz Hafiz
7c215f9273
Remove stray dbgs 2022-08-31 14:17:15 -05:00
Ayaz Hafiz
ea2e5d171a
Invalidate layout-cached variables correctly after merging 2022-08-31 14:17:14 -05:00
Ayaz Hafiz
66e65714b9
Fix release errors 2022-08-31 14:16:44 -05:00
Ayaz Hafiz
d13b556295
Trace stats for layout cache 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
c2a0b878d3
Clippy 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
22a4a4dfbc
Relay metadata back when using cached result 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
7b8e1e1d53
Even more inline aggression 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
c53719eb95
Debug non-reused recursive structures 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
e24cdb8272
Be far more aggressive about cache inlining 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
a64d9d97c5
Do not reuse cached entries for recursive structures that are being reconstructed 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
caf4a80542
Clippy 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
3ce4c6c77d
Typo 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
3856ea6199
Implement a cache policy - don't cache recursive pointers without a recursive layout 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
eb5ec2bd98
Don't account for recursive unions in non-recursive layout gen 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
d757701426
First pass at layout caching 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
8b0f7dc82f
Propagate layout_cache throughout Env in generating layout
Sets up actually using the LayoutCache to get cached layouts.
2022-08-31 14:16:42 -05:00
Folkert
d93d42da8c
make chasing an ext return a custom type 2022-08-30 00:51:24 +02:00
Folkert de Vries
acb71d6007
Merge pull request #3835 from roc-lang/ext-vars-in-derivers
Support bound and unbound extension variables in deriving
2022-08-30 00:34:50 +02:00
Ayaz Hafiz
3b2e3d515f
Include var in lambda set size traces 2022-08-23 15:42:01 -05:00
Ayaz Hafiz
b3f8ead89d
Add tracing of lambda set sizes in mono layout 2022-08-23 15:20:39 -05:00
Ayaz Hafiz
a8bd529664
Support derivers for tag unions with ext vars 2022-08-23 10:41:06 -05:00
Ayaz Hafiz
0606086eb6
Compare values with runtime representation 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
64fc60f55f
Make lambda set set private 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
a93735473a
Describe how a enum lambda set should be switched in the representation 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
d4a79780b3
Determine whether to extend lambda set arg to call args by checking call options 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
62dde549e6
Determine whether lambda set is represented as an arg 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
fc4979e2ce
Add ClosureCallOptions enum to describe how to switch calling lambda 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
8d01e81aa7
Use tag union/recursive tag union layout function for lambda sets 2022-08-19 22:16:39 -05:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos 2022-08-12 15:24:09 -04:00
Folkert de Vries
0798f787c5
Merge pull request #3736 from rtfeldman/i3687
Creation of a record whose type has an optional value is an error
2022-08-11 15:51:41 +02:00
Ayaz Hafiz
81bb889e93
Add RigidOptional record field variant 2022-08-10 20:24:18 -07:00
Ayaz Hafiz
ee188b8e85
use layout_from_recursive_union to generate lambda set recursive layouts 2022-08-09 16:45:35 -07:00
Ayaz Hafiz
021cc6e506
Support non-nullable-unwrapped recursive lambda sets 2022-08-09 15:17:16 -07:00
Ayaz Hafiz
1a09f3e0e6
Make sure checking captures layouts chases recursion pointers 2022-08-09 14:57:59 -07:00
Ayaz Hafiz
ba2768c9b0
Build member layouts for recursive lambda sets 2022-08-09 14:44:09 -07:00
Ayaz Hafiz
549b00d327
Handle recursive variables in building lambda set representations 2022-08-09 14:11:02 -07:00
Folkert
546b702740
nullable wrapped tags 2022-08-06 14:40:00 +02:00
Richard Feldman
cc790a2773
fixup! Rename bindgen_rs to rust_glue 2022-07-24 11:54:40 -04:00
Folkert
c09cb4e3ea
fix stack size of empty tag union 2022-07-23 23:10:56 +02:00