Commit graph

490 commits

Author SHA1 Message Date
Anton-4
e784baccce
rust update, nix update, clippy fixes 2023-04-22 14:51:01 +02:00
J.Teeuwissen
d4379ff895
Working IR 2023-04-22 13:32:38 +02:00
Folkert
caf11e58fa
more code sharing between mono and glue 2023-04-21 20:59:35 +02:00
Folkert
b5bd0f4fb0
find extern names using the variables (not layouts) 2023-04-21 18:21:01 +02:00
Folkert
394495d307 Revert "update size asserts"
This reverts commit 9973d4b8d2.
2023-04-21 13:22:23 +02:00
Folkert
4cd8f0a056 clippy --fix fixes 2023-04-21 12:05:51 +02:00
Folkert
9973d4b8d2 update size asserts 2023-04-21 11:57:47 +02:00
J.Teeuwissen
00fcdd1a41
start drop_specialization 2023-04-20 13:06:51 +02:00
J.Teeuwissen
363e2e1074
Merge branch 'main' into Frame-Limited 2023-04-18 07:19:54 +02:00
Ayaz Hafiz
65911f88b1
Handle record updates of imported module thunks
Closes #5131
2023-04-12 11:39:14 -05:00
J.Teeuwissen
a3cea59bb6
Merge remote-tracking branch 'origin/main' into Frame-Limited 2023-04-12 09:08:40 +02:00
Brendan Hansknecht
e5b88366fe
add proper error messages for ingested files 2023-04-09 14:03:33 -07:00
Brendan Hansknecht
90f4885f4b
use Arc to avoid ever needing to actually copy the underlying bytes 2023-04-09 14:03:33 -07:00
Brendan Hansknecht
a354860d07
clippy 2023-04-09 14:03:33 -07:00
Brendan Hansknecht
6302a8d4b5
switch from type annotation to type variable 2023-04-09 14:03:33 -07:00
Brendan Hansknecht
08179d2a65
make errors more correct and check for utf8 bytes 2023-04-09 14:03:32 -07:00
Brendan Hansknecht
07eb3614ea
get ingesting working both for Str and List U8 2023-04-09 14:03:32 -07:00
Brendan Hansknecht
d42aa43b41
add ingest file to can ir and start pipelining it through the compiler 2023-04-09 14:03:32 -07:00
J.Teeuwissen
705ad1c796
symbol_to_doc 2023-04-09 09:43:52 +02:00
J.Teeuwissen
499f689226
Merge branch 'main' into Frame-Limited 2023-04-08 09:33:12 +02:00
J.Teeuwissen
4f3f3caff3
Cleanup 2023-04-06 10:41:05 +02:00
J.Teeuwissen
ed947b773d
Cleanup 2023-04-05 19:44:17 +02:00
Folkert
b7119e9b3a
return record containing function 2023-04-03 23:45:30 +02:00
J.Teeuwissen
87abe8df7d
Merge branch 'resetref' into Frame-Limited 2023-04-03 10:02:31 +02:00
J.Teeuwissen
018e142997
merge remainders 2023-03-31 21:11:13 +02:00
J.Teeuwissen
7759ce6fc4
Merge branch 'main' into Frame-Limited 2023-03-31 20:46:39 +02:00
J.Teeuwissen
9b410694fe
Merge branch 'main' into Frame-Limited 2023-03-30 20:38:05 +02:00
Folkert
09779f65ad
add NullPointer to mono::ir::Expr 2023-03-30 20:18:04 +02:00
J.Teeuwissen
d4ed6f7778
start resetref 2023-03-29 11:57:13 +02:00
Ayaz Hafiz
2a9e0583bc
Remove inaccurate debug assertion in IR gen
There might be more symbols than field layouts when restructuring a
record if the record is a newtype.

Closes #4759
2023-03-28 15:06:44 -05:00
Ayaz Hafiz
3f532df981
Generate code for recursive nullable wrapped lambda sets 2023-03-27 10:11:49 -05:00
Ayaz
eadbb4eddd
Merge pull request #5202 from roc-lang/i5176
Compilation of when expressions with redundant branches and guards
2023-03-25 20:02:22 -05:00
Ayaz
8c55e8126d
Merge pull request #5203 from roc-lang/virtual-dom-annotations
Fix a few bugs Virtual-DOM cropped up
2023-03-25 20:00:51 -05:00
Ayaz Hafiz
f75248d206
Factor out mono literal and pattern into smaller crates 2023-03-25 16:33:55 -05:00
Ayaz Hafiz
570876129b
Format 2023-03-25 16:14:31 -05:00
Ayaz Hafiz
dd55be6142
Handle guards that appear multiple times in a compiled decision tree
Suppose we have a when expression

```
15 if foo -> <b1>
b  if bar -> <b2>
_         -> <b3>
```

that may have a decision tree like

```
15?
  \true => foo?
              \true  => <b1>
              \false => bar?
                           \true  => <b2>
                           \false => <b3>
  \false => bar?
               \true  => <b2>
               \false => <b3>
```

In this case, the guard "bar?" appears twice in the compiled decision
tree. We need to materialize the guard expression in both locations in
the compiled tree, which means we cannot as-is stamp a compiled `bar?`
twice in each location. The reason is that

- the compiled joinpoint for each `bar?` guard needs to have a unique ID
- the guard expression might have call which needs unique call spec IDs,
  or other joins that need unique joinpoint IDs.

So, save the expression as we build up the decision tree and materialize
the guard each time we need it. In practice the guards should be quite
small, so duplicating should be fine. We could avoid duplication, but
it's not clear to me how to do that exactly since the branches after the
guard might end up being different.
2023-03-25 16:14:21 -05:00
Ayaz Hafiz
393250db92
Utility to collect symbols bound by a pattern 2023-03-25 16:14:21 -05:00
Ayaz Hafiz
fe9be63787
Utility to substitute many symbols at once 2023-03-25 16:14:20 -05:00
Ayaz Hafiz
f3d1582a5e
More debugging for missing lambda sets 2023-03-25 15:01:41 -05:00
J.Teeuwissen
ca767bf385
matching closure_arguments 2023-03-23 10:59:46 +01:00
Ayaz Hafiz
e6094df69b
Fast-path for determining ability member impls for builtin opaques 2023-03-22 17:08:41 -05:00
Folkert
fe15a2e79c
Merge remote-tracking branch 'origin/main' into glue-getters-rtfeldman 2023-03-08 19:46:00 +01:00
Ayaz Hafiz
739bdfe64e
Fix a bug in chasing assigned/hole on switch 2023-03-05 22:19:16 -06:00
Ayaz Hafiz
7914b07a2f
Eliminate unneeded joinpoints in union lambda dispatches 2023-03-05 22:10:42 -06:00
Ayaz Hafiz
a2389c7652
Eliminate joinpoints in trivial lambda set switches 2023-03-05 21:59:01 -06:00
Ayaz Hafiz
9166922e39
Remove unused is_terminal 2023-03-05 21:41:50 -06:00
Folkert
853c0387dc
cleanup 2023-03-05 17:33:48 +01:00
Folkert
769a4c415b
update remaining cli tests 2023-03-05 16:57:51 +01:00
Folkert
180187e5af
get old examples to work 2023-03-01 21:56:14 +01:00
Folkert
1bf2cc3b8c
cleanup 2023-02-25 16:23:40 +01:00