You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One function, test1, direct-calls test2, which direct-calls test3, which direct-calls test4. The functions test2 and test3 disappear do to inlining, leaving us just with the direct call to test4 which looks like:
(func$_test1(; 370 ;)(; has Stack IR ;) (param$0i32) (param$1i32) (resulti32)
[...]
(local.set$2
(call$legalfunc$invoke_iij;; This should have been $_test4
(local.get$12)
(local.get$42)
)
)
[...]
)
(func$legalfunc$invoke_iij(; 8921 ;)(; has Stack IR ;) (param$0i32) (param$1i64) (resulti32)
(call$legalimport$invoke_iij
(i32.const2125) ;; This is the pointer to $_test4
[...]
)
)
My main issue with this unexpected conversion is that invoke_iij (JavaScript!) will try to call a function expecting i64 arguments, which results in the following issue:
Uncaught (in promise) TypeError: wasm function signature contains illegal type
at ftCall_iij (emu.min.js:6240)
at invoke_iij (emu.min.js:6023)
at legalfunc$invoke_iij (wasm-function[8921]:15)
at _test1 (wasm-function[370]:2885)
What's really weird is that there's other functions that do direct calls to test4 just fine. So my question is:
Do anyone know any possible reason why $legalimport$invoke_iij has been emitted here? (@kripken?)
I suspect this could have some connection with #8065, since I'm mixing -s WASM=1 and -s EMULATED_FUNCTION_POINTERS=1 (which I need, since I'm running a WASM JIT compiler in WASM see #7082).
The text was updated successfully, but these errors were encountered:
I'm building my project using the latest sdk-incoming-64bit with the following flags:
One function,
test1
, direct-callstest2
, which direct-callstest3
, which direct-callstest4
. The functionstest2
andtest3
disappear do to inlining, leaving us just with the direct call totest4
which looks like:which gets converted to this:
My main issue with this unexpected conversion is that
invoke_iij
(JavaScript!) will try to call a function expectingi64
arguments, which results in the following issue:What's really weird is that there's other functions that do direct calls to
test4
just fine. So my question is:$legalimport$invoke_iij
has been emitted here? (@kripken?)I suspect this could have some connection with #8065, since I'm mixing
-s WASM=1
and-s EMULATED_FUNCTION_POINTERS=1
(which I need, since I'm running a WASM JIT compiler in WASM see #7082).The text was updated successfully, but these errors were encountered: