Jeroen van Rijn
37e519ffb2
Merge pull request #7607 from alyekypo/fix/scope-map-iterator-invalidation
...
fix(checker): keep entity iteration valid across a scope map rehash
2026-09-21 06:59:02 -07:00
alyekypo
23cc994255
fix(checker): keep entity iteration valid across a scope map rehash
...
`check_scope_decls` iterates a scope's entity map while
`check_entity_decl` can insert into that same scope: a procedure alias
(`f :: e`) goes through `override_entity_in_scope`, which calls
`scope_map_insert`. The map grows at 75% load (12 of 16 slots, then 24
of 32), and `scope_map_insert` grows before it probes for the key, so
even an alias that only replaces an existing value rehashes and
reallocates the table in the middle of the iteration.
`ScopeMapIterator` re-read its map on every step while `end` had
captured the capacity at loop start, so the walk continued over the new
table under the old sentinel: it ran past the end of the reallocated
table and dereferenced whatever followed it as an `Entity *` - a nullptr
dereference for a procedure scope holding exactly 12 or 24 entities - or
it stopped at the stale end index and silently skipped every declaration
that the rehash had moved behind it, which left unused declarations
without any diagnostic at all.
The iterator now snapshots the table pointer and capacity when it is
constructed, so iteration is invariant under any insert or grow and
cannot leave the table it began on. A scope that does not grow behaves
exactly as before: the snapshot points at the same table.
Refs #7598
2026-09-21 13:13:39 +00:00
Jeroen van Rijn
866fbbb250
Allow building at /
...
Fixes #7604
2026-09-21 12:04:37 +02:00
Jeroen van Rijn
ec0bd121db
Fix redecleration error for globals
2026-09-17 16:20:11 +02:00
Jeroen van Rijn
b5deedf69f
Fix #7581
2026-09-17 02:40:33 +02:00
Senthilnathan
699973abd6
Merge branch 'master' into fix/location-global-initializer
2026-09-16 18:45:52 +05:30
Senthilnathan
ed2d5304d1
fix: #location in global variable initializers
2026-09-16 18:42:10 +05:30
gingerBill
d0ee2b7ab8
Merge pull request #7550 from xdBronch/json-errors
...
fix syntax error type with -json-errors
2026-09-16 13:50:59 +01:00
gingerBill
9b2cb3277f
Merge pull request #7561 from corleypc/simd-masked-crash-fix
...
Fixes simd gather/scatter and masked load/store randomly crashing the compiler
2026-09-16 13:23:21 +01:00
gingerBill
4749b355e6
Merge pull request #7568 from krnowak/krnowak/side-effects-typo
...
Fix side_effects vs volatile typo in error message
2026-09-16 12:56:30 +01:00
gingerBill
ba92c2ebed
Merge pull request #7570 from michtesar/7544/bit-field-constant-access
...
fix constant bit_field field access returning zero value [7544]
2026-09-16 11:56:28 +01:00
gingerBill
4205d8c239
Merge pull request #7574 from Creativty/issues/7573
...
Check Enumerations iota fits explicit base type
2026-09-16 11:55:33 +01:00
gingerBill
f9162e072a
Merge pull request #7549 from corleypc/simd-select-fix
...
Fixes simd_select and simd_runtime_swizzle operand construction
2026-09-16 11:55:16 +01:00
Abderrahim Indjaren
6efcc080c2
fix: cast i64 to int for msvc warning
2026-09-16 02:48:10 +01:00
Abderrahim Indjaren
6779e1e078
add: checker checks enumeration iota fits base type
2026-09-16 02:32:15 +01:00
Michael Tesař
a26aca2fe6
fix constant bit_field field access returning zero value
2026-09-15 22:28:53 +02:00
Krzesimir Nowak
3fa08eb9d5
Fix side_effects vs volatile typo in error message
2026-09-15 21:26:41 +02:00
Jeroen van Rijn
6d23dd8367
Add macOS 27 to Where to find more information and get into contact when you encounter a bug:
...
Website: https://odin-lang.org
GitHub: https://github.com/odin-lang/Odin/issues
Useful information to add to a bug report:
Odin: dev-2026-09:315725197
OS: macOS Golden Gate 27.0.0 (build 26A428, kernel 27.0.0)
CPU: Apple M4 Pro
RAM: 24576 MiB
Backend: LLVM 22.1.8
2026-09-14 23:07:17 +02:00
Mihail Moskov
d5db73dc06
fixes simd gather/scatter and masked load/store randomly crashing the compiler
2026-09-14 15:26:46 +03:00
xdBronch
f28bb675cd
fix syntax error type with -json-errors
2026-09-12 12:17:59 -04:00
corley
4ce5148e8c
fixes simd_select and simd_runtime_swizzle
2026-09-12 18:45:32 +03:00
Jeroen van Rijn
7f6a66302f
Merge pull request #7548 from corleypc/simd-recip-fix
...
Fixes simd_approx_recip and simd_approx_recip_sqrt
2026-09-12 06:49:10 -07:00
corley
feebf91fd5
fixes simd_approx_recip and simd_approx_recip_sqrt
2026-09-12 16:27:23 +03:00
Xaryen
f4d1cc5e87
Fix #6917
2026-09-12 07:50:04 +09:00
gingerBill
49db9fd65e
Merge pull request #7530 from corleypc/simd-abs
...
simd_abs codegen improvement + fix for unsigned integers
2026-09-10 10:10:38 +01:00
Sylphrena
0d49f1fed3
Add constant -> constant index
2026-09-09 20:34:41 +02:00
Sylphrena
add1e6849a
Improve error message for constant indexing
2026-09-09 20:28:23 +02:00
Mihail Moskov
c0cd25ba76
simd_abs optimization + fix for unsigned
2026-09-09 17:13:20 +03:00
LouisTruch
9fc28251f9
intrinsics.type_elem_type() added case for Type_FixedCapacityDynamicArray
2026-09-09 12:12:59 +02:00
Jeroen van Rijn
1771b61ead
Fix ICE
2026-09-08 15:07:54 +02:00
gingerBill
45413b78a4
asm: #clobber %flags replaces #clobber flags
2026-09-08 11:56:44 +01:00
gingerBill
c9da30f51d
Minor logic clean-up
2026-09-08 11:50:52 +01:00
gingerBill
c1b51f915e
asm: Change logic for shifting with unsigned and signed numbers with n>>1 style operands
2026-09-08 11:40:32 +01:00
gingerBill
2816c1a4ae
asm: Improve error propagation with condition code identifiers
2026-09-08 10:41:53 +01:00
gingerBill
b703f33d22
asm: Give good error message when trying to use condition code identifiers that are not defined, even giving hints as to what you should define them as.
2026-09-08 10:37:29 +01:00
gingerBill
cdaf95f8ec
Disable LLVM_ASM_DEBUG_PRINT
2026-09-08 10:08:48 +01:00
gingerBill
e5bce4b2ad
asm: add exceptions to the whole descriptor-table ops (lgdt/lidt/sgdt/sidt)
2026-09-08 10:05:54 +01:00
gingerBill
a6004f297f
Improve describe_form for AsmOperand_RegisterShift
2026-09-08 09:37:28 +01:00
gingerBill
994dc84c2b
Support printing for n<<1 style operands
2026-09-08 09:31:03 +01:00
gingerBill
2a48d1f3be
asm: Support add x, y, z<<1 style syntax for the arm64 target
2026-09-08 09:16:45 +01:00
gingerBill
56f0fbe1c2
Fix scaled-index shift test to only test on arm64
2026-09-07 19:00:05 +01:00
gingerBill
654b3a8895
asm: Generalize memory operand syntax to a flat term list
...
Parse `[...]` as `term { (+|-) term }` where each term is `operand [ (*|<<|>>) operand ]`.
This allows for constant-only terms to be folded in-place, especially for things like displacement.
e.g. `[p + 8*32]` means `[p + 256]`.
Term order is also free: `[8 + p]` == `[p + 8]`
2026-09-07 18:39:59 +01:00
gingerBill
c59786ce87
asm: Constant fold [ptr + 8*32] to mean [ptr + 256], and not index=8/scale=32
2026-09-07 15:45:44 +01:00
gingerBill
94aba2bd6b
Support #reserve for asm registers
2026-09-07 14:43:58 +01:00
gingerBill
773383879a
Fix #7521 - check for target feature for parameters not being enabled and then labelled correctly
2026-09-07 13:04:41 +01:00
gingerBill
bea8fc68af
Fix label printing for amd64
2026-09-07 12:53:48 +01:00
gingerBill
6455ea5535
Correctly handle dealing with in and out mnemonics which have loads of implicit operands
2026-09-07 12:50:20 +01:00
gingerBill
3f873d656c
Check for non allocateable registers and disallow them to be pinned to output parameters
2026-09-07 12:26:38 +01:00
gingerBill
c7201725d5
Support %rip relative memory operands for amd64 [.label]
2026-09-03 18:09:23 +01:00
Jeroen van Rijn
44ac0eead7
Add ctrl-c handler to run_subprocess
...
Catch ctrl-c in `odin run` to shutdown child process without taking down the compiler also.
Fixes #7499
2026-09-02 23:44:26 +02:00