diff --git a/src/lib/libcore.js b/src/lib/libcore.js index d12417541f737..0bbe7c27736d3 100644 --- a/src/lib/libcore.js +++ b/src/lib/libcore.js @@ -1967,42 +1967,16 @@ addToLibrary({ _emscripten_get_progname__deps: ['$getExecutableName', '$stringToUTF8'], _emscripten_get_progname: (str, len) => stringToUTF8(getExecutableName(), str, len), - emscripten_console_log: (str) => { -#if ASSERTIONS - assert(typeof str == 'number'); -#endif - console.log(UTF8ToString(str)); - }, - - emscripten_console_warn: (str) => { -#if ASSERTIONS - assert(typeof str == 'number'); -#endif - console.warn(UTF8ToString(str)); - }, - - emscripten_console_error: (str) => { -#if ASSERTIONS - assert(typeof str == 'number'); -#endif - console.error(UTF8ToString(str)); - }, - - emscripten_console_trace: (str) => { -#if ASSERTIONS - assert(typeof str == 'number'); -#endif - console.trace(UTF8ToString(str)); - }, + emscripten_console_log: (str) => console.log(UTF8ToString(str)), + emscripten_console_warn: (str) => console.warn(UTF8ToString(str)), + emscripten_console_error: (str) => console.error(UTF8ToString(str)), + emscripten_console_trace: (str) => console.trace(UTF8ToString(str)), emscripten_throw_number: (number) => { throw number; }, emscripten_throw_string: (str) => { -#if ASSERTIONS - assert(typeof str == 'number'); -#endif throw UTF8ToString(str); }, @@ -2185,7 +2159,7 @@ addToLibrary({ $alignMemory: (size, alignment) => { #if ASSERTIONS - assert(alignment, "alignment argument is required"); + assert(alignment, 'alignment argument is required'); #endif return Math.ceil(size / alignment) * alignment; }, diff --git a/test/codesize/hello_world_wasm.expected.js b/test/codesize/hello_world_wasm.expected.js index dd8856ad90787..d5e4d676b54d1 100644 --- a/test/codesize/hello_world_wasm.expected.js +++ b/test/codesize/hello_world_wasm.expected.js @@ -8,7 +8,7 @@ WebAssembly.instantiate(d.wasm, { for (var b = a, l = e, m = b + void 0; l[b] && !(b >= m); ) ++b; a = f.decode(e.subarray(a, b)); } else a = ""; - k.call(c, a); + return k.call(c, a); } } }).then((a => { diff --git a/test/codesize/hello_world_wasm2js.expected.js b/test/codesize/hello_world_wasm2js.expected.js index 67398d58d9e21..f450fc6d41386 100644 --- a/test/codesize/hello_world_wasm2js.expected.js +++ b/test/codesize/hello_world_wasm2js.expected.js @@ -51,7 +51,7 @@ function e(a) { for (var n = a, c = g, f = n + void 0; c[n] && !(n >= f); ) ++n; a = h.decode(g.subarray(a, n)); } else a = ""; - u.call(q, a); + return u.call(q, a); } } }).then((a => { diff --git a/test/codesize/test_codesize_hello_dylink_all.json b/test/codesize/test_codesize_hello_dylink_all.json index 8c6a7d7dc015b..8cdb5bf97f9bc 100644 --- a/test/codesize/test_codesize_hello_dylink_all.json +++ b/test/codesize/test_codesize_hello_dylink_all.json @@ -1,7 +1,7 @@ { - "a.out.js": 267889, + "a.out.js": 267881, "a.out.nodebug.wasm": 587151, - "total": 855040, + "total": 855032, "sent": [ "IMG_Init", "IMG_Load", diff --git a/test/codesize/test_minimal_runtime_code_size_hello_world_wasm.json b/test/codesize/test_minimal_runtime_code_size_hello_world_wasm.json index cbc776e272b48..5a3d9867adb99 100644 --- a/test/codesize/test_minimal_runtime_code_size_hello_world_wasm.json +++ b/test/codesize/test_minimal_runtime_code_size_hello_world_wasm.json @@ -1,10 +1,10 @@ { "a.html": 548, "a.html.gz": 371, - "a.js": 287, - "a.js.gz": 242, + "a.js": 294, + "a.js.gz": 247, "a.wasm": 95, "a.wasm.gz": 101, - "total": 930, - "total_gz": 714 + "total": 937, + "total_gz": 719 } diff --git a/test/codesize/test_minimal_runtime_code_size_hello_world_wasm2js.json b/test/codesize/test_minimal_runtime_code_size_hello_world_wasm2js.json index 2c0a2455dba6f..e00d3e78ab55d 100644 --- a/test/codesize/test_minimal_runtime_code_size_hello_world_wasm2js.json +++ b/test/codesize/test_minimal_runtime_code_size_hello_world_wasm2js.json @@ -1,8 +1,8 @@ { "a.html": 319, "a.html.gz": 243, - "a.js": 965, - "a.js.gz": 588, - "total": 1284, - "total_gz": 831 + "a.js": 972, + "a.js.gz": 590, + "total": 1291, + "total_gz": 833 }