Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sem: varargs now have and conform to a specification #1207

Open
wants to merge 20 commits into
base: devel
Choose a base branch
from

Conversation

saem
Copy link
Collaborator

@saem saem commented Feb 25, 2024

Summary

  • created a battery of tests specifying vararg parameters and to a lesser extent the pragma
  • updated the implementation for varargs argument and parameter handling to conform to the aforementioned tests
  • updated the docs to describe the latest behaviour and indicate future direction

Details

  • info that couldn't fit into the summary
  • relevant details; tricky parts
  • anything else

Notes for Reviewers

  • the plan for this PR is to merge in tests and the rework of sigmatch in one go
    • reason for doing both simultaneously is because the spec itself needs to be vetted through implementing
  • created initial as a non-draft PR to ensure the existing tests/knownIssues are at least green in CI
  • rough plan, in case you have feedback on the approach:
    • get initial tests in place
    • add docs to tests clarifying the intention from the notes remaining in tvarargs
    • initial revision of docs (manual.rst) to indicate new behaviour and future direction
    • rewrite sigmatch.matchesAux which contains the parameter handling
      - [ ] any related updates/changes
    • write a proper PR title and message

- parameter passing
- typed ast construction
also rename/relocate tests to more appropriate location
- use blocks to document each test
- reorder and group tests more logically
- note tests that should work with `knownIssue` comments
- sketch of all missing tests identified thus far
- plan for test coverage
- inventory of existing tests
- document questions and answers for future and current direction

This will be used to create the initial test spec for varargs.
- relatively fine grained split of knownIssues for easier fixing
- cross-reference knownIssues between parent and knownIssue tests
- remove corresponding sketch tests from `tvarargs`
- disable `tvarargs` so the `lang_callable/varags` category can be run
remove corresponding tests from tvarargs.
until it's fixed going to be marking lots of tests as known issue
- ensure varargs parameter is inferrable
- add tests to disallow type parameter being set to varargs
@saem saem added spec Specification tests edit or formal specification required. test Add or improve tests compiler/sem Related to semantic-analysis system of the compiler language-design Language design syntax, semantics, types, statics and dynamics. labels Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/sem Related to semantic-analysis system of the compiler language-design Language design syntax, semantics, types, statics and dynamics. spec Specification tests edit or formal specification required. test Add or improve tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant