-
Notifications
You must be signed in to change notification settings - Fork 10.5k
SwiftCompilerSources: diagnostics bridging #69144
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 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.
basically lgtm, just a few minor comments
|
||
OptionalBridgedSILDebugVariable( | ||
OptionalSILDebugVariable &&debugVariable) { | ||
static_assert(sizeof(OptionalSILDebugVariable) <= 16*8); |
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.
why not static_assert(sizeof(OptionalSILDebugVariable) <= sizeof(OptionalBridgedSILDebugVariable))
?
} | ||
|
||
public protocol DebugVariableInst : VarDeclInst { | ||
var debugVariable: OptionalBridgedSILDebugVariable { get } |
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.
I assume you didn't wrap OptionalBridgedSILDebugVariable
into a swift type because it will be just passed to other functions. Can you add a typealias, e.g. typealias DebugVariable = OptionalBridgedSILDebugVariable
and use that in the APIs? I guess, the "Optional" prefix is not relevant on the swift side.
} | ||
|
||
// See C++ VarDeclCarryingInst | ||
public protocol VarDeclInst { |
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.
nitpick: So far we named concrete instruction classes "...Inst" and base classes/protocols "...Instruction" (with the exception of TermInst
). Maybe this is coincidence, but IMO it makes sense, because then it's immediately clear if it's a concrete instruction or not.
@@ -1000,8 +1053,12 @@ final public class DestructureTupleInst : MultipleValueInstruction, UnaryInstruc | |||
|
|||
final public class BeginApplyInst : MultipleValueInstruction, FullApplySite { | |||
public var numArguments: Int { bridged.BeginApplyInst_numArguments() } | |||
|
|||
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.
added space
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.
ok I got this one. But I generally don't take time to edit auto-inserted spaces. When we have a precheckin swift-format script that works, I'll use that.
Sorry, I caused you a conflict. I renamed |
843c8e1
to
6da5dd7
Compare
@swift-ci smoke 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.
lgtm!
@swift-ci smoke test linux |
1 similar comment
@swift-ci smoke test linux |
@eeckstein I'm not sure how to pass PR testing after the bridging rework. Linux builds have failed 3 times in a row complaining about missing declarations that clearly included in the PR. @eeckstein retrying with |
6da5dd7
to
972a69f
Compare
@swift-ci Please clean smoke test Linux platform |
@swift-ci smoke test macOS |
@swift-ci smoke test Windows |
@swift-ci smoke test and merge |
For lifetime dependence prototyping.