aboutsummaryrefslogtreecommitdiff
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Fix use of errno on OpenBSD.Dave Voutila2025-03-271-1/+1
|
* Merge pull request #4836 from laytan/fix-wrong-out-of-memorygingerBill2025-03-201-6/+7
|\ | | | | fix wrong out of memory in edge cases, just try allocate from block for one source of truth
| * fix wrong out of memory in edge cases, just try allocate from block for one ↵Laytan Laats2025-02-121-6/+7
| | | | | | | | source of truth
* | Fix #4903gingerBill2025-03-031-1/+3
| |
* | Merge pull request #4466 from Barinzaya/simd_extract_msbsgingerBill2025-02-241-0/+3
|\ \ | | | | | | SIMD Extract MSbs/LSbs Intrinsics
| * | Added simd_extract_lsbs intrinsic as well.Barinzaya2025-02-241-0/+1
| | | | | | | | | | | | | | | Equivalent to the simd_extract_msbs intrinsic, except it extracts the least significant bit of each element instead.
| * | Added simd_extract_msbs intrinsic.Barinzaya2025-02-241-0/+2
| | |
* | | Add `@(require_results)` to random generatorgingerBill2025-02-241-0/+1
|/ /
* | Fix `typeid` size for 32-bit platformsgingerBill2025-02-201-0/+2
| |
* | Keep -vet happygingerBill2025-02-201-1/+1
| |
* | Change `typeid` definition to be based around the canonical type hashgingerBill2025-02-201-47/+9
|/ | | | | | | | `typeid` used to be a fancy index with extra metadata stored on it. Now it is direct hash of the type. This is safe to do in practice since any possible collisions are checked at compile time AND the chances of having a 1% collision are around 1 in 600K (see the Birthday Paradox). Therefore accessing a `^Type_Info` is now a hash table lookup with linear probing. The table is twice the size than necessary so prevent too much probing due to an overly dense hash table.
* Added support for growing in place to some arenas.Barinzaya2025-01-241-4/+18
| | | | | | | | | | | | | This affects `runtime.Arena` and `virtual.Arena`, but not currently `mem.Arena`. These changes allow the last allocation that has been made to be resized to a larger size by just extending their allocation in-place, when there's sufficient room in the memory block to do so. Shrinking in place and re-using the rest of the allocation can be supported using almost the same logic, but would require the memory to be zeroed. Since this would add a additional cost that isn't currently present, shrinking has not been changed.
* Add `priority_index` to `Foundation.framework` import in `base:runtime`gingerBill2025-01-221-0/+1
|
* fix map_entry sometimes giving wrong key pointerLaytan Laats2025-01-181-10/+27
| | | | | | | `map_desired_position` does not return the actual position, probing must be done afterwards to figure out the real position. `map_entry` did not do this for the returned key pointer so it could point to the wrong key if probing was done.
* Fix: Issue with non-zeroed memory after arena_temp_and;alektron2025-01-151-1/+2
| | | | Fix: total_used field of growing Arena was not decremented correctly in arena_temp_end;
* Merge pull request #4599 from Barinzaya/fix_dynamic_resize_zeroing_on_growgingerBill2025-01-061-3/+5
|\ | | | | Fix dynamic array not zeroing when growing
| * Fixed zeroing in resize_dynamic_array.Barinzaya2024-12-191-3/+5
| | | | | | | | | | | | When a dynamic array has unused capacity and is resized to a size greater than its capacity, the unused part of its capacity wasn't being zeroed.
* | Merge pull request #4533 from laytan/map-entrygingerBill2025-01-062-0/+49
|\ \ | | | | | | add `map_entry` procedure
| * | add `map_entry` procedureLaytan Laats2024-11-282-0/+49
| |/
* | Merge pull request #4623 from Yawning/feature/rt-assert-ensuregingerBill2025-01-061-0/+29
|\ \ | | | | | | base/runtime: Add `ensure` and `ensure_contextless`
| * | base/runtime: Add `ensure` and `ensure_contextless`Yawning Angel2024-12-251-0/+29
| |/ | | | | | | | | | | | | This provides an equivalent to `assert` and `assert_contextless` that are always evaluated, ignoring `ODIN_DISABLE_ASSERT`, which is useful for enforcing API contracts or "asserting" on conditionals with side-effects.
* | Merge pull request #4654 from obiwan87/masterLaytan2025-01-052-2/+6
|\ \ | | | | | | Minor adjustments in documentation-only files for better LSP support
| * | spacingLaytan2025-01-051-0/+1
| | |
| * | Import "base:runtime" to resolve reference to type info correctlyAntonino Simone Di Stefano2025-01-031-0/+2
| | |
| * | Remove typeidAntonino Simone Di Stefano2025-01-031-1/+1
| | | | | | | | | | | | seems to be a typo
| * | Make expect parameter polymorphicAntonino Simone Di Stefano2025-01-031-1/+1
| | |
| * | Import "base:runtime" to make type references validAntonino Simone Di Stefano2025-01-031-0/+1
| |/
* | fix N=1 and cleanup testsfleandro2025-01-031-6/+6
| |
* | runtime: map_cell_index_static produced wrong results when the number of ↵fleandro2025-01-031-5/+5
|/ | | | elements per cell was a power of 2
* Fix #4509Jeroen van Rijn2024-11-241-0/+2
|
* [runtime] `make(map[K]V)` should not allocate any capacityTetralux2024-11-161-2/+2
| | | | | | | `make(map[K]V)` was resolving to `make_map_cap()` which allocates initial capacity when it wasn't intended to. It now calls `make_map()` which doesn't allocate any capacity. Both `make(map[K]V)` and `make(map[K]V, allocator)` will NOT allocate initial capacity now.
* Remove `#relative` types from the compilergingerBill2024-11-142-24/+0
|
* math/rand: add `choice_bit_set`Laytan Laats2024-10-261-13/+1
|
* Add make_map that just takes an allocator and no capacity, similar to ↵Karl Zylinski2024-10-021-2/+14
| | | | make_dynamic_array. This renames the old make_map to make_map_cap.
* Add documentation to `runtime.container_of`mtarik34b2024-09-291-0/+33
|
* Fix 128-bit integer support for wasm targetsgingerBill2024-09-201-19/+41
|
* Merge pull request #4270 from flysand7/heap-alloc-resize-fixgingerBill2024-09-191-10/+12
|\ | | | | Fix resize OOB when copying old data that's bigger than new data
| * Fix vet errorsflysand72024-09-191-1/+0
| |
| * Fix resize OOB when copying old data that's bigger than new dataflysand72024-09-191-9/+12
| |
* | Merge branch 'master' into file-tags-without-commentsKarl Zylinski2024-09-172-6/+9
|\|
| * Merge pull request #4242 from laytan/caller-expressiongingerBill2024-09-161-2/+2
| |\ | | | | | | add '#caller_expression'
| | * add '#caller_expression'Laytan Laats2024-09-141-2/+2
| | |
| * | [mem]: Fix handling of default resize to check alignmentflysand72024-09-111-4/+7
| |/
* / Moved all packages in core, base, vendor, tests and examples to use new #+ ↵Karl Zylinski2024-09-1424-43/+43
|/ | | | file tag syntax.
* Added `#any_int` directive to some more builtin slice/dynamic arrayFranz Hoeltermann2024-09-032-13/+13
| | | | procedures
* Added `#any_int` to some #soa procs to mirror the behaviour of theirFranz Hoeltermann2024-09-031-5/+5
| | | | non-soa counterparts
* Move some types to runtime, use reflection instead of lutDamian Tarnawski2024-08-291-0/+29
|
* Add API for freeing `thread_local` stateFeoramund2024-08-261-0/+34
|
* Add `intrinsics.type_has_shared_fields`gingerBill2024-08-241-0/+2
|
* Fix `-vet-tabs` issuesgingerBill2024-08-241-2/+2
|