Skip to content

[AST] Only use serialized locs for 'getRawComment()' in symbol graph #36270

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 3 commits into from
Mar 4, 2021

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 4, 2021

  • Don't use serialized source locations in getRawComment() by default
  • Only call getSerialiedLocs() for decls in SerializedASTFile (Calling it for SourceFile decls is useless)
  • Propagate AllowSerialized parameter in findRequirementDeclWithDocComment() (I just noticed this when investigating the issue)

rdar://problem/75010520

rintaro added 3 commits March 3, 2021 19:38
For example 'SourceFile' can handle all operations inside
'getSerializedLocs()', but it unnecessarily loads source content in a
new buffer, and resolve 'SourceLoc' from the line and the column.
And the result is completely useless.

rdar://problem/75010520
@rintaro
Copy link
Member Author

rintaro commented Mar 4, 2021

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Mar 4, 2021

@rintaro rintaro requested review from benlangmuir and bitjammer March 4, 2021 04:38
@rintaro
Copy link
Member Author

rintaro commented Mar 4, 2021

@swift-ci Please smoke test Windows

@rintaro
Copy link
Member Author

rintaro commented Mar 4, 2021

@swift-ci Please smoke test Linux

@rintaro
Copy link
Member Author

rintaro commented Mar 4, 2021

Merging because this is causing serious performance regression. @bitjammer Let me know if you have any concern.

@rintaro rintaro merged commit f1e532c into swiftlang:main Mar 4, 2021
@rintaro rintaro deleted the ast-getserializedlocs-rdar75010520 branch March 4, 2021 17:22
@bitjammer
Copy link
Contributor

@rintaro I was investigating what I thought was a bug with serialized source locations at the time but it turned out to be nothing. Thank you for fixing the regression.

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.

3 participants