Skip to content

Create local functions to validate the RawSyntax layout of nodes #2908

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

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Dec 3, 2024

Having the validation code in a single switch statement overflows the stack in debug builds. Keep the switch small and extract the validation logic into separate functions, similar to what we do for SyntaxVisitor to work around rdar://55929175

@ahoppen ahoppen requested a review from rintaro December 3, 2024 01:53
@ahoppen ahoppen requested a review from bnbarham as a code owner December 3, 2024 01:53
@ahoppen
Copy link
Member Author

ahoppen commented Dec 3, 2024

@swift-ci Please test

@ahoppen ahoppen enabled auto-merge December 3, 2024 02:18
@ahoppen
Copy link
Member Author

ahoppen commented Dec 3, 2024

@swift-ci Please test macOS

Having the validation code in a single switch statement overflows the stack in debug builds. Keep the `switch` small and extract the validation logic into separate functions, similar to what we do for `SyntaxVisitor` to work around rdar://55929175
@ahoppen ahoppen force-pushed the rawsyntaxvalidation-stack-usage branch from 43a091a to 704b199 Compare December 5, 2024 21:27
@ahoppen
Copy link
Member Author

ahoppen commented Dec 5, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Dec 6, 2024

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 6be29a5 into swiftlang:main Dec 6, 2024
3 checks passed
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.

2 participants