Commit Graph
8484 Commits
Author SHA1 Message Date
bplu4t2f b17c76e5a4 !!WIP!! Merge branch 'master' into speedup-ci - missing tests/issues/run.bat and run.sh changes 2026-10-09 20:56:04 +02:00
bplu4t2f 18d3de890c XML hot path: Cleanup 2026-10-09 14:34:02 +02:00
bplu4t2f cde71cdfc0 XML hot path: Cleanup instrumentation 2026-10-09 14:18:27 +02:00
bplu4t2f 94ea51a5d1 XML hot path: Use an arena instead of strings_to_free. 2026-10-09 14:00:56 +02:00
bplu4t2f f1673a3140 Disable instrumentation for measurement (also when is awkward here :( bill what were you thinking) 2026-10-09 13:22:42 +02:00
bplu4t2f f25fc5b2a8 XML hot path: Instrumentation and some optimizations 2026-10-09 13:11:08 +02:00
gingerBill 300f980e1c Merge pull request #7832 from aakamenov/text-edit-translation-fix-1
text/edit: fix "word right" translation
2026-10-09 10:55:21 +01:00
gingerBill 93f71c2751 Merge pull request #7842 from bbodi/fix/llvm-objc-varargs
Fix/llvm objc varargs
2026-10-09 10:54:21 +01:00
gingerBill 84e733b6d6 Merge branch 'master' into bill/more-atomic-analysis 2026-10-08 23:55:24 +01:00
gingerBill db97323760 Treat unknown sync objects as anything; mark libc, chan, pools, nbio, SDL and Linux futexes 2026-10-08 23:26:13 +01:00
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
bplu4t2f a252797538 Add comment for potential optimization 2026-10-08 23:11:48 +02:00
bplu4t2f 2d2cf5e581 strings.write_rune doesn't round-trip all the way through I/O to call append 2026-10-08 23:11:05 +02:00
BBandClaude Opus 5.5 baca00868b Pass va_list by value to libc's v* functions
C passes a va_list argument by value. The bindings took ^va_list, which
only matches x86-64 System V, where va_list is an array that decays to
a pointer. On Darwin, Windows and the other targets va_list is a
pointer or a struct, so vsnprintf and friends received the address of
the list instead of the list and printed or scanned garbage.

The foreign declarations now use the platform's form, and the public
procedures keep taking ^va_list so callers stay portable.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 22:10:02 +02:00
aakamenov ffa9b5cb73 text/edit: fix "word right" translation 2026-10-08 20:51:58 +03:00
Jeroen van Rijn 1ee37f38a1 Merge branch 'master' into fix-7763 2026-10-08 10:06:44 -07: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
bplu4t2f bb5fe2173d Make math/big parsing huge radix 16 integers from strings way faster (big speedup to core tests in CI) 2026-10-08 18:02:45 +02: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
bplu4t2f ea224d0f7e Fix #7763: Fix base64 decoder edge case 2026-10-07 19:30:48 +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