summaryrefslogtreecommitdiff
path: root/src/binaryen-c.h
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2022-12-20 09:52:54 -0600
committerGitHub <noreply@github.com>2022-12-20 07:52:54 -0800
commit569f789622f116177c8a1e32fb62a4e5a5c9dfe0 (patch)
tree3a67097f753f3a22a1ebde6cd4f50c532e773663 /src/binaryen-c.h
parent12ad604c17407f6b36d52c6404f2dab32e5c7960 (diff)
downloadbinaryen-569f789622f116177c8a1e32fb62a4e5a5c9dfe0.tar.gz
binaryen-569f789622f116177c8a1e32fb62a4e5a5c9dfe0.tar.bz2
binaryen-569f789622f116177c8a1e32fb62a4e5a5c9dfe0.zip
Update RefCast representation to drop extra HeapType (#5350)
The latest upstream version of ref.cast is parameterized with a target reference type, not just a heap type, because the nullability of the result is parameterizable. As a first step toward implementing these new, more flexible ref.cast instructions, change the internal representation of ref.cast to use the expression type as the cast target rather than storing a separate heap type field. For now require that the encoded semantics match the previously allowed semantics, though, so that none of the optimization passes need to be updated.
Diffstat (limited to 'src/binaryen-c.h')
-rw-r--r--src/binaryen-c.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/binaryen-c.h b/src/binaryen-c.h
index c9331d49d..9fc0d8b04 100644
--- a/src/binaryen-c.h
+++ b/src/binaryen-c.h
@@ -1042,10 +1042,9 @@ BINARYEN_API BinaryenExpressionRef
BinaryenRefTest(BinaryenModuleRef module,
BinaryenExpressionRef ref,
BinaryenHeapType intendedType);
-BINARYEN_API BinaryenExpressionRef
-BinaryenRefCast(BinaryenModuleRef module,
- BinaryenExpressionRef ref,
- BinaryenHeapType intendedType);
+BINARYEN_API BinaryenExpressionRef BinaryenRefCast(BinaryenModuleRef module,
+ BinaryenExpressionRef ref,
+ BinaryenType type);
BINARYEN_API BinaryenExpressionRef BinaryenBrOn(BinaryenModuleRef module,
BinaryenOp op,
const char* name,
@@ -2374,10 +2373,6 @@ BINARYEN_API BinaryenExpressionRef
BinaryenRefCastGetRef(BinaryenExpressionRef expr);
BINARYEN_API void BinaryenRefCastSetRef(BinaryenExpressionRef expr,
BinaryenExpressionRef refExpr);
-BINARYEN_API BinaryenHeapType
-BinaryenRefCastGetIntendedType(BinaryenExpressionRef expr);
-BINARYEN_API void BinaryenRefCastSetIntendedType(BinaryenExpressionRef expr,
- BinaryenHeapType intendedType);
// BrOn