-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SILGen] Unified Entry Point Emission #67747
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 |
lib/SILGen/SILGenTopLevel.h
Outdated
|
||
namespace Lowering { | ||
|
||
/// Generates a `SILFunction` for toplevel code |
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.
A bit more detail would be nice; script mode, TopLevelCodeDecl, global variable initializers, etc
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.
Makes sense, thanks! Does it look better now?
1abfee9
to
64dfd7c
Compare
2b1c9f3
to
913b717
Compare
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.
Awesome!
@swift-ci please test |
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.
This is a nice refactoring, thank you!
@swift-ci Please test source compatibility |
6e48c36
to
d828a48
Compare
@swift-ci Please test source compatibility |
@swift-ci please test |
@swift-ci please test |
Implement SILGenTopLevel, a class that walks a file run in script mode to generate all toplevel code at once.
Emit SILDeclRefs representing entry points with SourceFile source correctly.
Emit SILDeclRefs representing entry points with SourceFile source correctly.
9e27d4f
to
db1cdbd
Compare
@swift-ci please test |
This PR implements unified entry point emission in SILGen so that all top level code is emitted at once. Although this is arguably NFC, I had to modify some tests because all declarations referenced by top-level code are now emitted first during SILGen.