aboutsummaryrefslogtreecommitdiff
path: root/base/runtime
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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.
* | 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-1423-42/+42
|/ | | | 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
|
* Fix `-vet-tabs` issuesgingerBill2024-08-241-2/+2
|
* Merge pull request #4089 from laytan/riscv64gingerBill2024-08-223-0/+15
|\ | | | | add support for linux_riscv64 and freestanding_riscv64
| * add support for linux_riscv64 and freestanding_riscv64Laytan2024-08-203-0/+15
| |
* | fix i128 division?Laytan2024-08-201-4/+22
|/
* implement lshrti3 on wasmLaytan Laats2024-08-181-0/+21
|
* Add `assert_contextless`, `panic_contextless`, `unimplemented_contextless`gingerBill2024-08-142-0/+31
|
* Merge pull request #4056 from laytan/re-enable-runtime-wasm-stuffgingerBill2024-08-131-11/+2
|\ | | | | re-enable some wasm things in runtime
| * re-enable some wasm things in runtimeLaytan Laats2024-08-101-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No idea why the floattidf procs are bodged to return 0, does somebody know? I have just enabled the original codepath, if nobody knows I suggest just enabling it and see if we get complaints, it works on all wasm stuff I tried. The linkage being set to "internal" instead of "strong" is actually causing problems in my projects which is what prompted looking at this in the first place, some of these functions were actually needed but not added/used because they had internal linkage. This only happens on bigger projects (or just when using f16?). Unfortunately `git blame` gave me this generic commit: https://github.com/odin-lang/Odin/commit/94bad4d7861c78b9e7191ec0c3114861a1536d5c#diff-fb9f42022cb95efa59d16813546b8cb310234428c85edfabf09b1425c9dc46af
* | fix copy-paste error in `make` docsLaytan Laats2024-08-111-2/+2
| |
* | typo fixAbdul Rahman Sibahi2024-08-111-1/+1
|/
* Bodge: Improve `aligned_resize` logicgingerBill2024-08-061-8/+15
|
* Update builtin constantsDamian Tarnawski2024-07-311-2/+3
|
* fix some bugs with -disable-assertLaytan Laats2024-07-161-1/+2
|
* help `fmt` with `Type_Info_Struct` and `Type_Info_Bit_Field` changesLaytan Laats2024-07-151-10/+10
|
* Type erase `_make_dynamic_array_len_cap`gingerBill2024-07-151-6/+13
|
* Add `#force_no_inline`gingerBill2024-07-141-6/+6
|
* Minor clean upsgingerBill2024-07-141-8/+11
|