Commit graph

1055 commits

Author SHA1 Message Date
Brendan Hansknecht
fc09c3b002
remove debugir 2023-12-04 13:50:53 -08:00
Brendan Hansknecht
496cd6710a
fix debug info and add it all to the llvm backend 2023-12-04 12:55:33 -08:00
Brendan Hansknecht
e5a0af5699
make DbgFormatter an unexposed implementation detail 2023-12-03 12:41:04 -08:00
Ayaz
20bcd70ad2
Merge branch 'main' into div-0-should-crash 2023-12-02 20:10:32 -06:00
Ayaz Hafiz
a53da2bc24
Make sure late specializations of opaques inherit Inspect as needed
A "late specialization" of a type is an ability specialization that
is not visible or needed until after type-specialization; i.e. during
monomorphization.

The `Inspect.toInspector` ability is special-cased for opaques that do
not claim or explicitly implement `Inspect`. In such cases, they are
treated as structural types, and given the immediate specialization of
`Inpect.inspectOpaque`.

However, prior to this commit, that special-casing would only be applied
during early specialiation (i.e. specializations visible during
generalized type inference). This commit applies the special case to
late specialization as well - the specialization decision for an opaque
type is always the specialization of the opaque type in the late case,
but now, when we go to look up the ambient lambda set of the
specialization, if it does not exist and corresponds to
`Inspect.toInspector`, we fall back to the immediate.

One concern I have here is that in a case like

```
Op := {}

x =
    dbg (@Op {})
```

the specialization of `Inspect.toInspector` for `Op` should be known
early. Indeed, the program

```
Op := {}

x =
    Inspect.toInspector (@Op {}) |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
```

Compiles fine without this change. This makes me suspect there is an
issue with the implementation of `dbg`'s desugaring. If possible, this
should be addressed sooner rather than later.

Closes #6127
2023-11-30 22:25:08 -06:00
Brendan Hansknecht
3e66254b25
update zig and rust platforms to have correct roc_panic and roc_dbg 2023-11-29 21:49:34 -08:00
Brendan Hansknecht
f5fb01fd53
Get tests passing
Add roc_dbg to some platforms.
Also start updating some roc_panic impls.
2023-11-29 21:05:49 -08:00
Brendan Hansknecht
ead90313d8
Merge pull request #5775 from roc-lang/inspect-derive
Derive Inspect
2023-11-29 08:22:27 -08:00
John Murray
298f93d20c
update a bunch of panic message to be capitalized 2023-11-28 20:46:09 -05:00
Brendan Hansknecht
01032c3b11
remove empty list test case for inspect 2023-11-28 16:40:43 -08:00
Brendan Hansknecht
4b911524ac
update gen_abilities tests to include edge case 2023-11-28 16:40:43 -08:00
Brendan Hansknecht
2e486953be
put inspect tests in their own module 2023-11-28 16:40:40 -08:00
Brendan Hansknecht
b8e644a1e3
add DbgFormatter to inspect 2023-11-28 16:40:40 -08:00
Richard Feldman
768b55b8c5
Add some Inspect.inspect tests, fix a bug 2023-11-28 16:40:40 -08:00
Folkert
4fafc669b8
in record fields give a forced imported thunk a unique symbol 2023-11-28 23:47:53 +01:00
John Murray
2a762f1379
revert change of integer => Integer in panic messages 2023-11-27 19:59:30 -05:00
John Murray
38207cff8a
fix typo 2023-11-24 10:07:27 -05:00
John Murray
14478c888d
remove bad copy paste 2023-11-24 10:07:26 -05:00
John Murray
abc92ded95
add test for divCeil by 0 2023-11-24 10:07:26 -05:00
John Murray
5df2199ef5
add test for dec division 2023-11-24 10:07:26 -05:00
Brendan Hansknecht
ee10af2c68
add currently broken test case for list .. as rest 2023-11-20 21:09:11 -08:00
Brian Carroll
5719384ed9
Get rid of VM stack storage 2023-11-05 23:20:46 +00:00
Isaac Van Doren
139d3c6f89
make dropFirst and dropLast drop n elements 2023-10-29 13:23:33 -05:00
Brian Carroll
c50925240d
Merge pull request #5921 from roc-lang/wasm-repl-crash
report roc_panic to the user in the web repl
2023-10-25 19:22:10 +01:00
Brendan Hansknecht
0f5b112336
disable list_range_length_overflow for dev wasm 2023-10-23 13:50:36 -07:00
Anton-4
845da6a5c9
clippy 2023-10-23 13:50:35 -07:00
Anton-4
7da37c0e98
rustfmt 2023-10-23 13:50:35 -07:00
Brian Carroll
6e2d7e4a8d
Improve Wasm debug instructions 2023-10-23 13:50:35 -07:00
Brian Carroll
89acb6461a
Ignore ordering of function names in Wasm linking test 2023-10-23 13:50:35 -07:00
Folkert
023f204af2
fix memory reading bug in test 2023-10-23 13:50:34 -07:00
Brian Carroll
a590fafa76
Change a file extension .o -> .wasm to make Zig emit wasm
Zig 0.9 would prioritise the -target but now it seems to prioritise the file extension
2023-10-23 13:50:31 -07:00
Brendan Hansknecht
f8b787c93a
disable test with bad rounding 2023-10-23 13:50:31 -07:00
Folkert
eb61d352f5
changes after review 2023-10-20 18:04:07 +02:00
Folkert
47d4335cda
cleanup test-gen-dev macro code 2023-10-17 20:02:00 +02:00
Isaac Van Doren
886b855594
add Str.contains to builtins 2023-10-14 14:56:51 -05:00
Richard Feldman
6c10a6a8aa
Merge pull request #5893 from mulias/em/list-chunks-of
builtin(list): add List.chunksOf
2023-10-10 09:25:10 -04:00
Folkert
46e8328056
add test that exhausts argument registers 2023-10-09 15:24:41 +02:00
Luke Boswell
99369dec85
implement roc_panic aarch64 2023-10-09 15:24:37 +02:00
Folkert
82b96395e2
fix argument passing for systemv 2023-10-09 15:24:35 +02:00
Folkert
68dc7108bf
enable all gen_result tests for the dev backend 2023-10-09 15:24:32 +02:00
Folkert
052ee0cc5f
more boxing tests 2023-10-09 15:24:32 +02:00
Folkert
3a8d4b853b
an attempt at passing bigger values 2023-10-09 15:24:30 +02:00
Elias Mulhall
c3f0e7d6da Fix type annotations for List.chunksOf tests 2023-10-07 21:42:22 -04:00
Elias Mulhall
b7923ac542 builtin(list): add List.chunksOf 2023-10-07 11:54:34 -04:00
Anton-4
5f878aee93
clippy 2023-09-26 15:08:30 +02:00
Folkert de Vries
3314079819
Merge pull request #5824 from roc-lang/aarch-function-preamble
AArch64 gen_num + gen_records tests
2023-09-18 18:08:00 +02:00
Folkert
f6e4aee10c
make dec checked tests clearer 2023-09-17 16:20:18 +02:00
Brendan Hansknecht
12223191be
update tests 2023-09-16 23:45:16 -07:00
Folkert
821cc0cfd8
env variable for writing out the obj file 2023-09-16 00:51:14 +02:00
Folkert
f30b0bdf68
disable some debugging stuff 2023-09-15 23:10:43 +02:00