diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 19:35:11 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 19:35:11 -0500 |
commit | bafdc889fcfcab5715e8dae5d26c3d5ff3160498 (patch) | |
tree | 71dc212bf53d133901541dc508786b3b2052c9e3 /src/jsifier.js | |
parent | 4113375f1f0f6d3a807c1edd843e96596ee6e2c5 (diff) |
show signature in dyncall errors, and simplify approach
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index ff43c8c6..0e82a547 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1402,7 +1402,8 @@ function JSify(data, functionsOnly, givenFunctions) { assert(returnType.search(/\("'\[,/) == -1); // XXX need isFunctionType(type, out) callIdent = '(' + callIdent + ')&{{{ FTM_' + sig + ' }}}'; // the function table mask is set in emscripten.py } else if (SAFE_DYNCALLS) { - callIdent = '(tempInt=' + callIdent + ',tempInt < 0 || tempInt >= FUNCTION_TABLE.length-1 ? abort("dyncall error") : tempInt)'; + assert(!ASM_JS, 'cannot emit safe dyncalls in asm'); + callIdent = '(tempInt=' + callIdent + ',tempInt < 0 || tempInt >= FUNCTION_TABLE.length-1 || !FUNCTION_TABLE[tempInt] ? abort("dyncall error: ' + sig + '") : tempInt)'; } callIdent = Functions.getTable(sig) + '[' + callIdent + ']'; } |