Commit Graph
8467 Commits
Author SHA1 Message Date
gingerBill 80f640c18d Fix cond_wait synchronizing on the condition variable; match objects within each other; mark more Win32 waits 2026-10-08 23:14:14 +01:00
gingerBill 8bf769b039 Add @(synchronizes=...) to Win32 SRW locks and critical sections 2026-10-08 23:09:05 +01:00
gingerBill 3c7034c158 Add @(synchronizes) to channels; Model guards deferred unlocks when inferring 2026-10-08 23:05:45 +01:00
gingerBill 4508144727 Add @(synchronizes_shared=...) for shared locks; Infer @(synchronizes) for wrappers 2026-10-08 22:56:54 +01:00
gingerBill e0c1f9e325 Add @(synchronizes=...) to more primitives 2026-10-08 17:17:50 +01:00
gingerBill 5de6a99129 Add @(synchronizes=<Enum>); Vet plain writes; Warn on mixed-sized atomics; Count fences in callers and other branches 2026-10-08 17:16:09 +01:00
bbodi 1e8419d1d4 Fix core:simd/x86 AVX wrappers that did not build
Calling these failed to compile: `_mm256_round_pd` passed a u8 where
the intrinsic takes a u32, `_mm256_blend_pd` misspelt its parameter,
`_mm256_dp_ps` took its mask as an i8, `_mm_permute_ps/pd` used
SSE/SSE2 helpers without enabling them, and `_mm256_permute2f128_pd`
did not return its result.
2026-10-08 15:51:24 +02:00
bbodi 1e1ea828a5 Fix intrinsic signatures in core:simd/x86
`_mm_cvtsd_ss` passed two `__m128d` to `llvm.x86.sse2.cvtsd2ss`,
which takes `(<4 x float>, <2 x double>)`, so LLVM failed with
"Intrinsic has incorrect argument type". `_mm_cvtss_sd` used
`llvm.x86.sse2.cvtss2sd`, which LLVM no longer has. Both wrappers
also took the wrong operand types; use Intel's (a: __m128, b: __m128d)
and (a: __m128d, b: __m128), and express `_mm_cvtss_sd` as a lane
conversion as clang does.

`_mm_prefetch` called `llvm.prefetch` without its pointer mangling and
`__rdtscp` declared `llvm.x86.rdtscp` as taking a pointer when it
returns `{i64, i32}`; both were rejected by LLVM too.
2026-10-08 15:12:18 +02:00
bbodi 26912ceb95 Replace removed LLVM intrinsics in core:simd/x86
LLVM has dropped many x86 intrinsics in favour of generic IR, and
auto-upgrades them only when reading bitcode. Odin declares them
directly, so the calls became undefined external symbols and failed
to link, e.g. `undefined reference to llvm.x86.sse41.pmaxsb`.

Express the affected wrappers the way clang's headers now do: scalar
lane ops, simd.min/max/abs/sqrt, shuffles for the immediate blends,
masked or narrowed multiplies, conversions and an unaligned store.
`_addcarryx_*` now use `llvm.x86.addcarry.*`, as clang does.

