summaryrefslogtreecommitdiff
path: root/test/binaryen.js/sieve.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/binaryen.js/sieve.js')
-rw-r--r--test/binaryen.js/sieve.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/binaryen.js/sieve.js b/test/binaryen.js/sieve.js
index 41dd0ddd3..b2c278cbd 100644
--- a/test/binaryen.js/sieve.js
+++ b/test/binaryen.js/sieve.js
@@ -4,9 +4,6 @@ var module = new Binaryen.Module();
// Set a memory of initially one page, maximum 100 pages
module.setMemory(1, 100);
-// Create a function type for i32 (i32) (i.e., return i32, get an i32 param)
-var ii = module.addFunctionType('i', Binaryen.i32, [Binaryen.i32]);
-
var body = module.block(
null,
[
@@ -59,7 +56,7 @@ var body = module.block(
// Create the add function
// Note: no additional local variables (that's the [])
-module.addFunction('sieve', ii, [Binaryen.i32], body);
+module.addFunction('sieve', Binaryen.i32, Binaryen.i32, [Binaryen.i32], body);
// Export the function, so we can call it later (for simplicity we
// export it as the same name as it has internally)
@@ -76,4 +73,3 @@ module.optimize();
// Print out the optimized module's text
console.log('optimized:\n\n' + module.emitText());
-