From ef686a4d932b9b86edc34a3b9b15926f943f6f7b Mon Sep 17 00:00:00 2001 From: Max Graey Date: Sat, 9 Oct 2021 05:26:08 +0300 Subject: Add table.size operation (#4224) --- src/binaryen-c.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/binaryen-c.h') diff --git a/src/binaryen-c.h b/src/binaryen-c.h index d9e1afc8e..3d57aca75 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -860,6 +860,8 @@ BinaryenTableSet(BinaryenModuleRef module, const char* name, BinaryenExpressionRef index, BinaryenExpressionRef value); +BINARYEN_API BinaryenExpressionRef BinaryenTableSize(BinaryenModuleRef module, + const char* name); // Try: name can be NULL. delegateTarget should be NULL in try-catch. BINARYEN_API BinaryenExpressionRef BinaryenTry(BinaryenModuleRef module, @@ -1238,6 +1240,13 @@ BinaryenTableSetGetValue(BinaryenExpressionRef expr); BINARYEN_API void BinaryenTableSetSetValue(BinaryenExpressionRef expr, BinaryenExpressionRef valueExpr); +// TableSize + +// Gets the name of the table being accessed by a `table.size` expression. +BINARYEN_API const char* BinaryenTableSizeGetTable(BinaryenExpressionRef expr); +// Sets the name of the table being accessed by a `table.size` expression. +BINARYEN_API void BinaryenTableSizeSetTable(BinaryenExpressionRef expr, + const char* table); // MemoryGrow // Gets the delta of a `memory.grow` expression. -- cgit v1.2.3