diff options
-rw-r--r-- | src/parseTools.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index d22f4415..c352621d 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -999,7 +999,7 @@ function makeVarDef(js) { function asmEnsureFloat(value, type) { // ensures that a float type has either 5.5 (clearly a float) or +5 (float due to asm coercion) if (!ASM_JS) return value; - if (!isIntImplemented(type) && isNumber(value) && value.toString().indexOf('.') < 0) { + if (type in Runtime.FLOAT_TYPES && isNumber(value) && value.toString().indexOf('.') < 0) { return '(+(' + value + '))'; } else { return value; @@ -1007,10 +1007,10 @@ function asmEnsureFloat(value, type) { // ensures that a float type has either 5 } function asmInitializer(type, impl) { - if (isIntImplemented(type)) {// || (impl && impl == 'VAR_EMULATED')) { - return '0'; - } else { + if (type in Runtime.FLOAT_TYPES) { return '+0'; + } else { + return '0'; } } |