Skip to content

fix(cgen,parser): resolve cast/call field chains and same-line return if - #1555

Closed
godofecht wants to merge 6 commits into
mainfrom
fix/cgen-cast-call-chain-and-return-if
Closed

godofecht wants to merge 6 commits into
mainfrom
fix/cgen-cast-call-chain-and-return-if

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Summary

  • Resolve type nodes for AST_CAST and AST_CALL expressions in flowc_cgen_expr_type_node. Enables field access chains on cast pointers and function call returns.
  • Parse same-line return if expressions as expressions rather than statement-level return followed by if.
  • Add regression tests in tests/lang/test_cast_call_field_chain.flow and tests/lang/test_return_if_expr.flow.
  • Regenerate bootstrap C and verify self-reproducing fixed point.

@godofecht
godofecht enabled auto-merge October 14, 2026 00:46
godofecht and others added 3 commits October 20, 2026 12:34
- Resolve conflicts in `compiler/src/cgen.flow`
- Resolve conflicts in `compiler/src/parser.flow`
- Resolve conflicts in `compiler/src/mlir_bundle.flow`
- Resolve conflicts in `compiler/src/resolve.flow`
- Update docs and corpus test data
- Regenerate C bootstrap

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: godofecht <[email protected]>
…olve conflicts (#1601)

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: godofecht <[email protected]>

Copy link
Copy Markdown
Contributor Author

Merged current main into this PR as 238c8954a753920de00692b00bde4843f72055f4. Retained parser same-line return if, C codegen cast/call field-chain expression typing, the three matching compiler bootstrap C hunks, and both language regressions. Intentionally excluded unrelated stale generated renames and shared MLIR bundle changes. CI verification remains necessary.

Copy link
Copy Markdown
Contributor Author

CI repair triage on current head e5264bde (2026-11-02). The self-host roundtrip job fails the actual bootstrap consistency gate: compiler/bootstrap/flowc_stage_a.c != flowc emit of compiler/src. The MLIR golden job independently reports four changed recorded outputs: tests/lang/test_parser_python_forms.flow, test_parser_span_mutability.flow, test_recognition_ssa.flow, and test_semantic_stack.flow (2716 corpus programs, 4 mismatches). These are real compiler artifact discrepancies, not runner flakes. Preserve the parser/cgen fixes and both regression fixtures, regenerate bootstrap using ./compiler/scripts/bootstrap_from_c.sh --regen, regenerate only the affected corpus digests using the repository's recording procedure, then rerun full CI including native Linux/macOS and target-specific checks. Do not suppress the comparisons or assume the current green main qualifies this PR.

Copy link
Copy Markdown
Contributor Author

Superseded by merged #1667. Verified against current main (957b12450eab346dfc31cd019c63da73dfbc86e6): compiler/src/cgen.flow, compiler/src/parser.flow, tests/lang/test_cast_call_field_chain.flow and tests/lang/test_return_if_expr.flow have identical blob hashes to this PR's head. #1667 additionally regenerated bootstrap and updated affected scoped MLIR digests, and qualified successfully before merging. This old PR's red checks are superseded; retaining the branch preserves history.

@godofecht godofecht closed this Nov 5, 2026
auto-merge was automatically disabled November 5, 2026 00:11

Pull request was closed

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