gingerBill
ba13344c1f
Pass a local declaration's dependencies to those it is in once checked, remove the dependency tree update, find the global initialization order in the background, and stop linking every polymorphic call's scope into its declaration's
2026-10-05 13:20:26 +01:00
gingerBill
bcf0ac7b21
Match polymorphic procedure specializations by parameter names at every depth so they no longer depend on which call site is checked first
2026-10-05 12:28:46 +01:00
gingerBill
5795183b75
Queue a polymorphic specialization's body when it is first used rather than when it is generated, so the minimum dependency set is only generated once; assert that every body in it was checked rather than checking any missed ones late
2026-10-03 19:37:26 +01:00
gingerBill
5c787d0e72
Re-enable the temporary_allocator() and fix the arena_temp_end
2026-10-03 18:17:25 +01:00
gingerBill
0b325449a4
Merge branch 'bill/llvm-backend-improvements' of https://github.com/odin-lang/Odin into bill/llvm-backend-improvements
2026-10-03 12:38:08 +01:00
gingerBill
5031e2733e
Add the comparison procedures of types in the type table and map keys as dependencies making the backend no longer has to create missing procedures
2026-10-03 12:38:00 +01:00
gingerBill
9f2a5147bd
Fix: Mark a generated polymorphic procedure before publishing it to other threads
2026-10-03 12:10:12 +01:00
gingerBill
c628768c5e
Strip constant parameters from specialized procedure types; fix calling a parenthesized polymorphic callee
2026-10-02 23:11:13 +01:00
gingerBill
1d3f982b50
Allow intrinsics.procedure_of on procedures without results or requiring a context; treat a specialized procedure's type as concrete
2026-10-02 17:10:03 +01:00
gingerBill
f0ac6c3fba
Fix #7700 : constant #soa field access yields the per-element field array; compare and canonicalize typeid constants
2026-10-02 16:55:57 +01:00
gingerBill
161f6e30e6
Merge pull request #7701 from odin-lang/bill/multithread-global-decls
...
Multithread The Entire Semantic Checker
2026-10-02 14:17:23 +01:00
gingerBill
0915bdcb92
Reject procedure group candidates whose $T/S parameters cannot take the operands before checking their signatures; compare polymorphic instances by an identity hash before are_types_identical
2026-10-02 13:37:32 +01:00
gingerBill
6bc4b69ab8
Fix #7316 : a polymorphic procedure in a constant compound literal is its instance, not nil
2026-10-02 13:03:48 +01:00
gingerBill
3b6a32398b
Merge pull request #7692 from corleypc/must-tail-disallow-odincc
...
Disallows the Odin calling convention with #must_tail
2026-10-02 11:38:27 +01:00
gingerBill
c494c7a503
Check global entity groups in parallel
...
* CAS-claimed entities, cycle-safe waits for entities and records, lazy entities without lazy_mutex
* Build union type names only on error, take the error block only to report proc group overload errors
2026-10-01 23:17:34 +01:00
gingerBill
5f579a1a10
Fix numerous race conditions: clone polymorphic defaults per call, evaluate foreign import attributes after collection, own dependencies for record instances, sorted Objective-C emission, no debug line for anonymous records
2026-10-01 21:55:25 +01:00
gingerBill
73c3a96de1
Make global checking state thread-safe: read-only global scopes, per-group untyped and #soa, deferred link-name checks, fresh contexts for on-demand globals
2026-10-01 21:07:41 +01:00
gingerBill
38fa57e907
Make global checking and codegen order-independent
2026-10-01 15:01:14 +01:00
gingerBill
c6b9f8d998
Try to fix the #+lazy entities
2026-10-01 13:51:40 +01:00
gingerBill
b06c5ffa70
Add -internal-global-entity-graph; Fix union type inference bug
2026-10-01 13:42:32 +01:00
Mihail Moskov
016414cc88
disallows odin cc with #must_tail
2026-10-01 15:09:24 +03:00
gingerBill
9602f57513
Minor refactor for visited sections
2026-10-01 11:03:10 +01:00
gingerBill
3551707607
parapoly: allow a constant default value for a polymorphic parameter
2026-10-01 10:53:29 +01:00
gingerBill
4e49db59a8
parapoly: default untyped args against a still-polymoprhic parameter
2026-10-01 09:54:10 +01:00
gingerBill
98203dbd56
parapoly: remove the in-place polymorphic match; substitution engine is now the only resolver
2026-10-01 09:27:34 +01:00
gingerBill
7c8dfd4cff
Improve mixed order ternary type inference and poly-determination diagnostics
2026-10-01 01:30:38 +01:00
gingerBill
66111934c3
Allow parapoly procs to be in @(deferred_*) attributes
2026-10-01 01:17:40 +01:00
gingerBill
d89709fea0
Allow untyped {...} against a union to be inferred correctly
2026-10-01 00:57:45 +01:00
gingerBill
614b45e919
Add optional annotations for the next error source line.
2026-10-01 00:49:36 +01:00
gingerBill
f65f3cd4da
parapoly: Fix bug on error reporting when none of the parameters match in a parapoly procedure
2026-10-01 00:22:06 +01:00
gingerBill
96dd7d22ec
Improve the the ambiguous calls stuff further by trying to find a confident diagnosis
2026-10-01 00:17:12 +01:00
gingerBill
668559beeb
Improve parapoly error messages for near misses and de-emphasize overloads whose first parameter cannot accept the first argument's container
2026-10-01 00:10:56 +01:00
gingerBill
5621e4e829
Allow append(&a, {1, 2})
2026-09-30 23:42:22 +01:00
gingerBill
e961edcea2
Handle ternary expressions when doing implicit parapoly determination
2026-09-30 23:13:48 +01:00
gingerBill
a79cce3945
parapoly: Fix more cases of untyped expressions
2026-09-30 23:05:58 +01:00
gingerBill
bbb2cf19a2
Begin work on deferring untyped compound literals in polymorphic call contexts
2026-09-30 23:00:17 +01:00
gingerBill
255b3da8b5
parapoly: match $T/Constraint through the subst engine
2026-09-30 21:58:47 +01:00
gingerBill
93a3312a29
Remove parapoly scaffolding and fix map internal generation
2026-09-30 20:49:28 +01:00
gingerBill
47ffc56d1a
Handle anonymous parapoly unions better
2026-09-30 19:44:23 +01:00
gingerBill
fa8588189d
Continue to flesh out the new poly-subst engine
2026-09-30 19:01:38 +01:00
gingerBill
796fd261a4
Begin work on the improving the parapoly substitution engine
2026-09-30 17:36:14 +01:00
gingerBill
3b9ef40fae
Clean up comments and add more wait signal guards for union variants
2026-09-30 15:53:31 +01:00
gingerBill
3b366c9e29
Begin work on handling the wait signals correctly for union variants throughout
2026-09-30 15:32:49 +01:00
gingerBill
98fd36b0e7
Fix [$E]$T bug where you need to capture polymorphic element node before rewriting the poly in place
2026-09-30 14:49:11 +01:00
gingerBill
781d9cbd8b
parapoly: fix proc-cache race, record ABBA deadlock, and over-eager poly matching
...
Three fixes to the parametric-polymorphism checker.
src/check_expr.cpp
- find_or_generate_polymorphic_procedure: close a check-then-act race in the
generated-procedure cache. Both lookups ran under a shared lock that was
released before the insert, so two threads instantiating the same
specialization could both miss and each publish a distinct entity. Re-check
under the exclusive lock, now held across construction and the array_add so
find-then-publish is atomic. Factor the reuse path into
reuse_gen_polymorphic_procedure.
- is_polymorphic_type_assignable: require BOTH components to match for maps and
enumerated arrays (|| -> &&). The old || accepted e.g. map[int]$V against
map[string]f32 (binding $V and deferring the key mismatch to a confusing
assignment error); it now fails cleanly at inference. Both sides are still
evaluated, so modify_type side effects are unchanged.
src/check_type.cpp, src/check_expr.cpp
- check_struct_type: release the originating record's gen_types mutex right after
the instantiation is published, before checking its fields. Holding it across
field-checking (which instantiates other records) allowed a cross-record ABBA
deadlock between mutually-recursive generic structs instantiated concurrently;
concurrent finders now synchronize via the existing fields_wait_signal.
Canonicalize the instantiation name before publishing
(set_polymorphic_record_instantiation_name) so the early release cannot expose
a torn Named.name. Unions are left unchanged: they lack a variants-ready
signal, so early release is not yet safe for them.
2026-09-30 14:39:47 +01:00
gingerBill
bc8635dbe7
Merge pull request #7674 from louisnovy/fix-deferred-procedure-conditional-calls
...
Fix #5105 and #5569 : Deferred call in short circuits causes LLVM codegen failure
2026-09-30 11:11:52 +01:00
Louis Novy
db46204e38
Catch calls of a deferred out proc in short circuits during check
2026-09-29 19:22:01 -04:00
gingerBill
383a2fe1e5
Reject complex/quaternion component overflow to match normal floats
2026-09-29 16:34:06 +01:00
gingerBill
95df4904e8
Change struct Complex128 and struct Quaternion256 to use ExactValue elements to allow for the new Big_Rat benefits that floats get
2026-09-29 16:00:28 +01:00
gingerBill
29b681b43d
Handle more cases where ExactValue_Float was being handled but not for ExactValue_Rational
2026-09-29 15:21:00 +01:00