aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-22 21:29:26 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-12-22 21:29:26 -0800
commit8825277bf323c15f8354e0429af85868b919cf9a (patch)
tree995157d3896d48d56740297c161b30aa230083a2 /tools
parent8777d056f398bf87397641afbe9cae986305503c (diff)
comment on how tempDoublePtr is optimized
Diffstat (limited to 'tools')
-rw-r--r--tools/js-optimizer.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 57585663..9efca25f 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -2139,6 +2139,9 @@ var IGNORABLE_ELIMINATOR_SCAN_NODES = set('num', 'toplevel', 'string', 'break',
var ABORTING_ELIMINATOR_SCAN_NODES = set('new', 'object', 'function', 'defun', 'for', 'while', 'array', 'throw'); // we could handle some of these, TODO, but nontrivial (e.g. for while, the condition is hit multiple times after the body)
function isTempDoublePtrAccess(node) { // these are used in bitcasts; they are not really affecting memory, and should cause no invalidation
+ // XXX note that we assume they have no effect. this is only true due to the compiler emitting (write, read)
+ // using the comma operator, so they are not split up. Otherwise, we would need to invalidate
+ // tempDoublePtr when it is used, so write; read; write; read; would not become write; write; read; read;
assert(node[0] === 'sub');
return (node[2][0] === 'name' && node[2][1] === 'tempDoublePtr') ||
(node[2][0] === 'binary' && ((node[2][2][0] === 'name' && node[2][2][1] === 'tempDoublePtr') ||