summaryrefslogtreecommitdiff
path: root/test/unit.asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-11-18 17:13:42 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-12-07 16:50:04 -1000
commit420f28ff46322b1d9eddd20ce4bd4f30b42fa311 (patch)
treec48daf3c03a2a6b3accc4ec4bba3e631527f5662 /test/unit.asm.js
parent7bd25106baf71882badec1e03f45f6cae5d31560 (diff)
downloadbinaryen-420f28ff46322b1d9eddd20ce4bd4f30b42fa311.tar.gz
binaryen-420f28ff46322b1d9eddd20ce4bd4f30b42fa311.tar.bz2
binaryen-420f28ff46322b1d9eddd20ce4bd4f30b42fa311.zip
convert ftCall_* and mftCall_* into table calls
Diffstat (limited to 'test/unit.asm.js')
-rw-r--r--test/unit.asm.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index 51c2fc22a..4ab43b737 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -652,6 +652,12 @@ function asm(global, env, buffer) {
HEAPF64[10] = Math_fround(x|0);
}
+ function relocatableAndModules() {
+ ftCall_v(10); // function table call
+ mftCall_v(20); // possible inter-module function table call
+ return ftCall_idi(30, 1.5, 200) | 0; // with args
+ }
+
function v() {
}
function vi(x) {
@@ -663,6 +669,6 @@ function asm(global, env, buffer) {
var FUNCTION_TABLE_c = [ z, cneg, z, z, z, z, z, z ];
var FUNCTION_TABLE_vi = [ vi, vi, vi, vi, vi, vi, vi, vi ];
- return { big_negative: big_negative, pick: forgetMe, pick: exportMe, doubleCompares: doubleCompares, intOps: intOps, conversions: conversions, switcher: switcher, frem: frem, big_uint_div_u: big_uint_div_u, fr: fr, negZero: negZero, neg: neg, smallCompare: smallCompare, cneg_nosemicolon: cneg_nosemicolon, forLoop: forLoop, ceiling_32_64: ceiling_32_64, aborts: aborts, continues: continues, bitcasts: bitcasts, recursiveBlockMerging: recursiveBlockMerging, lb: lb, zeroInit: zeroInit, phi: phi, smallIf: smallIf, dropCall: dropCall, useSetGlobal: useSetGlobal, usesSetGlobal2: usesSetGlobal2, breakThroughMany: breakThroughMany, ifChainEmpty: ifChainEmpty, heap8NoShift: heap8NoShift, conditionalTypeFun: conditionalTypeFun, loadSigned: loadSigned, globalOpts: globalOpts, dropCallImport: dropCallImport, loophi: loophi, loophi2: loophi2, relooperJumpThreading: relooperJumpThreading, relooperJumpThreading__ZN4game14preloadweaponsEv: relooperJumpThreading__ZN4game14preloadweaponsEv, __Z12multi_varargiz: __Z12multi_varargiz, jumpThreadDrop: jumpThreadDrop, dropIgnoredImportInIf: dropIgnoredImportInIf, dropIgnoredImportsInIf: dropIgnoredImportsInIf, relooperJumpThreading_irreducible: relooperJumpThreading_irreducible, store_fround: store_fround, exportedNumber: 42 };
+ return { big_negative: big_negative, pick: forgetMe, pick: exportMe, doubleCompares: doubleCompares, intOps: intOps, conversions: conversions, switcher: switcher, frem: frem, big_uint_div_u: big_uint_div_u, fr: fr, negZero: negZero, neg: neg, smallCompare: smallCompare, cneg_nosemicolon: cneg_nosemicolon, forLoop: forLoop, ceiling_32_64: ceiling_32_64, aborts: aborts, continues: continues, bitcasts: bitcasts, recursiveBlockMerging: recursiveBlockMerging, lb: lb, zeroInit: zeroInit, phi: phi, smallIf: smallIf, dropCall: dropCall, useSetGlobal: useSetGlobal, usesSetGlobal2: usesSetGlobal2, breakThroughMany: breakThroughMany, ifChainEmpty: ifChainEmpty, heap8NoShift: heap8NoShift, conditionalTypeFun: conditionalTypeFun, loadSigned: loadSigned, globalOpts: globalOpts, dropCallImport: dropCallImport, loophi: loophi, loophi2: loophi2, relooperJumpThreading: relooperJumpThreading, relooperJumpThreading__ZN4game14preloadweaponsEv: relooperJumpThreading__ZN4game14preloadweaponsEv, __Z12multi_varargiz: __Z12multi_varargiz, jumpThreadDrop: jumpThreadDrop, dropIgnoredImportInIf: dropIgnoredImportInIf, dropIgnoredImportsInIf: dropIgnoredImportsInIf, relooperJumpThreading_irreducible: relooperJumpThreading_irreducible, store_fround: store_fround, exportedNumber: 42, relocatableAndModules: relocatableAndModules };
}