-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Serialization] Refactor subset of ModuleFile
into ModuleFileCore
#32470
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
Conversation
@swift-ci Please test |
Build failed |
@swift-ci Please test |
@swift-ci test OS X platform |
Build failed |
Perhaps we can come up with a different, more descriptive name? ASTModuleFile vs ModuleFile or something? |
@slavapestov what do you think about:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and the performance opportunity here is impressive.
I don't mind much about the names but if we are to change them my tendency would be to make it clear that ModuleFileCore
is immutable and shared so maybe something like ModuleFileSharedCore
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The change is huge and I didn't get a chance to review every detail, but a brief glancing convinced me this is a great design choice.
…dCore` The difference with `ModuleFile` is that `ModuleFileSharedCore` provides immutable data and is independent of a particular ASTContext. It is designed to be able to be shared across multiple `ModuleFile`s of different `ASTContext`s in a thread-safe manner.
bc25088
to
99c2914
Compare
@swift-ci Please test |
@swift-ci Please test |
I took the suggestion by @xymus for naming. |
Build failed |
@swift-ci test OS X platform |
The difference with
ModuleFile
is thatModuleFileCore
provides immutable data and is independent of a particular ASTContext.It is designed to be able to be shared across multiple
ModuleFile
s of differentASTContext
s in a thread-safe manner.