summaryrefslogtreecommitdiff
path: root/test/example/c-api-relooper-unreachable-if.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-04-05 19:48:54 -0700
committerGitHub <noreply@github.com>2019-04-05 19:48:54 -0700
commit37443aef8c22f100dc59e81aff6af5a252f3217d (patch)
treeae68bcc8b6bbc4f2b7fdd1f50349b9980e59f10f /test/example/c-api-relooper-unreachable-if.cpp
parent5b24f039ba1f55520a61f6dd6bb8ca46556c592b (diff)
downloadbinaryen-37443aef8c22f100dc59e81aff6af5a252f3217d.tar.gz
binaryen-37443aef8c22f100dc59e81aff6af5a252f3217d.tar.bz2
binaryen-37443aef8c22f100dc59e81aff6af5a252f3217d.zip
Passive segments (#1976)
Adds support for the bulk memory proposal's passive segments. Uses a new (data passive ...) s-expression syntax to mark sections as passive.
Diffstat (limited to 'test/example/c-api-relooper-unreachable-if.cpp')
-rw-r--r--test/example/c-api-relooper-unreachable-if.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/example/c-api-relooper-unreachable-if.cpp b/test/example/c-api-relooper-unreachable-if.cpp
index cfd802b58..3acc65d56 100644
--- a/test/example/c-api-relooper-unreachable-if.cpp
+++ b/test/example/c-api-relooper-unreachable-if.cpp
@@ -14,9 +14,10 @@ int main() {
BinaryenModuleAutoDrop(the_module);
{
const char* segments[] = { 0 };
+ int8_t segmentPassive[] = { 0 };
BinaryenExpressionRef segmentOffsets[] = { 0 };
BinaryenIndex segmentSizes[] = { 0 };
- BinaryenSetMemory(the_module, 256, 256, "memory", segments, segmentOffsets, segmentSizes, 0, 0);
+ BinaryenSetMemory(the_module, 256, 256, "memory", segments, segmentPassive, segmentOffsets, segmentSizes, 0, 0);
}
the_relooper = RelooperCreate(the_module);
expressions[1] = BinaryenGetLocal(the_module, 0, 1);
@@ -346,8 +347,9 @@ int main() {
{
const char* segments[] = { 0 };
BinaryenExpressionRef segmentOffsets[] = { 0 };
+ int8_t segmentPassive[] = { 0 };
BinaryenIndex segmentSizes[] = { 0 };
- BinaryenSetMemory(the_module, 1, 1, NULL, segments, segmentOffsets, segmentSizes, 0, 0);
+ BinaryenSetMemory(the_module, 1, 1, NULL, segments, segmentPassive, segmentOffsets, segmentSizes, 0, 0);
}
expressions[157] = BinaryenConst(the_module, BinaryenLiteralInt32(65535));
expressions[158] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
@@ -554,4 +556,3 @@ int main() {
functions.clear();
relooperBlocks.clear();
}
-