iximeow opened PR #4630 from ixi/inst_call_docs
to main
:
the docs on
Inst
note that the type is returned by non-resultful
instructions built fromInstBuilder
, but did _not_ note that it is
also returned bycall
andcall_indirect
. if you're trying to learn
and use Cranelift by following the docs, this means you'd follow a doc
link toInst
that implies thatcall
does not return a value - this
is actively misleading, since you'd want to use the returnedInst
to
find exactly those returned values!so, this adds a few sentences talking about the case of call
Inst
s.
iximeow created PR review comment:
i'd be inclined to move this to the front of the paragraph, and leave inventive uses as "and also, here are more exotic uses", but i really don't know how often people are doing
builder.ins().call()
that they might end up here!
iximeow submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
Maybe we can put a note here (perhaps instead of below) to the effect of: "... like call or call-indirect instructions. To get the
Value
results of such an instruction, useinst_results
with the returnedInst
" ?
cfallin submitted PR review.
iximeow updated PR #4630 from ixi/inst_call_docs
to main
.
iximeow created PR review comment:
admittedly took me a moment to push the change but i really appreciate this suggestion! it cleans up the whole "talk about the normal thing, then the exotic thing, then the normal thing again" wrinkle nicely.
iximeow submitted PR review.
cfallin submitted PR review.
iximeow merged PR #4630.
Last updated: Nov 22 2024 at 17:03 UTC