Skip to content

phase0/03: ObjectAbi shared word/sret policy - #82

Merged
rieske merged 6 commits into
masterfrom
phase0/03-object-abi
Jul 27, 2026
Merged

phase0/03: ObjectAbi shared word/sret policy#82
rieske merged 6 commits into
masterfrom
phase0/03-object-abi

Conversation

@rieske

@rieske rieske commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add shared ObjectAbi word/sret policy for aggregate ABI decisions.
  • Review residuals through Round-4 nits.

Stack

Base: phase0/02-type-policy → this PR → phase0/04-symbols-leaf

Test plan

  • ObjectAbi tests pass
  • Stack builds cleanly on this tip

rieske added 5 commits July 27, 2026 17:18
Introduce type::object_abi (machine word, stack align, valueWords/dataWords,
sret thresholds) so SA and codegen can share sizing policy. Wire StackMachine
startProcedure slot counting through valueWords. Unit tests pin formulas;
no sret emission yet.
- Split size-only ObjectAbi.h from Type-aware ObjectAbiType.h.
- valueWords early-return style; drop unused REGISTER_RETURN_MAX_WORDS.
- typeNeedsMemoryReturn uses isRecord (arrays never sret).
- ValueScope::wordSlotsFor delegates to valueWords (shared SA/codegen policy).
- Document current consumers; unit test large array is not sret.
- typeNeedsMemoryReturn uses isCompleteRecord.
- Clarify size-threshold vs type-layer sret comments.
- isAggregate comment no longer mentions sret.
- Unit tests for large union sret and incomplete non-sret.
- Keep typeNeedsMemoryReturn as pure complete-record ABI need.
- Rename product/variadic skip to productEmitsMemoryReturn so false never
  means "fits in registers" for large records under variadic.
- Clarify REGISTER_RETURN_MAX_BYTES comment (complete records only).
- ValueScope nextLocalWordIndex comment references MACHINE_WORD_SIZE.
- Collapse double blank line between ObjectAbi tests.
@mergify

mergify Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@coveralls

coveralls commented Jul 27, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 92.913% (+0.04%) from 92.878% — phase0/03-object-abi into master

Base automatically changed from phase0/02-type-policy to master July 27, 2026 15:51
@rieske
rieske merged commit f9c888f into master Jul 27, 2026
4 checks passed
@rieske
rieske deleted the phase0/03-object-abi branch July 27, 2026 16:00
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.

2 participants