`_mm_sqrt_ss` took an unused second argument; it now takes one, as
in Intel's definition. It could not have been used before.
2026-10-08 15:12:18 +02:00
Jeroen van Rijn a961bb5ddb Merge pull request #7818 from bbodi/fix/sha3-init-round-start
Reset keccak_round_start in _sha3.init
2026-10-08 02:51:19 -07:00
bbodi f7f3e63191 Reset keccak_round_start in _sha3.init
init left the round start untouched. A context that skipped zeroing
with `= ---`, or one reused after TurboSHAKE, kept a stale value, so
SHA-3 and SHAKE ran too few rounds and returned wrong hashes silently.
2026-10-08 11:02:47 +02:00
Jeroen van Rijn 4d09219ff4 Merge pull request #7616 from wardjm/fix/parse_int_overflow
Fixed strconv overflow noted in issue#7608.
2026-10-08 01:57:40 -07:00
Jeffrey Ward c2684b43cb Added tests from issue 7608 comments.
Fixed "_" only and no digits. Now returns an error since this is effectively passing nothing to the parser.
2026-10-07 21:28:43 -04:00
gingerBill b0c36ab7ca Merge pull request #7816 from odin-lang/bill/atomic-memory-ordering-pass
Atomic Memory Ordering and Futex Operation Passes
2026-10-07 23:36:22 +01:00
gingerBill d2d1fe8372 Remove the redundant t.flags += {.Joined} in _join on Unix, as it was already set atomically 2026-10-07 23:27:48 +01:00
gingerBill 71e6288049 Use relaxed ordering for the early load in futex_wait and futex_wait_with_timeout, as every caller acquires itself after waking 2026-10-07 23:19:25 +01:00
gingerBill ecedcbc0bf Add @(futex=.Wait) and @(futex=.Wake) with intrinsics.Futex_Operation, so the atomic analysis checks futex words, and use relaxed ordering for Atomic_Cond's counter 2026-10-07 23:18:02 +01:00
gingerBill 7571a2676f Use relaxed ordering for nbio's mpsc head counter and pool's destroy exchange, as their acquire paired with nothing 2026-10-07 22:44:36 +01:00
gingerBill 7743370a2d Merge pull request #7815 from SOBEX/llvm-fake-use
Adds binding for `llvm.fake.use`
2026-10-07 22:13:03 +01:00
gingerBill 711f08a641 Make is_type_lock_free follow what each target lowers without library calls, and reject atomics on types which are not lock-free 2026-10-07 21:58:32 +01:00
gingerBill 403738e5cd Merge pull request #7802 from odin-lang/bill/compiler-improvements-2026-10
Flow-based Escape Analysis of Stack Memory + Show where parapoly procedures and records were instantiated in errors within them
2026-10-07 21:19:06 +01:00
SOBEX 88c4c7a0f0 Adds binding for llvm.fake.use 2026-10-07 20:18:18 +02:00
gingerBill e6d0112104 Add f16 variants to the core:sys/llvm standard C library bindings 2026-10-07 17:04:22 +01:00
gingerBill 6961b36425 Fix the core:sys/llvm bindings for current LLVM, add the missing ones; allow #const parameters to take their defaults, and reuse an intrinsic already declared by the compiler 2026-10-07 16:56:25 +01:00
gingerBill 9863858570 Fix the deterministic CBOR encoding of maps with non-string keys 2026-10-07 15:52:48 +01:00
gingerBill c713bede2f Stop core and tests leaving references to stack memory behind 2026-10-07 15:49:33 +01:00
Jeroen van Rijn 45a6f83679 Merge pull request #7801 from bplu4t2f/fix-7779
Fix #7779 - Make encoding/hex behave well on errors.
2026-10-07 02:29:31 -07:00
Jeroen van Rijn c1ac93f9a6 `delete(dst, allocator) 2026-10-07 11:21:07 +02:00
bplu4t2f 758cdd19ae Fix #7779 - Make encoding/hex behave well on errors. 2026-10-07 10:47:57 +02:00
Alexander Zhura 620a7ab1c6 Impl simd x86 avx2 intrinsics set 2026-10-05 22:20:52 +03:00
Jeroen van Rijn 8ca9cc4486 Merge pull request #7755 from pJotoro/patch-1
Add GetCursor and GetDpiForSystem procedures
2026-10-05 04:15:50 -07:00
Jeroen van Rijn 4781f71276 Merge pull request #7751 from alexthed1rk/fix-simd-x86-sse2-insert
Impl simd x86 sse2 _mm_insert_epi16 fix
2026-10-05 02:41:21 -07:00
pJotoro e6d352495c Add GetCursor and GetDpiForSystem procedures 2026-10-05 11:28:11 +02:00
bplu4t2f a496d00f69 Fix incorrect number of bytes written when formatting floats with h/H 2026-10-05 10:41:27 +02:00
Alexander Zhura 6fd8888986 Impl simd x86 sse2 _mm_insert_epi16 fix 2026-10-05 10:03:06 +03:00
gingerBill 19cbd86501 Merge pull request #7738 from staledonuts/master
Fix glsl mix_vec4 and mix_dvec4 implementations
2026-10-04 18:24:41 +01:00
Jeroen van Rijn dc0b041d59 #force_inline math.lerp, unlerp, saturate 2026-10-04 19:20:29 +02:00
Jeroen van Rijn 667efeb840 Merge pull request #7731 from Arthur031221/fix/timezone-utc-nanoseconds-20261004-s29
Preserve fractional timestamps in timezone conversions
2026-10-04 05:24:55 -07:00
DeadDonuts Corp. 0ade92df56 Fix glsl mix_vec4 and mix_dvec4 implementations
Fix mix implementation typo bug.
Line 763 and 766  never used the target value to progress y  channel.
2026-10-04 11:01:30 +02:00
Jeroen van Rijn 930cb5dab3 Merge pull request #7733 from BradLewis/fix/odin-parser-for-stmt-comma
Fix odin parser assert with invalid for-in stmt
2026-10-03 15:26:13 -07:00
Brad Lewis 66ccc1011c Fix odin parser assert with invalid for-in stmt 2026-10-04 09:11:04 +11:00
gingerBill b079c1a23b Merge pull request #7672 from MatzeOGH/fast_float_swar_parse
Second Part of the Fast Float Port (SWAR based scanning)
2026-10-03 22:31:02 +01:00
Arthur031221anddozn d046345202 Preserve fractional timestamps in timezone conversions
Apply timezone offsets to the normalized nanosecond timestamp.
Test fractional roundtrips, dates before 1970 and nanosecond carry.

Co-authored-by: dozn <16659513+dozn@users.noreply.github.com>
Signed-off-by: Arthur031221 <levi74108520963@gmail.com>
2026-10-04 03:39:11 +08:00
Jeroen van Rijn d57f6d8232 Add a few more #no_bounds_check to XXH3. 2026-10-03 16:15:37 +02:00
corley b785a3fc77 adds a config for opting out of Eisel-Lemire 2026-10-03 15:39:22 +03:00
Artur Leite d8a598b1a3 Accept .Recv channels in chan.recv and chan.try_recv 2026-10-03 13:01:17 +02:00
gingerBill 1c7acfb1cf Merge pull request #7707 from odin-lang/bill/doc-comment-markdown
Adjust doc comments that misrender as CommonMark
2026-10-02 14:36:30 +01:00
gingerBill 56e7efb1d4 Adjust doc comments that misrender as CommonMark 2026-10-02 14:36:03 +01:00
Arthur031221 eaa1cb34eb Fix CBOR bit set byte order conversion 2026-10-02 18:57:49 +08:00
Arthur031221 f01284d372 [core:encoding/csv] Read the final multiline record before EOF
The multiline line reader returned EOF with buffered data, so record
parsing discarded the last row when the file had no trailing newline.
Clear EOF while data remains, as the normal line reader does.

Add regressions for final records, empty input and unterminated quotes.
The normal core suite passes 627 tests with the new CSV tests included.
2026-10-02 14:10:58 +08:00