aboutsummaryrefslogtreecommitdiff
path: root/core/runtime/dynamic_array_internal.odin
Commit message (Collapse)AuthorAgeFilesLines
* Move `core:runtime` to `base:runtime`; keep alias aroundgingerBill2024-01-281-138/+0
|
* Minor refactor of the dynamic_map_internal.odin stuffgingerBill2022-09-171-0/+2
|
* Improve `resize` callgingerBill2022-08-081-3/+7
|
* Merge pull request #1818 from IanLilleyT/reserve_exceedgingerBill2022-06-121-2/+2
|\ | | | | Dynamic array append reserves more space when it exceeds capacity
| * Reserve more space when exceeding, not meeting, capacityIan Lilley2022-06-011-2/+2
| |
* | [runtime] Add builtin `shrink` for dynamic arrays and mapsTetralux2022-06-041-0/+29
|/ | | | | | | | | | | | | | | Asks the allocator to shrink the backing allocation to the current __length__, or a capacity of the user's choosing. Returns `(did_shrink: bool, err: mem.Allocator_Error)`. ``` shrink(&array) // shrinks to len(array) shrink(&array, N) // shrink to N capacity shrink(&map) // shrinks down to len(map) shrink(&map, N) // shrink to N capacity ```
* Remove unneeded semicolons from the core librarygingerBill2021-08-311-44/+44
|
* Improve the `Allocator` interface to support returning `Allocator_Error` to ↵gingerBill2021-04-191-3/+6
| | | | | | allow for safer calls Virtually all code (except for user-written custom allocators) should work as normal. Extra features will need to be added to make the current procedures support the `Allocator_Error` return value (akin to #optional_ok)
* Reorganize runtime code into separate filesgingerBill2020-11-191-0/+100