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

[SR-340] Refactor SILParser::parseSILInstruction #42962

Open
gottesmm opened this issue Dec 22, 2015 · 3 comments
Open

[SR-340] Refactor SILParser::parseSILInstruction #42962

gottesmm opened this issue Dec 22, 2015 · 3 comments
Labels
compiler The Swift compiler in itself good first issue Good for newcomers nfc Flag: No Functional Change SILParser Area → compiler: The SIL parser task

Comments

@gottesmm
Copy link
Member

Previous ID SR-340
Radar None
Original Reporter @gottesmm
Type Bug
Status In Progress
Resolution
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, StarterBug
Assignee d066z (JIRA)
Priority Medium

md5: ee6df5ef735c9655c56ca6ce06200e7e

Issue Description:

parseSILInstruction is horrible and makes me cry every time I see it. It is a method that is ~1900 lines with a huge switch in it. We should refactor it into a visitor structure. In fact it is large enough that we should consider moving it into its own file if it is possible.

@belkadan
Copy link
Contributor

Resetting assignee for all Starter Bugs not modified since 2018.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added SILParser Area → compiler: The SIL parser task and removed bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. labels Mar 10, 2023
@Kyle-Ye
Copy link
Collaborator

Kyle-Ye commented May 16, 2023

After this commit, parseSILInstruction was optimized into 76 lines of code. Maybe we should close this issue.

@Kyle-Ye Kyle-Ye closed this as completed May 16, 2023
@AnthonyLatsis AnthonyLatsis added the nfc Flag: No Functional Change label May 16, 2023
@AnthonyLatsis
Copy link
Collaborator

This is still relevant because no visitor-oriented refactoring took place. The referenced commit simply decouples the problematic code into a dedicated function.

@AnthonyLatsis AnthonyLatsis reopened this May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself good first issue Good for newcomers nfc Flag: No Functional Change SILParser Area → compiler: The SIL parser task
Projects
None yet
Development

No branches or pull requests

4 participants