diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-23 15:43:01 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-23 15:43:01 -0800 |
commit | b86abc2ecfea9ccbb93cad2fe4e9f8574beb7ed8 (patch) | |
tree | e966f2fd2bc38d15c18fa880098ba5c8b91f07eb /tools/js-optimizer.js | |
parent | 9b3e1b8d8e948709a9df1a23ea8790c93eb5b82e (diff) |
fix bug where close-together tempDoublePtr operations could cross each other
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 9efca25f..6e82451c 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -2427,7 +2427,12 @@ function eliminate(ast, memSafe) { if (allowTracking) track(name, node[3], node); } } else if (target[0] === 'sub') { - if (!isTempDoublePtrAccess(target) && !memoryInvalidated) { + if (isTempDoublePtrAccess(target)) { + if (!globalsInvalidated) { + invalidateGlobals(); + globalsInvalidated = true; + } + } else if (!memoryInvalidated) { invalidateMemory(); memoryInvalidated = true; } |