aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/compress.js b/lib/compress.js
index d01ebbea..807872f4 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -5605,21 +5605,25 @@ merge(Compressor.prototype, {
}
function mark(sym, read) {
- if (in_try) push();
- var def = sym.definition(), ldef;
+ var def = sym.definition(), ldef, seg = segment;
+ if (in_try) {
+ push();
+ seg = segment;
+ pop();
+ }
if (def.id in references) {
var refs = references[def.id];
if (!refs) return;
- if (refs.start.block !== segment.block) return references[def.id] = false;
+ if (refs.start.block !== seg.block) return references[def.id] = false;
refs.push(sym);
- refs.end = segment;
+ refs.end = seg;
if (def.id in prev) {
last[prev[def.id]] = null;
} else if (!read) {
return;
}
} else if ((ldef = self.variables.get(def.name)) !== def) {
- if (ldef && root === segment) references[ldef.id] = false;
+ if (ldef && root === seg) references[ldef.id] = false;
return references[def.id] = false;
} else if (compressor.exposed(def) || NO_MERGE[sym.name]) {
return references[def.id] = false;
@@ -5628,13 +5632,13 @@ merge(Compressor.prototype, {
refs.push(sym);
references[def.id] = refs;
if (!read) {
- refs.start = segment;
+ refs.start = seg;
return first.push({
index: index++,
definition: def,
});
}
- if (segment.block !== self) return references[def.id] = false;
+ if (seg.block !== self) return references[def.id] = false;
refs.start = root;
}
prev[def.id] = last.length;