-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add comments for instructions that lack it. #4112
Conversation
toolchain/sem_ir/typed_insts.h
Outdated
@@ -354,6 +372,7 @@ struct BranchWithArg { | |||
InstId arg_id; | |||
}; | |||
|
|||
// A builtin instruction. These are special and listed in `builtin_kind.def`. |
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.
Is this an instruction that represents a built-in function? Or invokes a built-in function?
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'm a little confused by your question, builtin_kind.def doesn't contain any functions (right now, at least). Perhaps you opened up builtin_function_kind.def instead?
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.
Maybe it'd be worth mentioning here that these are all builtin types specifically, other than <error>
which can also be used as a non-type value.
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've added an example. I really don't want to get into documenting what's already documented in builtin_kind.def though: to me, it's opening the door for skew because this doesn't own the contents of the enum.
toolchain/sem_ir/typed_insts.h
Outdated
struct SpliceBlock { | ||
// TODO: Can we make Parse::NodeId more specific? | ||
// TODO: Make Parse::NodeId more specific. |
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 think this was an honest question -- it seems plausible that splice blocks could appear in pretty arbitrary places.
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.
Fixed; I'd just deleted the comment, and then copy-pasted from the wrong spot.
toolchain/sem_ir/typed_insts.h
Outdated
@@ -354,6 +372,7 @@ struct BranchWithArg { | |||
InstId arg_id; | |||
}; | |||
|
|||
// A builtin instruction. These are special and listed in `builtin_kind.def`. |
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.
Maybe it'd be worth mentioning here that these are all builtin types specifically, other than <error>
which can also be used as a non-type value.
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
5cff002
to
894883a
Compare
No description provided.