bbodi
d65a9ba9bc
Keep disabled procedures whose value is taken
...
A procedure with `@(disabled=true)` adds no dependency where it is
used, so that the calls to it, which are removed, do not pull it in.
Taking its value, e.g. `rawptr(assert)` with `-disable-assert`, then
referenced a procedure that was never generated, and LLVM asserted
"missing procedure 'assert'".
Add the dependency for every use that is not the callee of a call.
2026-10-08 15:51:24 +02:00
gingerBill
535132a22e
Add @(futex_parameter="name")
2026-10-08 10:46:58 +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
158d0a9d8d
Replace the #+escape-analysis/#+atomic-analysis file tags with #+analysis which takes names and ! like #+vet
2026-10-07 22:50:20 +01:00
gingerBill
b12195bebf
Add an atomic memory ordering analysis (-no-atomic-analysis, #+atomic-analysis, #+no-atomic-analysis) warning where release or acquire ordering pairs with nothing, and -vet-atomic-access for plain reads of what is accessed atomically
2026-10-07 22:43:08 +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
gingerBill
d728de8a20
Add #+escape-analysis and #+no-escape-analysis file tags, and keep the syntactic check of unsafe returns where the escape analysis is disabled
2026-10-07 21:06:56 +01:00
gingerBill
6784db9f86
Add -no-escape-analysis, which cannot be used with -vet-nil-deref or -vet-uninitialized
2026-10-07 20:56:04 +01:00
gingerBill
20c603392e
Analyse the escape summaries in the strongly connected components of the recorded calls, so the results are deterministic
2026-10-07 17:44:59 +01:00
gingerBill
b2aa2457f7
Don't report a deprecated procedure for being named in a procedure group but only when a call selects it
2026-10-07 16:00:01 +01:00
gingerBill
5ff7268cab
Add @(align=N) for variables, raising the alignment of globals, locals, @(static) and @(thread_local) variables to at least N
2026-10-07 15:54:21 +01:00
gingerBill
bc56d95e63
Add interprocedural summaries to the escape analysis, analysing callees on demand
2026-10-07 15:08:05 +01:00
gingerBill
a720b0699e
Release nested procedures before running the escape analysis on their parent
2026-10-07 13:58:15 +01:00
gingerBill
8ea02cc733
Add flow-based escape analysis of stack memory, reported as warnings
2026-10-07 13:08:22 +01:00
gingerBill
e702482f38
Group the per-thread error state into ErrorContext
2026-10-07 11:25:53 +01:00
gingerBill
86502ed7ec
Show where parapoly procedures and records were instantiated in errors within them
2026-10-07 11:08:13 +01:00
gingerBill
25946eb2f1
Merge pull request #7789 from Barinzaya/bounds_check_with_context
...
Context-aware bounds check handling
2026-10-06 15:55:45 +01:00
Barinzaya
8075b343c5
Split bounds check handlers into contextless and with_context.
...
When a `context` is available, the `with_context` variant will be called
and the `context.assertion_failure_proc` will be called, instead of
forcibly trapping. This allows bounds check errors able to be handled by
custom assertion failure procs.
2026-10-06 09:45:36 -04:00
gingerBill
811658f915
Collect a global foreign block with its file when its attribute values are literals.
2026-10-05 16:55:03 +01:00
gingerBill
0e26e26a0d
List each file's possible type aliases as they are collected, gather the global entities whilst they are corrected, and only destroy the checker once parsing reported no errors
2026-10-05 16:36:17 +01:00
gingerBill
6aac694c18
Export the entities and scan for global whens and foreign blocks while the import graph and package order are being made
2026-10-05 16:12:20 +01:00
gingerBill
1669cf6192
Collect each package's entities as soon as it has parsed all of its files; hold any non-syntactic errors until all of the parsing is done and only report if there are no parsing errors
2026-10-05 15:40:33 +01:00
gingerBill
b2b03b68aa
Create the file scopes, imports, and canning of whens in parallel
2026-10-05 15:08:35 +01:00
gingerBill
4ad95d54b8
Gather the global entities in order from a list for each file instead of sorting them all by only sorting the files with some added out of order
2026-10-05 14:43:36 +01:00
gingerBill
b6435bf7b7
Remove the declarations' child list; take entity ids in blocks per thread; collect the files with the most declarations first
2026-10-05 14:19:07 +01:00
gingerBill
1082e0df9f
Wait for the type and inline cycle checks only after the min dep set
2026-10-05 13:32:39 +01:00
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
b57da82909
Find the global initialization order from a sorted array of the ready variables and a heap for those ready later and build the predecessors in its task rather than on the main thread
2026-10-05 10:55:13 +01:00
gingerBill
0e9c80985b
Overlap the entity graph's setup with later stages, collect the min dep type info per thread without a lock (skipping polymorphic parameters) and hash it in parallel, and format 64-bit big ints directly
2026-10-05 10:30:24 +01:00
gingerBill
a7bca01b58
Add task groups to the thread pool so that a stage waits only for its own tasks; overlap the scope usages and the cycle checks with the stages after them
2026-10-05 09:14:39 +01:00
gingerBill
95f3194c08
Divvy out the entity graph's edge searches one node at a time and empty each search's visited set by what was put in it
2026-10-05 08:54:24 +01:00
gingerBill
92fbab1b5a
Find the global initialization order alongside the minimum dependency set as only the backend reads it
2026-10-05 08:37:49 +01:00
gingerBill
ba17318ff6
For the min dep set, do not record local variables, constants, or labels
2026-10-05 08:25:20 +01:00
gingerBill
5adc9426a1
Mark the min dep set's entities with no declaration without walking them, skip the type info lock for types already added, and split the walk into tasks sooner
2026-10-05 00:52:07 +01:00
gingerBill
003e64ca4b
Sort the lazily checked entities with natural_merge_sort too
2026-10-05 00:17:37 +01:00
gingerBill
5a2f09b002
Add natural_merge_sort in sort.cpp and use it to sort the global entities
2026-10-05 00:15:41 +01:00
gingerBill
6abf51b621
Add untyped expression values in parallel with a thread_pool_for_chunks helper shared with the cycle scan
2026-10-04 23:53:55 +01:00
gingerBill
caefb4809d
Remove add_type_info_for_type_definitions which ran before any minimum dependency count was set and so never added anything
2026-10-04 23:39:12 +01:00
gingerBill
043890d609
Check for type and inline cycles in one parallel pass over the definitions
2026-10-04 23:34:28 +01:00
gingerBill
07b984f9c9
Correct type aliases per package in parallel, visiting only constants of an identifier
2026-10-04 22:34:00 +01:00
gingerBill
9a521c6064
Check file scope directives in parallel once every global entity has been checked
2026-10-04 21:50:44 +01:00
gingerBill
707c314aaa
Remove the global locks from resolving import paths and queue an import's package as soon as the import is parsed
2026-10-04 20:12:59 +01:00
gingerBill
e774d7954c
Allow the compiler with slightly older forms of the compiler which only have default_hasher and not default_hasher_fixed
2026-10-04 19:36:19 +01:00
gingerBill
bdb0364739
Remove the missing procedures fallback from the backend: the checker adds the Objective-C runtime procedures the backend calls, local foreign procedures with a duplicate name are bound to the existing declaration, and local procedures passed to a $ parameter are created up front
2026-10-03 22:26:08 +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
32f30c3eb3
Tokenize whilst parsing rather than storing every token of a file first
2026-10-03 16:03:59 +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
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
14950b8ae9
Park nested procedures on their parent until its body is checked instead of re-queuing; per-entry #load caches and parallel #load_directory reads; don't merge dependencies into package-level declarations; separate the thread pool's contended fields onto their own cache lines
2026-10-02 12:55:09 +01:00