Rework has_directive
authorMihai Bazon <mihai.bazon@gmail.com>
Wed, 11 Nov 2015 20:15:25 +0000 (22:15 +0200)
committerMihai Bazon <mihai.bazon@gmail.com>
Wed, 11 Nov 2015 20:15:25 +0000 (22:15 +0200)
commit7691bebea525e96cb74d52e0bb8f294cf778c966
treed2485ce55b215edb1846cbbe9cc3e4e3ad28725d
parent3c4346728e5067608b6393ba98e24849ac22adea
Rework has_directive

It's now available during tree walking, i.e. walker.has_directive("use
asm"), rather than as part of the scope.  It's thus no longer necessary
to call `figure_out_scope` before codegen.  Added special bits in the
code generator to overcome the fact that it doesn't inherit from
TreeWalker.

Fix #861
bin/uglifyjs
lib/ast.js
lib/compress.js
lib/output.js
lib/parse.js
lib/scope.js
lib/transform.js
tools/node.js