diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-07-27 16:29:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 16:29:12 -0700 |
commit | 4d46a7e2c37299d5a9b9d9d6323ce9fca3a1cf3a (patch) | |
tree | 278f1da3868901fa8282651ac589c6acc534d535 /test/unit.asm.js | |
parent | 203b7f758c34bf38357ec770659713647585538e (diff) | |
download | binaryen-4d46a7e2c37299d5a9b9d9d6323ce9fca3a1cf3a.tar.gz binaryen-4d46a7e2c37299d5a9b9d9d6323ce9fca3a1cf3a.tar.bz2 binaryen-4d46a7e2c37299d5a9b9d9d6323ce9fca3a1cf3a.zip |
fix import type detection of calls in comma operators; when the parent is a comma, it can't be a coersion (or that would have been the parent), so there is no coercion, so the result type is none (#1115)
Diffstat (limited to 'test/unit.asm.js')
-rw-r--r-- | test/unit.asm.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index 065512011..22e2cf9b4 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -19,6 +19,7 @@ function asm(global, env, buffer) { var print = env.print; var h = env.h; var return_int = env.return_int; + var emscripten_log = env.emscripten_log; var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); @@ -718,6 +719,11 @@ function asm(global, env, buffer) { FUNCTION_TABLE_vi[(Int = 1) & 7](i1 | 0); } + function call_emscripten_log() { + // emscripten_log has no return value, don't let the conditional after the comma confuse you + emscripten_log(), 2 ? abort() | 0 : 3; + } + function keepAlive() { sqrts(3.14159); f2u(100.0); @@ -725,6 +731,7 @@ function asm(global, env, buffer) { autoDrop(52) | 0; indirectInSequence(); emterpretify_assertions_safeHeap(); + call_emscripten_log(); } function v() { |