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

Implements fully working hierarchical lexical scopes. #6784

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

esdrubal
Copy link
Contributor

@esdrubal esdrubal commented Dec 11, 2024

Description

This PR implements the missing elements for the hierarchical lexical scopes.
TypeCheckContext no longer uses cloned namespaces. Instead, we push and pop lexical scopes.
For this to work multiple places that used current_items now either use root_items or traverse the lexical scopes.

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.

@esdrubal esdrubal added code quality compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen labels Dec 11, 2024
@esdrubal esdrubal self-assigned this Dec 11, 2024
@esdrubal esdrubal force-pushed the esdrubal/hierarchical_lexical_scopes branch from 920ca89 to aaed7cc Compare December 12, 2024 15:09
Copy link

codspeed-hq bot commented Dec 12, 2024

CodSpeed Performance Report

Merging #6784 will degrade performances by 59.03%

Comparing esdrubal/hierarchical_lexical_scopes (23bcb58) with master (192f163)

Summary

❌ 2 regressions
✅ 20 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark master esdrubal/hierarchical_lexical_scopes Change
completion 21 ms 23.9 ms -12.44%
hover 1.8 ms 4.3 ms -59.03%

@esdrubal esdrubal force-pushed the esdrubal/hierarchical_lexical_scopes branch from a97bf73 to c5f0f07 Compare December 12, 2024 15:44
@esdrubal esdrubal force-pushed the esdrubal/hierarchical_lexical_scopes branch from c5f0f07 to 62fd6dd Compare December 12, 2024 15:47
@esdrubal esdrubal marked this pull request as ready for review December 13, 2024 09:22
@esdrubal esdrubal requested review from a team as code owners December 13, 2024 09:22
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.

1 participant