aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-12-20 17:05:53 +0800
committerGitHub <noreply@github.com>2017-12-20 17:05:53 +0800
commit7ac7b0872fd8ba6866162697ac6956a737e20a04 (patch)
tree33edbafc31ab7b7fd93925afa534afaca92b985a /lib
parent86ae5881b7b269dc656520ff4dddbbd365013a0b (diff)
downloadtracifyjs-7ac7b0872fd8ba6866162697ac6956a737e20a04.tar.gz
tracifyjs-7ac7b0872fd8ba6866162697ac6956a737e20a04.zip
remove AST hack from `inline` (#2627)
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 3410b5a7..85cc6ddf 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -4036,8 +4036,10 @@ merge(Compressor.prototype, {
scope.var_names()[name.name] = true;
scope.variables.set(name.name, def);
scope.enclosed.push(def);
+ var symbol = make_node(AST_SymbolVar, name, name);
+ def.orig.push(symbol);
decls.unshift(make_node(AST_VarDef, name, {
- name: name,
+ name: symbol,
value: null
}));
var sym = make_node(AST_SymbolRef, name, name);