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

feat!: Namer optionally appends node index to mangled names. #32

Merged
merged 10 commits into from
Jun 18, 2024

Conversation

doug-q
Copy link
Collaborator

@doug-q doug-q commented Jun 18, 2024

We take this opportunity to move some auxilliary code out of emit.rs,
and to fix up some docs in fat.rs.

BREAKING CHANGE: Namer::new takes an additional parameter.

@doug-q doug-q force-pushed the doug/refactor-namer-args branch from b5fc455 to 58c84a1 Compare June 18, 2024 09:50
@doug-q doug-q changed the base branch from main to doug/cfg June 18, 2024 09:50
@doug-q doug-q changed the title Doug/refactor namer args feat!: Namer optionally appends node index to mangled names. Jun 18, 2024
Base automatically changed from doug/cfg to main June 18, 2024 12:14
We take this opportunity to move some auxilliary code out of emit.rs,
and to fix up some docs in fat.rs
@doug-q doug-q force-pushed the doug/refactor-namer-args branch from 58c84a1 to a8e2e9b Compare June 18, 2024 13:17
@doug-q doug-q requested a review from cqc-alec June 18, 2024 13:17
Copy link
Contributor

@cqc-alec cqc-alec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some typos otherwise LGTM.

src/fat.rs Outdated Show resolved Hide resolved
src/fat.rs Outdated Show resolved Hide resolved
src/fat.rs Outdated Show resolved Hide resolved
src/fat.rs Outdated Show resolved Hide resolved
src/fat.rs Outdated Show resolved Hide resolved
src/fat.rs Outdated Show resolved Hide resolved
src/fat.rs Outdated
/// Panics if the node is not valid in the `Hugr` or if it's `get_optype` is
/// not an `OT`.
///
/// Note that while we do check that the type of the node's `get_optype`, we do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence seems incomplete; something missing after "while we do check that the type of the node's get_optype".

Copy link
Collaborator Author

@doug-q doug-q Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is complete, continued on the following line.

"Note that while we do check that the type of the node's get_optype, we do not verify that it is actually equal to ot.:

Copy link
Contributor

@cqc-alec cqc-alec Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is complete, continued on the following line.

"Note that while we do check that the type of the node's get_optype, we do not verify that it is actually equal to ot.:

This isn't grammatical -- perhaps you want to delete the second "that"?

src/emit/args.rs Outdated Show resolved Hide resolved
doug-q and others added 9 commits June 18, 2024 15:04
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
@doug-q doug-q added this pull request to the merge queue Jun 18, 2024
Merged via the queue into main with commit d10f6b8 Jun 18, 2024
10 checks passed
@doug-q doug-q deleted the doug/refactor-namer-args branch June 18, 2024 14:41
@hugrbot hugrbot mentioned this pull request Jun 26, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 10, 2024
## 🤖 New release
* `hugr-llvm`: 0.1.0

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.1.0](https://github.com/CQCL/hugr-llvm/releases/tag/v0.1.0) -
2024-07-10

### Bug Fixes
- Syntax error
- sum type tag elision logic reversed
- [**breaking**] Allow Const and FuncDecl as children of Modules,
Dataflow Parents, and CFG nodes
([#46](#46))

### Documentation
- fix bad grammar ([#34](#34))

### New Features
- Emission for Call nodes
- Support  values
- add `get_extern_func`
([#28](#28))
- lower CFGs ([#26](#26))
- Add initial codegen extension for `prelude`
([#29](#29))
- [**breaking**] `Namer` optionally appends node index to mangled names.
([#32](#32))
- Implement lowerings for ieq,ilt_s,sub in int codegen extension
([#33](#33))
- Add initial `float` extension
([#31](#31))
- Emit more int comparison operators
([#47](#47))

### Refactor
- clean up fat.rs ([#38](#38))

### Testing
- add a test for sum type tags
- Add integration tests lowering guppy programs
([#35](#35))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

---------

Co-authored-by: Douglas Wilson <douglas.wilson@quantinuum.com>
@hugrbot hugrbot mentioned this pull request Jul 10, 2024
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