diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-06 11:19:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-06 11:19:24 -0700 |
commit | 02e17989658240e921d41c9c7a40c5ff3c52c563 (patch) | |
tree | c2aacd4c6c4e32a0ce37450870e21282c648da21 | |
parent | 0ff7f8dcd655e84eb7c750cff927b11231b61589 (diff) |
improve non-switchification error message
-rw-r--r-- | src/jsifier.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index f5682a1b..38f3bd5e 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1143,8 +1143,8 @@ function JSify(data, functionsOnly, givenFunctions) { }); var range = maxx - minn; var useIfs = (item.switchLabels.length+1) < 6 || range > 10*1024 || (range/item.switchLabels.length) > 1024; // heuristics - if (VERBOSE && useIfs && item.switchLabels.length > 2) { - warn('not optimizing llvm switch into js switch because ' + [range, range/item.switchLabels.length]); + if (VERBOSE && useIfs && item.switchLabels.length >= 6) { + warn('not optimizing llvm switch into js switch because range of values is ' + range + ', density is ' + range/item.switchLabels.length); } var phiSets = calcPhiSets(item); |