Commit graph

1025 commits

Author SHA1 Message Date
Ayaz Hafiz
6e5a308557
Content variant ErasedLambda 2023-07-12 13:57:17 -05:00
Ayaz Hafiz
c459757062
Thread simple model of "ErasedLambdas" through proc layouts
But none of these paths are yet exercised.
2023-07-12 13:53:52 -05:00
Folkert
a50f013fce
cleanup after review 2023-07-12 17:55:21 +02:00
Folkert
da9482b7fa
inline pattern match 2023-07-10 21:17:58 +02:00
Folkert
8c666edbec
use explicit stack to prevent stack overflow in drop specialization 2023-07-10 21:14:30 +02:00
Folkert
2d616d1fe9
manual clippy fixes 2023-07-10 18:27:10 +02:00
Folkert
ef39bad7c6
auto clippy fixes 2023-07-10 18:27:08 +02:00
Anton-4
72c85efc83
switch to rust 1.67 2023-07-10 18:25:52 +02:00
Folkert
bb97c384bb
preserve semantics in the glue generation 2023-07-09 15:47:28 +02:00
Folkert
6d2d65bb1e
remove Boxed layout 2023-07-09 15:47:28 +02:00
Folkert
d64930c17f
remove box and unbox expressions 2023-07-09 15:47:28 +02:00
Folkert
a9813aeae7
use a NonNullableUnwrapped union for Box 2023-07-09 15:47:27 +02:00
Ayaz
f2e013a4e0
Merge pull request #5628 from roc-lang/i5617
Do not drop uninhabited captures from lambda sets
2023-07-01 13:15:14 -05:00
Folkert
3b18494ddd use Ptr instead of Boxed in the code-gen-help 2023-06-30 15:57:33 +02:00
Ayaz Hafiz
a5e1558a6e
Do not drop uninhabited captures from lambda sets
Previously, we would drop uninhabited captures from lambda sets' runtime
representations, which meant sets like

```
[L1 {a: Str}, L2 {a: []}]
```

had runtime representation

```
{Str}
```

rather than

```
Union({Str}, {[]})
```

if we drop unreachable lambdas from the representation, then the
reachable lambdas are somewhat more efficient to compile (as there are
less material tag options), but the compiler complexity increases
because we must represent voided capture sets in the lambda set.

Even if a lambda has voided captures, we must specialize it, because
failing to do so opens us up to losing relevant specializations needed
later on. See 2f7020aa31 for a
previous occurence of that.

As such, simply keep voided layouts in place during lambda set
compilation. The optimizer should elide them anyway.
2023-06-29 17:32:50 -05:00
Folkert
0308e02ba9
update some logic and comments 2023-06-29 18:40:27 +02:00
Folkert
b29e612a4d
refactor 2023-06-29 18:40:26 +02:00
Folkert
f27cb83a02
remove Reuse 2023-06-29 18:40:26 +02:00
Folkert
1daf975391
use Tag instead of Reuse constructor 2023-06-29 18:40:26 +02:00
Folkert
463f739c06
add reuse info to normal Tag ir constructor 2023-06-29 18:40:26 +02:00
Folkert
48e6ef79a4
we no longer care where a tag layout stores the tag id 2023-06-27 20:55:28 +02:00
Folkert
e95d093461
in dev/wasm backends, always clear tag id bits from a reset pointer 2023-06-27 20:50:43 +02:00
Folkert
fc3004da58
free or reuse unconditionally when value is unique 2023-06-27 17:37:45 +02:00
Folkert
ae47cc5171
in TRMC, still apply normal TCE 2023-06-24 19:45:44 +02:00
Folkert
9d10389c2b
make trmc candidate set cheaper to clone 2023-06-24 14:49:58 +02:00
Folkert
654cf7b861
changes after review 2023-06-24 14:49:57 +02:00
Folkert
e19f0ae6d6
don't capture from outside join point for the dev backend 2023-06-24 14:49:55 +02:00
Folkert
c87519c209
search for multiple TRMC opportunities 2023-06-24 14:49:55 +02:00
Folkert
bc64e4b92b
fix layout check issue 2023-06-24 14:49:53 +02:00
Folkert
c21f80ea24
don't use pointer as union child 2023-06-24 14:49:52 +02:00
Folkert
880d2ef788
invalidate TRMC attempt when symbol is used before TRMC opportunity 2023-06-24 14:49:50 +02:00
Folkert
9ab4413beb
rewrite constFolding logic 2023-06-24 14:49:49 +02:00
Folkert
7637506037
skip is_null check if possible 2023-06-24 14:49:49 +02:00
Folkert
052ce8f2aa
clippy 2023-06-24 14:49:47 +02:00
Folkert
51f3752c94
wasm backend struggles 2023-06-24 14:49:47 +02:00
Folkert
9c85fb90d3
fix bugs 2023-06-24 14:49:47 +02:00
Folkert
0247237fe8
WIP 2023-06-24 14:49:46 +02:00
Folkert
4a9514d2c4
rough implementation 2023-06-24 14:49:46 +02:00
Folkert
76dcb75ff6
add Ptr lowlevels 2023-06-24 14:49:46 +02:00
Folkert
17512873e8
add LayoutRepr::Ptr 2023-06-24 14:49:45 +02:00
Folkert de Vries
a997280dc9
Merge pull request #5568 from JTeeuwissen/no-reuse-non-unique
Don't reuse non unique symbols
2023-06-20 00:48:53 +02:00
J.Teeuwissen
315b7d73a4
non lazy 2023-06-19 21:10:00 +02:00
J.Teeuwissen
343a548458
clippy ;( 2023-06-19 19:59:55 +02:00
J.Teeuwissen
efe91da38c
Changed token order 2023-06-19 19:55:01 +02:00
J.Teeuwissen
78c1855b66
Fixed logic 2023-06-19 17:41:57 +02:00
Hannes
97fa6758d0 Rename trimLeft to trimStart and trimRight to trimEnd 2023-06-19 13:17:59 +08:00
J.Teeuwissen
fdfa978ca8
added branch info and uniqueness check 2023-06-18 20:00:15 +02:00
Ayaz Hafiz
ee25735731
LayoutIds use LayoutRepr 2023-06-17 18:13:02 -05:00
Ayaz Hafiz
bc41db2a34
Get rid of passing target_info a bunch 2023-06-17 18:13:00 -05:00
Ayaz Hafiz
314cc7855a
Revert "Check if benchmarks are weird"
This reverts commit 24e7a56f4b.
2023-06-16 15:26:02 -05:00