Repository navigation
Conversation
This was referenced Aug 25, 2026
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.
First isolated #720 slice, stacked on #770.
&[T]/&mut [T]currently cannot be canonicalized because Stage-A discards&before parsing the slice and the resulting anonymous AST_TYPE has no literalspansource token. This PR gives those source-less span nodes an explicit identity without changing the 40-byte AstNode layout.Adds
AST_TYPE_SYNTHETIC_SPAN_CONST/AST_TYPE_SYNTHETIC_SPAN_MUTABLEencodings in the existing AST_TYPE.c metadata slot, plusflowc_ast_type_set_synthetic_spanandflowc_ast_type_is_synthetic_span. The existing mutability setter preserves synthetic identity when toggling const/mut.ivalremains available for an optional sized-reference extent.Extends
flowc_type_name_intoso synthetic spans take the exact same canonical path as explicit spans:span_const_<elem>/span_mut_<elem>. No fake source offsets or alternate ABI spelling are introduced. Sized-reference extent remains AST metadata and does not perturb overload identity.Tests cover source-less const/mutable normalization, synthetic identity, mutability, extent preservation, toggling without losing the tag, and the invariant that extent does not change the canonical overload name.
All commits use
[skip ci]; qualification is local only. Remaining #720 work is parser wiring for&[T],&mut [T],&[T; N], and&mut [T; N]so it constructs these synthetic span nodes directly.Related: #674 #677 #718 #720 #769 #770