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

Implement Definition::references() #1243

Merged
merged 7 commits into from
Feb 7, 2025

Conversation

ggiraldez
Copy link
Contributor

Closes #1216

Implements Definition::references() in bindings API by eagerly resolving all remaining unresolved references and then building a reverse mapping from definitions to references.

@ggiraldez ggiraldez requested review from a team as code owners February 5, 2025 22:39
Copy link

changeset-bot bot commented Feb 5, 2025

🦋 Changeset detected

Latest commit: 66288a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nomicfoundation/slang Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@OmarTawfik OmarTawfik left a comment

Choose a reason for hiding this comment

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

Left one concern about perf. Otherwise, LGTM!

@ggiraldez ggiraldez added this pull request to the merge queue Feb 7, 2025
Merged via the queue into NomicFoundation:main with commit 99d182f Feb 7, 2025
1 check passed
@ggiraldez ggiraldez deleted the definitions-to-references branch February 7, 2025 22:14
@github-actions github-actions bot mentioned this pull request Feb 7, 2025
@github-actions github-actions bot mentioned this pull request Mar 7, 2025
github-merge-queue bot pushed a commit that referenced this pull request Mar 10, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## @nomicfoundation/slang@0.20.0

### Minor Changes

- [#1203](#1203)
[`a5c3b1a`](a5c3b1a)
Thanks [@ggiraldez](https://github.com/ggiraldez)! - add separate
contexts (ie. binding scopes) for Solidity and Yul built-ins

- [#1257](#1257)
[`9f5d8f0`](9f5d8f0)
Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - export
`assertUserFileLocation()` and `assertBuiltInLocation()` utilities from
the `bindings` module

- [#1243](#1243)
[`99d182f`](99d182f)
Thanks [@ggiraldez](https://github.com/ggiraldez)! - add
`definition.references()` API to find all references that resolve to a
definition.

- [#1205](#1205)
[`103b331`](103b331)
Thanks [@mjoerussell](https://github.com/mjoerussell)! - Make
`Edge::label` a required field instead of being optional.

- [#1257](#1257)
[`9f5d8f0`](9f5d8f0)
Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - update user
guides with new binding graph and compilation APIs

- [#1257](#1257)
[`9f5d8f0`](9f5d8f0)
Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - export
`assertNonterminalNode()` and `assertTerminalNode()` utilities from the
`cst` module

### Patch Changes

- [#1246](#1246)
[`aea2dd0`](aea2dd0)
Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - unreserve `jump`
and `jumpi` yul keywords between `0.6.0` and `0.8.0`

- [#1203](#1203)
[`a5c3b1a`](a5c3b1a)
Thanks [@ggiraldez](https://github.com/ggiraldez)! - enable `address
payable` from 0.5.0 and remove `transfer` built-in from non-payable
`address`es

- [#1246](#1246)
[`aea2dd0`](aea2dd0)
Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - make sure
assembly flags are only enabled starting from `0.8.13`

- [#1246](#1246)
[`aea2dd0`](aea2dd0)
Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - enable yul's
`true` and `false` keywords starting from `0.6.2`

- [#1246](#1246)
[`aea2dd0`](aea2dd0)
Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - make sure `super`
and `this` keywords are unreserved before `0.8.0`.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

add Definition::references() binding API
2 participants