Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

refactor: clean up fat.rs #38

Merged
merged 3 commits into from
Jun 24, 2024
Merged

refactor: clean up fat.rs #38

merged 3 commits into from
Jun 24, 2024

Conversation

doug-q
Copy link
Collaborator

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

We take the opportunity to tidy up cfg.rs a bit.

impl Copy for FatNode will now work, and many other methods now have more appropriate lifetime constraints. The borrow checker will thank you.

We add FatNode::try_new_hierarchy_view.

@doug-q doug-q force-pushed the doug/cleanup-fat branch from 68ce052 to e1e12bf Compare June 21, 2024 11:25
@doug-q doug-q requested a review from aborgna-q June 21, 2024 11:25
Copy link
Collaborator

@aborgna-q aborgna-q left a comment

Choose a reason for hiding this comment

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

Nice!

}
}

impl<'c, OT, H> Clone for FatNode<'c, OT, H> {
impl<OT, H> Copy for FatNode<'_, OT, H> {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch 👍
The #derive bounds are annoying when you're just wrapping references / phantom types.

@doug-q doug-q added this pull request to the merge queue Jun 21, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jun 21, 2024
@doug-q doug-q added this pull request to the merge queue Jun 24, 2024
Merged via the queue into main with commit 1a2c642 Jun 24, 2024
13 checks passed
@doug-q doug-q deleted the doug/cleanup-fat branch June 24, 2024 08:16
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants