Commit graph

260 commits

Author SHA1 Message Date
Richard Feldman
12c353afaf zig fmt 2021-05-23 23:46:09 -04:00
Richard Feldman
2a68c0c2cd Revert "Add __cxa_throw to utils"
This reverts commit 23f4802b8773043bd0bb32cdf2f235d023a38050.
2021-05-23 23:46:09 -04:00
Richard Feldman
b02ae3794f Add __cxa_throw to utils 2021-05-23 23:46:09 -04:00
Richard Feldman
5efed85d81 Use test allocators for roc_alloc etc in tests 2021-05-23 23:46:09 -04:00
Richard Feldman
64dbf5a777 Have realloc take old_size too
After all, we always know it, and it means host authors don't
necessarily have to store it.
2021-05-23 23:46:09 -04:00
Richard Feldman
ab51582541 Switch builtins to use roc_alloc and friends 2021-05-23 23:46:09 -04:00
Richard Feldman
8666a2ad58 Avoid recomputing loop termination condition
LLVM might take care of this for us, but just to be safe!
2021-05-22 14:51:19 -04:00
tarjei
e062bdaad8 Fix dec ref for empty list 2021-05-22 00:54:03 +02:00
tarjei
85e5b0ff82 Fix most of deref logic
Still doesn't handle empty lists properly.
2021-05-21 21:53:55 +02:00
tarjei
f45d89270b Implement basic List.drop that satisfies tests
Issues with uniqueness and copying which leaks memory obviously needs to be fixed.
2021-05-18 22:59:55 +02:00
Folkert
4afd3cfce6 fixup 2021-05-16 21:32:45 +02:00
Folkert
de7b06e411 refactor + clippy 2021-05-16 21:17:34 +02:00
Eric Henry
eda462c6e9 implement list.concat in zig 2021-05-08 14:39:06 -04:00
Folkert
c071cfba13 implement startsWithCodePoint 2021-05-02 19:26:08 +02:00
Folkert
839095942d reallocate in strings 2021-05-01 23:16:34 +02:00
Folkert
b79230c069 refactor reallocate 2021-05-01 23:16:34 +02:00
Folkert
314b7e41fd use realloc in List.append 2021-05-01 22:01:18 +02:00
Folkert
586727f74a list single in zig 2021-05-01 16:38:11 +02:00
Folkert
42d065af45 move List.join to zig 2021-04-25 21:43:15 +02:00
Folkert
870adb20a8 use decref to deallocate RocStr in zig code 2021-04-14 16:53:36 +02:00
Richard Feldman
04aa9f4faa Synchronize walkBackwards with walk 2021-04-11 12:10:45 -04:00
Folkert
0575c01f41 Revert "use FixedBufferAllocator in builtins"
This reverts commit 0c2da8686a.
2021-04-05 00:46:27 +02:00
Folkert
044f653fda Revert "buggy copied version"
This reverts commit 858f19f5f5.
2021-04-05 00:45:41 +02:00
Folkert
858f19f5f5 buggy copied version 2021-04-05 00:45:34 +02:00
Folkert
0c2da8686a use FixedBufferAllocator in builtins 2021-04-04 22:01:22 +02:00
Folkert
4c9accb2ba use in-place swap for List.reverse 2021-04-04 21:42:02 +02:00
Richard Feldman
62e87dc970
Merge branch 'trunk' into builtin-sortby 2021-04-03 20:30:14 -04:00
Folkert
c168f2751d cleanup 2021-04-04 00:26:41 +02:00
Folkert
73cb826a98 fix calling conventions 2021-04-03 23:26:28 +02:00
Folkert
220c8b1a73 no-allocation swap 2021-04-03 21:20:38 +02:00
Folkert
e78fa99030 working version 2021-04-03 20:35:00 +02:00
Eric Henry
26edc70bca quicksort broken 2021-04-03 12:28:06 -04:00
Eric Henry
ac001598e8 setup before zig work 2021-04-03 11:28:36 -04:00
rvcas
22d8659215 feat(bitcode): implement the unique case for List.reverse 2021-04-03 08:10:11 -04:00
rvcas
17b39fa1ce feat(bitcode/list): implement listReverse 2021-04-02 02:00:46 -04:00
Folkert
f2c144f58c Merge remote-tracking branch 'origin/can-builtins-simplify' into list-range 2021-03-31 11:34:32 +02:00
Folkert
d718e21fd3 add List.range 2021-03-29 23:00:49 +02:00
Folkert
1dd8c25e12 implement walk until 2021-03-29 20:54:38 +02:00
Folkert
1302ee296f refactor list walking 2021-03-29 16:32:43 +02:00
rvcas
181958f284 fix(List): i in list.zig needs to be reset 2021-03-09 19:50:01 -05:00
rvcas
bebd96674b fix(List): export map3 from main.zig 2021-03-08 21:18:22 -05:00
rvcas
9fc572ace9 fix(List): map3 ref count use dec_c on third list 2021-03-08 21:14:15 -05:00
rvcas
268ab82410 feat(List): add map3 2021-03-08 21:12:19 -05:00
Richard Feldman
1211fa93f7
Merge pull request #1049 from rtfeldman/map2
List.map2
2021-03-05 22:55:12 -05:00
Folkert
0bc4d2c514 implement logic in zig 2021-03-04 15:41:03 +01:00
Folkert
baef33fc0c llvm bindings
map the lowlevel op into LLVM code; it calls zig code, but the zig code does not do anything yet
2021-03-04 14:54:41 +01:00
Folkert
d4bff7bcdc fix List.walkBackwards logic 2021-03-03 23:14:23 +01:00
Folkert
ca8c23e448 fix up zig code 2021-03-03 20:05:50 +01:00
Folkert
9873eb358b write List.append in zig 2021-03-03 15:29:22 +01:00
Folkert
134f8a15e9 fix zig tests 2021-02-24 22:26:18 +01:00