summaryrefslogtreecommitdiff
path: root/test/example
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-05-13 10:33:55 -0700
committerGitHub <noreply@github.com>2019-05-13 10:33:55 -0700
commit67019f9a72175bc7a098d72aa14a6f6afeb2efce (patch)
tree83adc3d4a235c00f6bf545fc5aeeeadb8f1a5663 /test/example
parenta1ff274b6bca0ff8d1635c32a6d206863f0a2fc3 (diff)
downloadbinaryen-67019f9a72175bc7a098d72aa14a6f6afeb2efce.tar.gz
binaryen-67019f9a72175bc7a098d72aa14a6f6afeb2efce.tar.bz2
binaryen-67019f9a72175bc7a098d72aa14a6f6afeb2efce.zip
Add missing methods for globals to binaryen.js (#2099)
- Print `globals` array in the tracing mode like other arrays (`functions`, `exports`, `imports`, ...) - Add accessor functions for globals
Diffstat (limited to 'test/example')
-rw-r--r--test/example/c-api-kitchen-sink.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index 3ac03367b..693782b60 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -3273,9 +3273,9 @@ int main() {
functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 1, expressions[652]);
}
expressions[653] = BinaryenConst(the_module, BinaryenLiteralInt32(7));
- BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[653]);
+ globals[0] = BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[653]);
expressions[654] = BinaryenConst(the_module, BinaryenLiteralFloat32(7.5));
- BinaryenAddGlobal(the_module, "a-mutable-global", 3, 1, expressions[654]);
+ globals[1] = BinaryenAddGlobal(the_module, "a-mutable-global", 3, 1, expressions[654]);
{
BinaryenType paramTypes[] = { 1, 4 };
functionTypes[1] = BinaryenAddFunctionType(the_module, "fiF", 3, paramTypes, 2);