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

Add a new name field on DeclId and remove some unnecessary lookups in the DeclEngine #4028

Merged
merged 6 commits into from
Feb 8, 2023

Conversation

emilyaherbert
Copy link
Contributor

Description

This PR is a subset of #3744. It adds a name field to DeclId which contains the name of the declaration. This is helpful in that it allows us to bypass lookups in the DeclEngine for trivial name info and is also a subset of #3744.

This PR also removes/refactors some of these unnecessary lookups in the DeclEngine in light of the new name field.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@emilyaherbert emilyaherbert added code quality compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen labels Feb 8, 2023
@emilyaherbert emilyaherbert self-assigned this Feb 8, 2023
@emilyaherbert emilyaherbert marked this pull request as ready for review February 8, 2023 18:55
@emilyaherbert emilyaherbert requested a review from a team February 8, 2023 18:55
@emilyaherbert emilyaherbert enabled auto-merge (squash) February 8, 2023 18:55
Copy link
Contributor

@mohammadfawaz mohammadfawaz left a comment

Choose a reason for hiding this comment

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

Awesome.

@mohammadfawaz mohammadfawaz requested a review from a team February 8, 2023 20:59
@emilyaherbert emilyaherbert merged commit 6b3ae49 into master Feb 8, 2023
@emilyaherbert emilyaherbert deleted the emilyaherbert/method-value branch February 8, 2023 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants