Repository navigation
Conversation
Finish the remaining #747 gaps after the first slice: flatten mixed numeric + chains to one concatn, lower n-way string + in MLIR as one malloc plus per-part memcpy, add a linear parse_float and fail-closed UTF-8 helpers, and print allocation/copy counters on the harness rows. Co-authored-by: Abhishek Shivakumar <[email protected]>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: godofecht <[email protected]>
This was referenced Oct 7, 2026
godofecht
enabled auto-merge
October 8, 2026 09:00
auto-merge was automatically disabled
October 8, 2026 14:54
Pull request was closed
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.
Part of #747.
Intent
Linked issue or roadmap item: #747 (remaining gaps after merged #1337).
What changed, and why is this the smallest useful change?
The first slice joined pure-string
+chains and added integer parse/format plus buffered I/O. This slice finishes the five leftover implementation gaps: mixed numeric concatenation, MLIR strcat lowering, a fastparse_float, an explicit UTF-8 policy, and allocation counters on the harness rows.Overlap check
Overlap / dependency notes: No open PR implements the remaining #747 gaps. Nearby open PRs (#1348, #1346, #1345, #1265, #1267, #1268) touch other issues or the harness, not concat lowering,
parse_float, or the UTF-8 policy.Evidence
Baseline before this change: mixed
"x=" + n + " y=" + mused nested pairwise__flowc_str_concat; MLIR lowered every string+to__flow_str_concat; noparse_float; UTF-8 was bytes-as-stored with no documented policy; the new harness rows printed noallocations:/copies:lines.Targeted proof that exercises the changed behaviour:
tests/cgen/string_concat_mixed(C must contain__flowc_str_concatn(4,and must not nest pairwise joins)tests/lang/test_parse_float.flow,tests/lang/test_utf8_policy.flow, extendedtest_string_concat_chaincompiler/scripts/roundtrip.flowstage_a_strcat mixed-concatn checkWhy that proof would detect the old failure or regression: the mixed golden fails on nested
__flowc_str_concat(__flowc_str_concat("n="; parse tests fail if junk/hex/overflow is accepted or1.5is wrong; UTF-8 tests fail if overlong/surrogate/truncated sequences are accepted orio_read_texttreats invalid bytes as success.Repository gate(s) run: pending on this revision (host selftest, cgen goldens,
./flow test-langsubset,gen_stdlib_docs --check, harness). Bootstrap C not yet regenerated.Generated/bootstrap state, if any:
docs/library/stdlib-api.mdregenerated. Bootstrap C regeneration is a follow-up commit after the edited compiler selftests.Risk
Compatibility, performance, security, lifetime, backend, or release implications:
__flowc_str_of_*results remain heap strings that stay live until concatn copies them.malloc, never freed).float()).docs/library/strings.md(fail closed, no silent replace).docs/project/Questions.mdnot required; the policy is explicit rather than an open design question.Compatibility
docs/project/CHANGELOG.md.Remaining gaps (not this PR)
malloc, never freed).flow runpays compile; that belongs with [Performance #727] Minimize compiled-program cold start and runtime initialization overhead #746.0x1.8p+0) are rejected rather than parsed.Issue acceptance is therefore not fully closed.
Agent handoff
Bootstrap C will be committed separately (
fix: regenerate bootstrap C after mixed concat and MLIR strcat). Do not merge.