From 4d46a7e2c37299d5a9b9d9d6323ce9fca3a1cf3a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 27 Jul 2017 16:29:12 -0700 Subject: 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) --- test/unit.asm.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/unit.asm.js') 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() { -- cgit v1.2.3