Brendan Hansknecht
|
6b761f6f81
|
fix zig builtin compilation and warnings
|
2024-07-13 10:39:53 -07:00 |
|
Brendan Hansknecht
|
0d0a4a8806
|
Update refcounting of list builtins to the new system.
|
2024-07-13 10:39:53 -07:00 |
|
Brendan Hansknecht
|
44cd1ee9c4
|
Avoid accessing unallocated bytes in list.incref
|
2024-07-13 10:39:52 -07:00 |
|
Brendan Hansknecht
|
3c842196fa
|
Update LLVM to properly increment and decrement lists
|
2024-07-13 10:39:51 -07:00 |
|
Brendan Hansknecht
|
255cc31ad9
|
change zig bitcode refcounting to require whether or not an element is refcounted
This also requires zig bitcode to have access to the dec functions for elements.
This is needed so that zig will be able to free elements in lists.
|
2024-07-13 10:39:51 -07:00 |
|
shua
|
f7bec802c0
|
PR: rename to List.concatUtf8
|
2024-06-08 13:36:20 +02:00 |
|
Richard Feldman
|
d378a14414
|
Minor zig refactor
|
2024-02-13 19:49:11 -05:00 |
|
Richard Feldman
|
0b42a902ab
|
Have List.withCapacity lowlevel use u64 over usize
|
2024-01-31 20:29:17 -05:00 |
|
Richard Feldman
|
5b2998966b
|
Update List.replace to no longer use Nat
|
2024-01-26 16:06:09 -05:00 |
|
Richard Feldman
|
a8918a4e3b
|
Update List.dropAt to no longer use Nat
|
2024-01-26 16:06:09 -05:00 |
|
Richard Feldman
|
a71188dc30
|
Update List.sublist to no longer use Nat
|
2024-01-26 16:06:08 -05:00 |
|
Richard Feldman
|
2cf7b5b5ca
|
Update List.swap to no longer use Nat
|
2024-01-26 16:06:08 -05:00 |
|
Richard Feldman
|
27474d4ed8
|
Update List.reserve to no longer use Nat
|
2024-01-26 16:06:08 -05:00 |
|
Folkert
|
f1ffc36efe
|
add List.clone
|
2024-01-20 20:29:07 +01:00 |
|
Brendan Hansknecht
|
f262102299
|
cleanup list and str builtin naming from refcount to allocation
|
2023-12-10 19:52:28 -08:00 |
|
Brendan Hansknecht
|
2e2e609547
|
update zig to 0.11 and update build script
Also update memcpy to avoid recursive memcpy due to optimizations.
|
2023-10-23 13:50:30 -07:00 |
|
Folkert
|
cf54304cf4
|
add lowlevel to inc/dec a data pointer
|
2023-04-28 15:30:23 +02:00 |
|
Brendan Hansknecht
|
2a6c82c937
|
fix bug where we don't decrement elements if the list is non-unique
|
2023-03-16 12:12:28 -07:00 |
|
Brendan Hansknecht
|
a955a4937c
|
misc list refcounting updates
|
2023-03-16 12:12:28 -07:00 |
|
Brendan Hansknecht
|
ce29c7e92f
|
fix bugs from recent changes and additions
|
2023-03-16 12:12:27 -07:00 |
|
Brendan Hansknecht
|
1319ba4844
|
add List.releaseExcessCapacity builtin
|
2023-03-13 17:43:21 -07:00 |
|
Brendan Hansknecht
|
b94a046b0d
|
make sure to check raw capacity when decrementing refcounts
|
2023-03-13 14:08:24 -07:00 |
|
Brendan Hansknecht
|
dfb748fb03
|
misc cleanup + change refcount pointer to avoid branching
|
2023-03-13 14:08:24 -07:00 |
|
Brendan Hansknecht
|
5f6910f747
|
add todo about upgrading to bit manipulation
|
2023-03-13 14:08:24 -07:00 |
|
Brendan Hansknecht
|
f96a63c1d4
|
correct case for zig naming
|
2023-03-13 14:08:23 -07:00 |
|
Brendan Hansknecht
|
146dff5446
|
add llvm refcounting and fix memory leak
|
2023-03-13 14:08:23 -07:00 |
|
Brendan Hansknecht
|
cda37a5d1b
|
use seamless slices for List.dropAt when possible
|
2023-03-13 14:08:23 -07:00 |
|
Brendan Hansknecht
|
4ced1bcfdd
|
add baseline of seamless slices
|
2023-03-13 14:08:23 -07:00 |
|
Brendan Hansknecht
|
e32c5f6514
|
standardize on decref instead of deinit for name
|
2023-03-13 14:08:23 -07:00 |
|
Brendan Hansknecht
|
440c0518f1
|
Change list.deinit to take alignment directly
In doing so remove the many class directly to utils.decref
|
2023-03-13 14:08:22 -07:00 |
|
Folkert
|
0af11c210e
|
fix memory leak in List.concat
|
2023-01-26 20:31:33 +01:00 |
|
Folkert
|
4e5b106f98
|
use capacity instead of length in list deinit
|
2023-01-20 21:44:41 +01:00 |
|
Folkert
|
437498b7ac
|
list decrement must use capacity, not length
|
2023-01-14 13:14:37 +01:00 |
|
Folkert
|
05e23f8c5c
|
decref owned but empty list in List.concat
|
2022-12-29 00:13:24 +01:00 |
|
Folkert
|
2dfa7d6ef1
|
fix memory leak in List.concat
|
2022-12-28 22:52:32 +01:00 |
|
Ayaz Hafiz
|
4df83d67ea
|
use copyBackwards when copying overlapping items in non-unique.unique concat
`mem.copy` requires that `dest` has start index `<= src`, but in our
case, `dest` has start index `>= src`. For this, `copyBackwards` should
be used.
See https://github.com/ziglang/zig/blob/master/lib/std/mem.zig#L195-L222.
Closes #4697
|
2022-12-06 12:58:04 -06:00 |
|
Ayaz Hafiz
|
a549176886
|
Add reproduction of failing unique concat bug
|
2022-12-06 12:57:32 -06:00 |
|
Brendan Hansknecht
|
9f09bebdca
|
run
|
2022-10-17 21:50:25 -07:00 |
|
Brendan Hansknecht
|
1225cb54fc
|
Fix memory leak in List.concat
|
2022-10-17 21:45:46 -07:00 |
|
Brendan Hansknecht
|
96b5d365b2
|
Add capacity growth to RocStr
Also, cleans up the alloc and realloc api for both list and str.
Updates Str.reserve to match List.reserve
|
2022-10-10 22:24:55 -07:00 |
|
Brendan Hansknecht
|
fdafac4323
|
Remove RocResult from utils.zig
It is implemented wrong and not used anywhere
|
2022-10-10 08:25:59 -07:00 |
|
Brendan Hansknecht
|
aca6f2a8f1
|
add todo around improving performance
|
2022-10-08 07:53:50 -07:00 |
|
Brendan Hansknecht
|
8269986113
|
remove comment on zero width types.
They should not affect the normal case. It is better they affect the capacity calculation
|
2022-10-08 07:53:33 -07:00 |
|
Brendan Hansknecht
|
eca4682787
|
deal with zero element_width
That being said, this only affects wasm.
So wasm probably should be handling zero element lists in a smarter way.
|
2022-10-07 17:58:48 -07:00 |
|
Brendan Hansknecht
|
557ee69557
|
fix minor typo
|
2022-10-07 17:11:46 -07:00 |
|
Brendan Hansknecht
|
1665f7160d
|
Fix bug in reallocate
|
2022-10-07 17:11:33 -07:00 |
|
Brendan Hansknecht
|
d06966392f
|
Add smarter list capacity growth calculations
|
2022-10-07 08:59:32 -07:00 |
|
Brendan Hansknecht
|
4ebe1b2bce
|
Avoid allocating a new list when calling List.sublist
|
2022-10-05 08:11:02 -07:00 |
|
Folkert
|
f44a30cf48
|
fix off-by-one error in List.dropAt
|
2022-09-28 14:57:55 +02:00 |
|
Brian Carroll
|
b1b28650e9
|
builtins: Avoid reallocating Lists when they have enough capacity
|
2022-09-04 14:37:42 +01:00 |
|