diff options
author | Max Graey <maxgraey@gmail.com> | 2021-10-18 22:48:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-18 12:48:50 -0700 |
commit | f0a8de302b85441deb8864c9e20c561c934e27b8 (patch) | |
tree | b71e540462b865891a0b63d25b0b16b9653fd04a /test/example/c-api-kitchen-sink.c | |
parent | 0bec0a4bbaf4859bb4c7a2f1c4ecda60ccab72f2 (diff) | |
download | binaryen-f0a8de302b85441deb8864c9e20c561c934e27b8.tar.gz binaryen-f0a8de302b85441deb8864c9e20c561c934e27b8.tar.bz2 binaryen-f0a8de302b85441deb8864c9e20c561c934e27b8.zip |
Add table.grow operation (#4245)
Diffstat (limited to 'test/example/c-api-kitchen-sink.c')
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 327e20e1e..fb3fc87b0 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -1032,6 +1032,13 @@ void test_core() { const char* table = BinaryenTableSizeGetTable(tablesize); BinaryenTableSizeSetTable(tablesize, table); + BinaryenExpressionRef valueExpr = + BinaryenRefNull(module, BinaryenTypeFuncref()); + BinaryenExpressionRef sizeExpr = makeInt32(module, 0); + BinaryenExpressionRef growExpr = + BinaryenTableGrow(module, "0", valueExpr, sizeExpr); + BinaryenExpressionPrint(growExpr); + // Memory. One per module const char* segments[] = {"hello, world", "I am passive"}; |