diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-26 15:44:42 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-26 16:15:10 -0700 |
commit | c4258fe4e07f3672ad26f180f9dcdcdea4e7bac1 (patch) | |
tree | 8f279b483fd61b77c000c7c812a2099aa4f71fa3 | |
parent | 2aa78262338e1c240773cd63ed09231c505e6734 (diff) |
hackish optimization for pre processing of heap inits, avoid pure numeric strings
-rw-r--r-- | src/parseTools.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 76c4950d..a1534265 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1348,6 +1348,7 @@ function makeSetValue(ptr, pos, value, type, noNeedFirst, ignore, align, noSafe, value = indexizeFunctions(value, type); var offset = calcFastOffset(ptr, pos, noNeedFirst); + if (phase === 'pre' && isNumber(offset)) offset += ' '; // avoid pure numeric strings, seem to be perf issues with overly-aggressive interning or slt in pre processing of heap inits if (SAFE_HEAP && !noSafe) { var printType = type; if (printType !== 'null' && printType[0] !== '#') printType = '"' + safeQuote(printType) + '"'; |