From fe0d110de9ed7eaf58a321b4be66b89bb951abc9 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 7 Jan 2013 16:12:26 -0800 Subject: do not asm coerce values of type void (e.g. functions that return nothing) --- src/parseTools.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parseTools.js b/src/parseTools.js index bcae838a..89267d10 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1016,7 +1016,9 @@ function asmInitializer(type, impl) { function asmCoercion(value, type) { if (!ASM_JS) return value; - if (isIntImplemented(type)) { + if (type == 'void') { + return value; + } else if (isIntImplemented(type)) { return '((' + value + ')|0)'; } else { return '(+(' + value + '))'; -- cgit v1.2.3-18-g5258