From f7db9e9760ea39d77433766e299f29a3084c948c Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Sat, 29 Sep 2018 00:10:28 +0200 Subject: Add initial/maximum table size parameters to C/JS API (#1687) --- test/binaryen.js/kitchen-sink.js | 3 +-- test/binaryen.js/kitchen-sink.js.txt | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'test/binaryen.js') diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js index 82b041926..33c98d97a 100644 --- a/test/binaryen.js/kitchen-sink.js +++ b/test/binaryen.js/kitchen-sink.js @@ -1,4 +1,3 @@ - // kitchen sink, tests the full API function cleanInfo(info) { @@ -249,7 +248,7 @@ function test_core() { // Function table. One per module - module.setFunctionTable([ Binaryen.getFunctionInfo(sinker).name ]); + module.setFunctionTable(1, 0xffffffff, [ Binaryen.getFunctionInfo(sinker).name ]); // Memory. One per module diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index c90994613..8bba56c45 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -48,7 +48,7 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} (type $3 (func)) (memory $0 1 256) (data (i32.const 10) "hello, world") - (table 1 1 anyfunc) + (table 1 anyfunc) (elem (i32.const 0) "$kitchen()sinker") (import "module" "base" (func $an-imported (param i32 f64) (result f32))) (export "kitchen_sinker" (func "$kitchen()sinker")) @@ -1470,7 +1470,7 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} BinaryenFunctionGetBody(functions[0]); { const char* funcNames[] = { "kitchen()sinker" }; - BinaryenSetFunctionTable(the_module, funcNames, 1); + BinaryenSetFunctionTable(the_module, 1, 4294967295, funcNames, 1); } expressions[256] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); { @@ -1504,7 +1504,7 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} (type $3 (func)) (memory $0 1 256) (data (i32.const 10) "hello, world") - (table 1 1 anyfunc) + (table 1 anyfunc) (elem (i32.const 0) "$kitchen()sinker") (import "module" "base" (func $an-imported (param i32 f64) (result f32))) (export "kitchen_sinker" (func "$kitchen()sinker")) -- cgit v1.2.3