Evidence and scope
Follow-up to #416/#854 after rejected #857. Exact native68c6ed517f9125ae1b570ff2e585c5b368745389af828258f6621fe5e6e0311c on sourceb6608b14c has explicitly displayed collectFunctionSignaturesFromStatements offsets36/56 early and36/96 middle; actual native disassembly maps scan instructions. Collapsed native sample group counts/ellipses are not invented function CPU shares. Current clean mainaea27323599a13051ce1bfb8a98a19f4de457d1d preserves runtime work and the same compiler bytes. Latest complete competitor result remains Home1/20 leads,12/20 versus native TS7.
Current collector directly unwraps one export layer, selects all named fn_decl nodes in original input order and reads current signature TypeIds/flags live. Caller stops immediately after a namespace collection, but only stops a block walk once output is nonempty. No current-section/visibility/prior-position rule exists in this physical statement scan.
Read-only source audit: LocalValueContainerIndex retains only first declaration per name/section, so cannot directly supply all overloads. Binder Symbol.decls retains merged declarations, but ownership/container identity, original order, augmentation and HIR coherence cannot be assumed. A standalone two-test characterization probe passed representative exact-container filtering/order across overloads, exports, named expressions, nested blocks/functions, separate namespaces, parameters and virtual sections. A real HIR-growth control explicitly proves stale bound declarations are incomplete (scalar2 declarations, binder1). This is a limited selection characterization, not a full semantic suite, implementation, gain or compatibility claim. Initial launcher failed before compilation due incorrect Zig lib path; failure retained and path fixed, no compiler/corpus/timing changed.
Proposed direction
Prefer coherent reuse of already bound candidate facts over another independent per-checker cache. Introduce only the ownership/completeness/revision association actually needed, with precise physical container/direct-export identity and all original declaration ordering. Preserve namespace/block caller stopping rules, live current TypeIds/signature flags and append-error behavior. Binding facts with absent/stale ownership, incomplete/failed construction, HIR growth, augmentation/foreign declarations or unsupported association must use the complete original scalar path. Do not substitute first-declaration indexes, sort recovery positions, introduce section/name/library/benchmark filters, cache mutable types, cap declarations or skip bodies/diagnostics. No general local-value index construction change merely to force reuse. Exact implementation/coverage must be proved before claiming a fast path; all-container optimization remains part of the end goal, not silently redefined to root-only success.
Required validation and acceptance
Complete scalar selection/signature/diagnostic controls for overloads/duplicates/order, namespace and block stopping, direct/nested exports, named expressions, parameter/name collisions, virtual sections, malformed/recovery roots, current TypeId changes, owner/source replacement, real HIR growth, augmentation/foreign identifiers, absent binding and every OOM/partial construction/append-error behavior. Full binder and checker/Program/driver/CLI/entrypoint suites, native build,136 harness tests and complete unchanged pinned Zod diagnostic comparison. Freeze exact current-main parent/native/patch/inputs/protocol before timings; complete original positive/negative admission before every phase including full checked-JS first/middle/last errors. All original official/scaling confirmations,20-family screen, all predeclared large batches and independent adverse-risk rechecks. Carry destructuring/control_flow plus checkjs/deep/recursive/predicates/reexports and class/interface risks. A supported target gain cannot override any confirmed independent regression. Retain every original observation/attempt; no repeat-to-pass or layout/alignment tuning. Publish accepted or rejected raw checksums/full docs/brief README tables and link issues in small Chris-only conventional origin/main commits without coauthors. No candidate production push before complete verification. Universal performance, Zod195TS+3HM9002 admission, canonical C++ and other-platform coverage remain incomplete.