Commit graph

1143 commits

Author SHA1 Message Date
Folkert de Vries
4a593a5b77
Merge pull request #6442 from roc-lang/dev-backend-glue-primitives
Dev backend glue primitives
2024-01-29 00:08:51 +01:00
Richard Feldman
b21e75e359
Remove a nat suffix 2024-01-28 15:16:41 -05:00
Folkert
28ab81614c
fix duplicate test that trips up llvm-wasm 2024-01-28 19:22:49 +01:00
Folkert
df3d04e92d
fix duplicate test that trips up llvm-wasm 2024-01-28 18:29:08 +01:00
Folkert
bd0cb6338e
fix incorrect element width used for List.append in dev backend 2024-01-28 16:39:16 +01:00
Folkert
2794348722
fix bug in casting to u128/i128 2024-01-27 21:58:56 +01:00
Folkert
919a51137a
make ROC_DEV_WRITE_OBJ work in more cases 2024-01-27 17:46:19 +01:00
Folkert
076fafe02f
enable some float conversion tests for gen-dev 2024-01-27 15:04:30 +01:00
Richard Feldman
fb84c9487d
Remove Num.Natural, Num.toNat, and Num.toNatChecked 2024-01-26 16:23:20 -05:00
Richard Feldman
9518d76cd8
Remove Num.bytesTo___ functions
These may be reintroduced in some form later,
but they don't handle endianness and it's not
clear builtins are the right place for them.
2024-01-26 16:23:19 -05:00
Richard Feldman
bf660ad094
Remove Nat from tests 2024-01-26 16:19:52 -05:00
Richard Feldman
8f82bc38c0
Remove Nat from tests 2024-01-26 16:19:52 -05:00
Richard Feldman
4a38d3a1af
Remove Nat from some compiler tests that use lists 2024-01-26 16:06:08 -05:00
Richard Feldman
7e51dfd526
Update test fixtures to not use Nat indices 2024-01-26 16:06:07 -05:00
Richard Feldman
632903bbde
Fix some tests 2024-01-26 16:00:33 -05:00
Brian Teague
4499f8c6f4
isApproxEq function 2024-01-23 21:06:35 -05:00
Richard Feldman
2970fc4384
Merge remote-tracking branch 'origin/main' into str-unicode 2024-01-21 12:30:16 -05:00
Folkert
351c9215fe
dev backend: f32 abs 2024-01-19 15:16:32 +01:00
Richard Feldman
b48fa0698a
Remove scalars and graphemes from Str 2024-01-17 21:30:34 -05:00
Brian Teague
60c639b60e
Consolidate gitignore
Keep certain files with no file extension

Keep specific files with no file extension

Delete all gitignore files
2024-01-10 22:16:04 -05:00
Folkert
7a365eb88f
enable even more dev-backend num tests 2024-01-02 22:23:47 +01:00
Folkert
b7a41bcb3e
enable many more dev-backend num tests 2024-01-02 21:30:49 +01:00
Folkert
6c521555ea
decimal division in dev backend 2024-01-02 19:53:13 +01:00
Folkert
4bcd195b92
implement NumSub (that panics) in the dev backend 2024-01-02 19:47:17 +01:00
Folkert
cfdfbe18a4
implement panic on overflow for mul in the dev backend 2024-01-02 15:56:28 +01:00
Anton-4
5f1c383aa0
fmt 2024-01-01 17:11:46 +01:00
Anton-4
1126f85b5a
fix clippy unnecessary hashes 2024-01-01 16:38:36 +01:00
Bryce Miller
12d1d7386b
modify test to sidestep wasm gen bug 2023-12-18 11:24:11 -05:00
Bryce Miller
99e596c4a0
don't run test for gen_wasm 2023-12-12 20:54:27 -05:00
Bryce Miller
59eb28ef58
Add builtin List.walkWithIndexUntil 2023-12-11 23:04:40 -05:00
Brendan Hansknecht
c87dcd1205
correct wrong test case 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
f738d5a2bf
remove unnecessary call to math.floor in bitcode 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
37656f4cc0
update uitest and mono_test 2023-12-05 12:45:31 -08:00
Brendan Hansknecht
3f50f78eba
update tests and Dict.keepShared semantics 2023-12-05 12:37:12 -08:00
Brendan Hansknecht
6692f5b15d
correct counting bits to return a u8
Also add an impl to the dev backend
2023-12-05 12:37:10 -08:00
Brendan Hansknecht
e336aa525c
Merge pull request #6062 from JRMurr/div-0-should-crash
Update zig `@panic` calls to `roc_panic` for numeric errors
2023-12-05 12:28:47 -08:00
Brendan Hansknecht
749faf4850
a few missed variable renames 2023-12-04 14:57:47 -08:00
Brendan Hansknecht
dbcb6ca5da
clippy 2023-12-04 13:53:56 -08:00
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