336 Commits

Author SHA1 Message Date
Barinzaya 5f46b5ca50 Fixed zeroing in resize_dynamic_array.
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.
2024-12-19 17:52:09 -05:00
Laytan Laats 8050622fe6 add map_entry procedure 2024-11-28 20:07:54 +01:00
Jeroen van Rijn 56e4da8546 Fix #4509 2024-11-24 13:08:24 +01:00
Tetralux 2f85257bad [runtime] make(map[K]V) should not allocate any capacity
`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.
2024-11-16 06:13:12 +00:00
gingerBill e38a08013e Remove #relative types from the compiler 2024-11-14 16:17:24 +00:00
Laytan Laats 10c2f8dbeb math/rand: add choice_bit_set 2024-10-26 13:50:28 +02:00
Karl Zylinski fd05d94789 Add make_map that just takes an allocator and no capacity, similar to make_dynamic_array. This renames the old make_map to make_map_cap. 2024-10-02 17:47:04 +02:00
mtarik34b 82aefd4203 Add documentation to runtime.container_of 2024-09-29 16:04:39 +02:00
gingerBill b116e8ff55 Fix 128-bit integer support for wasm targets 2024-09-20 01:29:39 +01:00
gingerBill 290561a39b Merge pull request #4270 from flysand7/heap-alloc-resize-fix
Fix resize OOB when copying old data that's bigger than new data
2024-09-19 12:57:18 +01:00
flysand7 bec09d82df Fix vet errors 2024-09-19 21:07:08 +11:00
flysand7 e0bb07728d Fix resize OOB when copying old data that's bigger than new data 2024-09-19 20:55:52 +11:00
Karl Zylinski 093ade0504 Merge branch 'master' into file-tags-without-comments 2024-09-17 19:36:17 +02:00
gingerBill a16d3b6c9a Merge pull request #4242 from laytan/caller-expression
add '#caller_expression'
2024-09-16 17:36:46 +01:00
Laytan Laats 603efa860a add '#caller_expression' 2024-09-14 22:13:37 +02:00
Karl Zylinski 19f0127e55 Moved all packages in core, base, vendor, tests and examples to use new #+ file tag syntax. 2024-09-14 18:27:49 +02:00
flysand7 f16ed256ea [mem]: Fix handling of default resize to check alignment 2024-09-11 08:00:27 +11:00
Franz Hoeltermann 02da1ac9af Added #any_int directive to some more builtin slice/dynamic array
procedures
2024-09-03 12:36:32 +02:00
Franz Hoeltermann b618b665c6 Added #any_int to some #soa procs to mirror the behaviour of their
non-soa counterparts
2024-09-03 11:46:09 +02:00
Damian Tarnawski a10f988020 Move some types to runtime, use reflection instead of lut 2024-08-29 21:12:33 +02:00
Feoramund d338642dc4 Add API for freeing thread_local state 2024-08-26 06:01:59 -04:00
gingerBill d0eaf7642d Add intrinsics.type_has_shared_fields 2024-08-24 14:36:18 +01:00
gingerBill eb799393d5 Fix -vet-tabs issues 2024-08-24 13:56:41 +01:00
gingerBill 70932dc478 Merge pull request #4089 from laytan/riscv64
add support for linux_riscv64 and freestanding_riscv64
2024-08-22 11:20:03 +01:00
Laytan 85a33a1c9b add constant_log2 to intrinsics file 2024-08-20 19:14:50 +02:00
Laytan 8f2d3dc955 fix i128 division? 2024-08-20 19:01:09 +02:00
Laytan ca6ef95b03 add support for linux_riscv64 and freestanding_riscv64 2024-08-20 14:06:40 +02:00
Laytan Laats b2e64b7ce0 implement lshrti3 on wasm 2024-08-18 17:09:57 +02:00
gingerBill 78fa675c1a Add assert_contextless, panic_contextless, unimplemented_contextless 2024-08-14 11:18:24 +01:00
gingerBill 66d3082a9a Merge pull request #4056 from laytan/re-enable-runtime-wasm-stuff
re-enable some wasm things in runtime
2024-08-13 14:04:19 +01:00
Laytan Laats 26fa3aca44 fix copy-paste error in make docs 2024-08-11 17:09:26 +02:00
Abdul Rahman Sibahi 67251ad5b8 typo fix 2024-08-11 14:30:48 +03:00
Laytan Laats 7fd8b9c55b re-enable some wasm things in runtime
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
2024-08-10 23:10:30 +02:00
Feoramund 7a367c9c08 Fix documented names of a few SIMD procedures 2024-08-06 14:49:56 -04:00
gingerBill bed18a17e6 Bodge: Improve aligned_resize logic 2024-08-06 11:22:34 +01:00
gingerBill f56abf3780 Add intrinsics.masked_expand_load and intrinsics.masked_compress_store 2024-08-05 14:54:09 +01:00
gingerBill 80ea4e0aeb Remove dead code 2024-08-05 14:25:33 +01:00
gingerBill 84ac56f778 Add intrinsics.simd_masked_load and intrinsics.simd_masked_store 2024-08-05 14:08:41 +01:00
gingerBill 7e701d1677 Add intrinsics.simd_gather and `intrinsics.simd_scatter 2024-08-05 13:46:24 +01:00
gingerBill 90fc52c2ee Rename add_sat -> saturating_add 2024-08-05 13:19:01 +01:00
gingerBill 9a01a13914 Add simd_reduce_any and simd_reduce_all 2024-08-05 13:13:19 +01:00
Damian Tarnawski 953ae32607 Update builtin constants 2024-07-31 18:55:04 +02:00
Laytan Laats a6d1a2e46c add #optional_ok to docs file for intrinsics 2024-07-16 22:22:06 +02:00
Laytan Laats 853487e86c fix add_sat and sub_sat intrinsics 2024-07-16 22:07:49 +02:00
Laytan Laats 28fac62a02 fix some bugs with -disable-assert 2024-07-16 18:44:18 +02:00
Laytan Laats 55e0f97cc4 help fmt with Type_Info_Struct and Type_Info_Bit_Field changes 2024-07-15 18:29:06 +02:00
gingerBill 196ac7e6d6 Type erase _make_dynamic_array_len_cap 2024-07-15 00:01:26 +01:00
gingerBill f7cb711874 Add #force_no_inline 2024-07-14 23:48:33 +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