Skip to content

selfhost: add native multi-signature overload table - #713

Merged
godofecht merged 4 commits into
mainfrom
selfhost/overload-signature-table
Aug 22, 2026
Merged

godofecht merged 4 commits into
mainfrom
selfhost/overload-signature-table

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Continues #677 after #709.

Adds compiler/src/overload_table.flow, a native Stage-A multi-signature table that retains every local function declaration for a source name instead of collapsing the name to one arity binding. Entries store source spans, arity and AST_FN declaration ids; callers can count and enumerate same-name/arity candidates for subsequent type matching.

This deliberately does not patch the large TcCtx integration in the same change. The next step is to populate this table during global function binding and apply #709's compatibility/widening policy to each enumerated declaration at AST_CALL sites.

Adds tests/lang/test_overload_table_port.flow covering duplicate-name preservation, arity partitioning, candidate order, declaration lookup and cleanup.

Related: #674 #677

chore: sync Physics DSL self-hosting into overload table branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant