Commit Graph
953 Commits
Author SHA1 Message Date
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
gingerBill ff9d3584f4 Per-thread arrays instead of MPSC queues for entities, definitions and untyped expressions; walk the minimum dependency set from per-task stacks, and scan its root definitions in parallel 2026-10-02 12:07:06 +01:00
gingerBill 5fbcbd17da Compare entity source order by each file's index in its package rather than its name; search the initialization-order graph's edges in parallel 2026-10-02 11:44:50 +01:00
gingerBill 0de3f92449 Thread pool: wake one sleeping worker per task instead of all, spin briefly before sleeping; walk the procedure dependency tree in chunks 2026-10-02 11:24:28 +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 66c4fe1d49 Decide cycles of global whens by trying every choice of their branches; ambiguous or contradictory cycles are errors 2026-10-01 18:49:51 +01:00
gingerBill f7ee910f93 Merge checker_global_*.cpp into checker_global.cpp; base -internal-global-entity-graph on the scheduled groups 2026-10-01 17:43:03 +01:00
gingerBill 63bd49c88b Add -internal-check-global-edges; Check global entities in dependency-ordered groups of a syntactic graph 2026-10-01 17:28:38 +01:00
gingerBill 2b90b616e1 Add -vet-when-shadowing; Resolve global whens and foreign blocks on demand via name placeholders 2026-10-01 16:28:12 +01:00
gingerBill 5f6e95a620 Don't treat a global naming itself as an initialization cycle (fixes test_issue_6621) 2026-10-01 15:26:45 +01:00
gingerBill 38fa57e907 Make global checking and codegen order-independent 2026-10-01 15:01:14 +01:00
gingerBill b06c5ffa70 Add -internal-global-entity-graph; Fix union type inference bug 2026-10-01 13:42:32 +01:00
gingerBill 66111934c3 Allow parapoly procs to be in @(deferred_*) attributes 2026-10-01 01:17:40 +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 29b681b43d Handle more cases where ExactValue_Float was being handled but not for ExactValue_Rational 2026-09-29 15:21:00 +01:00
Louis Novy fc8b49f5f5 Fix the same $ procedure argument generating duplicate instantiations 2026-09-27 10:40:33 -04:00
gingerBill 07b5c2ee0f Support enable_target_feature and require_target_feature for asm templates 2026-08-31 16:39:17 +01:00