diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-25 18:26:01 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-25 18:26:01 -0800 |
commit | 55ea32242febfd83841d39d1b53d6e2f190db67c (patch) | |
tree | c13dcf5fba84645793fa6dd47de8f41c8b6c45dc | |
parent | c3403cd5e02a49861b33d170f8b3e3aa00203eb8 (diff) |
do not mark floats as unsigned (which then affects how we do SAFE_HEAP_LOADS, and takes unnecessary processing time during compilation). fixes test_the_bullet
-rw-r--r-- | src/analyzer.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 7412be6d..a724d229 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -463,6 +463,12 @@ function analyzer(data, sidePass) { item.functions.forEach(function(func) { func.lines.forEach(function(line, i) { if (line.intertype === 'assign' && line.value.intertype === 'load') { + // Floats have no concept of signedness. Mark them as 'signed', which is the default, for which we do nothing + if (line.value.type in Runtime.FLOAT_TYPES) { + line.value.unsigned = false; + return; + } + // Booleans are always unsigned var data = func.variables[line.ident]; if (data.type === 'i1') { line.value.unsigned = true; |