Commit graph

164 commits

Author SHA1 Message Date
Anton-4
eee85fa45d
moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02:00
Brian Carroll
320bdcc13b
wasm: implement all multiplication operators 2022-06-22 23:36:01 +01:00
Brian Carroll
f4ec2617fa
wasm: implement all subtraction operators (checked, wrapping, panicking, and saturated) 2022-06-22 22:54:09 +01:00
Brian Carroll
b1193e4134
wasm: implement all addition operators (wrapping, panicking, saturating, and checked) 2022-06-22 22:11:46 +01:00
Brian Carroll
d7ac8cfcbc
wasm: implement addOrPanic in Zig 2022-06-22 22:11:44 +01:00
Brian Carroll
795afc0cf6
wasm: implement saturating addition in Zig 2022-06-22 22:11:42 +01:00
Brian Carroll
10676d3ce9
wasm: implement checked addition 2022-06-22 22:11:39 +01:00
Brian Carroll
f5b46bf650
wasm: implement sin, cos, tan, sqrt, log, and pow 2022-06-21 23:59:38 +01:00
Folkert
81caa96af2
Merge remote-tracking branch 'origin/trunk' into update_zig_09 2022-05-07 19:38:04 +02:00
Folkert
07383e96f0
Merge remote-tracking branch 'origin/trunk' into i/2792 2022-05-06 20:17:53 +02:00
Folkert
64b633bea6
make round return an integer 2022-05-06 20:17:40 +02:00
Folkert
5755475b3a
add ListIsUnique lowlevel operation 2022-05-06 13:56:35 +02:00
Folkert
84f0839de9
remove zig import we don't need in 0.9.1 2022-04-30 23:43:38 +02:00
Ayaz Hafiz
0bc85ad32c
Only load setjmp/longjmp from Zig on aarch64 2022-04-28 09:13:29 -04:00
Ayaz Hafiz
fa8108e3a8 SJLJ roc_panic on AArch64
```
$ uname -m
arm64

$ cargo test -p test_gen gen_num::abs_min_int_overflow
    Finished test [unoptimized + debuginfo] target(s) in 0.09s
     Running src/tests.rs (target/debug/deps/test_gen-b2041868d2cf26f3)

running 1 test
test gen_num::abs_min_int_overflow - should panic ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 933 filtered out; finished in 0.14s
```
2022-04-27 22:43:34 -04:00
Brendan Hansknecht
577282ced3 have zig allocate all refcounts 2022-04-01 14:06:28 -07:00
Brendan Hansknecht
2e70bb8458 remove list set low level 2022-02-27 15:07:09 -08:00
Brendan Hansknecht
ba2e8cd32b Add base piping for list.Replace 2022-02-24 17:58:56 -08:00
ayazhafiz
13067f2908 Implement Num.toNNNChecked
Closes #2411
2022-02-19 16:20:21 -05:00
Richard Feldman
9b05d8dd50
Move expect zig code out of utils 2022-02-02 19:15:47 -05:00
Chelsea Troy
bf582b8120 Add C implementations for testing functions in zig 2022-01-02 14:55:56 -06:00
Chelsea Troy
b96ebe0457 Starts memory allocation for our collection of failures for the expect keyword
+ BLOCKED: @lucas how do we initialize an empty slice in Zig?
2021-12-12 19:02:18 -06:00
Richard Feldman
1ce648ac27
Merge pull request #2116 from rtfeldman/str_to_num
Str.toNum
2021-12-09 09:48:38 -05:00
rvcas
bc5b1abcba feat(Str.toNum): support decimal 2021-12-02 15:35:34 -05:00
rvcas
d6ab0b6aa4 fix: bitcode functions needed the str namespace not num 2021-12-01 16:40:56 -05:00
Folkert
69fc1ad7e7 sketch of StrToNum 2021-12-01 15:33:16 +01:00
Brian Carroll
6e5acadfea Create new lowlevels for refcounting 2021-11-30 09:57:00 +00:00
Michael Downey
d946b84e63 adding initial List.all 2021-11-16 16:34:36 -05:00
satotake
c253273490 Merge branch 'trunk' into refactor-builtin-list-drop 2021-11-15 11:37:32 +00:00
satotake
8e29daa160 remove low-level List.drop codes 2021-11-15 11:28:38 +00:00
Theo Felippe
8d7c252fce implemented Str.trimRight 2021-11-13 18:02:58 +00:00
satotake
9ec2bc7946 Remove takeFirst and takeLast from backend 2021-11-13 06:03:18 +00:00
satotake
98d2c57edf move List.sublist to backend 2021-11-13 04:57:28 +00:00
Michael Downey
07cd3850d7
Merge branch 'trunk' into str_trim_left 2021-11-09 19:43:26 -05:00
Michael Downey
1bc278d962 initial commit of Str.trimLeft 2021-11-09 14:25:24 -05:00
Folkert
94efbd0e95 Merge remote-tracking branch 'origin/trunk' into builtins-list-take-last 2021-11-09 16:18:19 +01:00
satotake
772fc9c021 Implement List.takeLast 2021-11-09 12:26:17 +00:00
ayazhafiz
f65b174ab5 Implement List.find
`List.find : List elem, (elem -> Bool) -> Result elem [ NotFound ]*`
behaves as follows:

```
>>> List.find [1, 2, 3] (\n -> n > 2)
Ok 2
>>> List.find [1, 2, 3] (\n -> n > 4)
Err NotFound
```

We implement this as builtin in two phases. First, we call out to a
pure-llvm-lowlevel `ListFindUnsafe` that returns a record indicating
whether a satisfying element was found, and the value of that element
(the value is all null bytes if the element wasn't found). Then, we lift
that record to a `Result` via a standard construction of the can AST.

Closes #1909
2021-11-08 21:03:14 -05:00
satotake
878400f95f Implement List.takeFirst 2021-11-08 14:10:53 +00:00
Richard Feldman
0a347456ef
Merge pull request #1903 from rtfeldman/fix-str-from-int
Implement Str.fromInt for any integer type
2021-11-07 23:42:59 +00:00
Kevin Sjöberg
44938a9e35 Implement List.any 2021-11-07 20:44:10 +01:00
Folkert de Vries
c0c2c1341c
Merge branch 'trunk' into fix-str-from-int 2021-11-07 00:00:21 +01:00
Kevin Sjöberg
f6d055dc62 Correct minor spelling mistakes 2021-11-06 15:29:08 +01:00
Kevin Sjöberg
491a480371 Implement Str.fromInt for any integer type 2021-11-06 14:55:27 +01:00
Kevin Sjöberg
f9ed060e49 Implement List.map4 2021-10-31 21:08:41 +01:00
Dan Gieschen Knutson
02117ba512
Merge branch 'trunk' into str_trim 2021-10-27 18:01:29 -05:00
Locria Cyber
791c46fe0d Remove deprecated zig features 2021-10-26 20:21:55 -04:00
Dan Knutson
e7523ad41d add Roc wiring 2021-10-25 20:22:37 -05:00
Folkert
a072d8d1b1 fix things 2021-10-20 16:56:04 +02:00
Folkert
63b1aaad4e hook up polymorphic zig builtins 2021-10-20 16:43:39 +02:00