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: Add ConstExternalSymbol to prelude #1123

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

doug-q
Copy link
Collaborator

@doug-q doug-q commented May 29, 2024

closes #233.

@doug-q doug-q requested a review from a team as a code owner May 29, 2024 06:52
@doug-q doug-q requested a review from zrho May 29, 2024 06:52
@doug-q doug-q changed the title feat: Add ConstExternalSymbol feat: Add ConstExternalSymbol to prelude May 29, 2024
@doug-q doug-q requested a review from aborgna-q May 29, 2024 06:53
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.

LGTM

/// A structure for holding references to external symbols.
pub struct ConstExternalSymbol {
/// The symbol name that this value refers to. Must be nonempty.
pub symbol: String,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we add a type alias for this, akin to ValueName / ValueNameRef ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so. This is intended to be the literal linker symbol name that a LoadConstant of this const will lower to reading.

@doug-q doug-q added this pull request to the merge queue May 31, 2024
Merged via the queue into main with commit 96cd3e3 May 31, 2024
16 of 17 checks passed
@doug-q doug-q deleted the doug/const-external-symbol branch May 31, 2024 14:15
github-merge-queue bot pushed a commit that referenced this pull request Jun 7, 2024
## 🤖 New release
* `hugr`: 0.5.0 -> 0.5.1
* `hugr-core`: 0.1.0 -> 0.2.0
* `hugr-passes`: 0.1.0 -> 0.2.0
* `hugr-cli`: 0.1.0 -> 0.1.1

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

## `hugr`
<blockquote>

## 0.5.1 (2024-06-07)

### Refactor

- Move binary to hugr-cli
([#1134](#1134))
</blockquote>

## `hugr-core`
<blockquote>

## 0.2.0 (2024-06-07)

### Bug Fixes

- [**breaking**] Validate that control-flow outputs have exactly one
successor ([#1144](#1144))
- Do not require matching extension_reqs when creating a replacement
([#1177](#1177))

### Features

- Add `ConstExternalSymbol` to prelude
([#1123](#1123))
- `HugrView::extract_hugr` to extract regions into owned hugrs.
([#1173](#1173))

### Testing

- Serialisation round trip testing for `OpDef`
([#999](#999))
</blockquote>

## `hugr-passes`
<blockquote>

## 0.2.0 (2024-06-07)

### Features

- Add `ValidationLevel` tooling and apply to `constant_fold_pass`
([#1035](#1035))
</blockquote>

## `hugr-cli`
<blockquote>

## 0.1.1 (2024-06-07)

### Features

- Reexport `clap::Parser` and `clap_verbosity_flag::Level` from hugr_cli
([#1146](#1146))

### Refactor

- Move binary to hugr-cli
([#1134](#1134))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
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.

Const-Decl
2 participants