Commit Graph

29 Commits

Author SHA1 Message Date
Laytan Laats 26fa3aca44 fix copy-paste error in make docs 2024-08-11 17:09:26 +02:00
gingerBill 196ac7e6d6 Type erase _make_dynamic_array_len_cap 2024-07-15 00:01:26 +01:00
gingerBill 26a9416a41 Minor clean ups 2024-07-14 23:33:35 +01:00
gingerBill e768bddaeb Inline _append_elem_string further 2024-07-14 23:22:22 +01:00
gingerBill 83b7dd122a Type erase for append_elems 2024-07-14 23:20:50 +01:00
gingerBill b0fbaf24a0 Type erase append_elem 2024-07-14 23:16:11 +01:00
gingerBill 15fb4ded2a type erase resize and reserve internals 2024-07-14 23:09:10 +01:00
gingerBill 8642d719f0 Imply #no_capture to all variadic parameters 2024-07-14 12:19:47 +01:00
gingerBill c7bd954752 Add more uses of #no_capture 2024-07-14 11:56:04 +01:00
gingerBill 942f3f5220 Add non_zero_* variants for #soa dynamic array 2024-07-01 12:04:29 +01:00
gingerBill 8ddfcf174d Add #soa support to append directly 2024-07-01 11:51:28 +01:00
gingerBill 7f6fe91896 Add #soa forms to reserve, clear, and resize 2024-07-01 11:37:21 +01:00
gingerBill 11617af8f5 Add support for make(#soa[]T) etc 2024-07-01 11:34:50 +01:00
Karl Zylinski 679f9b4e41 Made default capacity of dynamic arrays more consistent.
Before this if you do `arr: [dynamic]int` and then append to arr, then it will have capacity 8.
But if you did `arr := make([dynamic]int, context.temp_allocator)` then arr would have capacity 16.

Now both `arr: [dynamic]int` and `arr := make([dynamic]int, context.temp_allocator)` will resut in arr having zero 0. The only reason to use `make` without an explicit len or cap now is because you want to set it up for a non-default allocator. After the first call to `append` it will now in both cases have capacity 8.

I also updated the documentation on the strings builder, both to reflect this, and also to fix it incorrectly saying that len would be 'max(16,len)', which wasn't true even before these changes.
2024-06-29 08:57:21 +02:00
gingerBill a1ae6f161b Merge pull request #3502 from ARtemachka/master
Fix typo in core_builtin
2024-06-28 12:00:10 +01:00
Karl Zylinski f227a40652 Replace max(8, 1) in _append_elem with just 8 and a comment. 2024-06-25 22:48:14 +02:00
Feoramund 50464bdce3 Use #any_int for reserve_* and resize_* procs
Resolves #3088
2024-06-10 20:51:58 -04:00
Artsiom Babukh 805bb69c6c Fix typo in core_builtin 2024-04-28 15:27:34 +00:00
Chris 6dcf38b85b Correct copy_from_string docs 2024-04-16 21:36:54 +01:00
gingerBill 34247b2658 Fix resize bug caused by typo 2024-03-24 12:24:44 +00:00
gingerBill 45d7dd8f27 Fix resize zeroing behaviour 2024-03-24 12:20:39 +00:00
gingerBill 29e5f94c2a Add #no_broadcast procedure parameter to disallow automatic array programming broadcasting on procedure arguments 2024-03-21 11:52:48 +00:00
gingerBill 9a41a450e7 Add builtin map_upsert 2024-03-11 12:30:24 +00:00
gingerBill fa093d9b09 Add runtime.map_insert_and_check_for_previous 2024-02-06 23:58:22 +00:00
gingerBill 55ff9b857e Add contextless where missing 2024-02-02 11:51:26 +00:00
gingerBill 9c9ae5987a Fix #3150 2024-01-29 16:21:26 +00:00
gingerBill 59575d9b22 Remove incl and excl 2024-01-29 12:52:41 +00:00
gingerBill 9e7cc8cf93 Remove core:os dependency from base:runtime; change to base:intrinsics 2024-01-28 21:59:43 +00:00
gingerBill 09fa1c29cd Move core:runtime to base:runtime; keep alias around 2024-01-28 21:05:53 +00:00