Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues #677 after #722 without changing
typecheck.flowyet.Adds
compiler/src/overload_call.flow, a context-neutral bridge that takes an AST call plus TcCtx-supplied identifier type-node ids, performs #722 argument classification, and invokes the native selector.FlowcOverloadCallScratchowns reusable rows/known/literal/identifier buffers so the call-check hot path performs no per-call allocation.flowc_overload_call_prepareclears identifier slots every call to prevent stale scope metadata from influencing later resolution. Scratch/classification failures remainFLOWC_OVERLOAD_SELECT_UNKNOWNso Stage-A cannot manufacture false no-match diagnostics from incomplete local information.Adds
compiler/src/overload_registry.flow, a local-program AST walker that registers plain and exported function declarations intoFlowcOverloadTableby name/arity/decl id and can reset the table between bundle modules without reallocating it. Reset preserves a dead/uninitialized table error instead of hiding allocation failure.Adds focused Flow tests covering zero-arg selection, ordinary literal selection, u32 literal widening, unknown multi-candidate calls, typed identifier selection, scratch clearing/capacity guards, same-name different-arity registration, exported function registration, and registry reset.
All branch commits carry
[skip ci]; this work is intended for local qualification under the current 1.0.2 no-hosted-CI policy.After this PR, the final #677
typecheck.flowsplice is intentionally small: own/init/free/reset aFlowcOverloadTableandFlowcOverloadCallScratch; callflowc_overload_registry_collectonce per module; map AST_IDENT call args with existingflowc_tc_lookup_val_typeinto scratch; callflowc_overload_resolve_call; diagnose onlyAMBIGUOUSand knownNO_MATCH, while preserving existing intrinsic/import/extern handling andUNKNOWNfallback.Related: #674 #677 #709 #713 #715 #717 #722 #725