diff options
author | Alon Zakai <azakai@google.com> | 2021-02-09 15:17:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-09 07:17:56 -0800 |
commit | a12a8250da24aa5b5787bf89562b243fdc514302 (patch) | |
tree | d789428a1045b558ffdfb6f75ed12da93524a7f5 /src/passes/ReorderFunctions.cpp | |
parent | 74ccdb87b3390e003b658b847526dad8722083f8 (diff) | |
download | binaryen-a12a8250da24aa5b5787bf89562b243fdc514302.tar.gz binaryen-a12a8250da24aa5b5787bf89562b243fdc514302.tar.bz2 binaryen-a12a8250da24aa5b5787bf89562b243fdc514302.zip |
[GC] Support casts of function types (#3554)
I had completely missed that the spec allows ref.cast etc. of function types,
and not just data. Function types do not have an RTT, unlike GC data, but we
can still cast them. A function reference has the canonical RTT of the signature
for that type, so it's like a simplified case of the GC world, without a hierarchy
of RTTs.
As it turns out, our validation did not rule out rtt.canon of a function type,
nor ref.cast of one, so we unintentionally already had all the support for this
aside from the actual casting, which this PR adds.
The addition is mostly trivial, except that we now need a Module in the base
ExpressionRunner class, so that we can go from a function name to the actual
function. This PR refactors things to allow that.
Diffstat (limited to 'src/passes/ReorderFunctions.cpp')
0 files changed, 0 insertions, 0 deletions