aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-02-26 00:40:33 +0800
committerGitHub <noreply@github.com>2017-02-26 00:40:33 +0800
commit16cd5d57a5cf7f5750104df0e5af246708fd493f (patch)
treee9ea6b8432ce0bddeeeef317f96765de1467ceeb /lib/scope.js
parent834f9f39245f1ddf5a29c579afd7ebcdb0afe585 (diff)
downloadtracifyjs-16cd5d57a5cf7f5750104df0e5af246708fd493f.tar.gz
tracifyjs-16cd5d57a5cf7f5750104df0e5af246708fd493f.zip
consolidate `evaluate` & `reduce_vars` (#1505)
- improve marking efficiency - apply smarter `const` replacement to `var` fixes #1501
Diffstat (limited to 'lib/scope.js')
-rw-r--r--lib/scope.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/scope.js b/lib/scope.js
index 29e4103a..ae0c5777 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -51,7 +51,6 @@ function SymbolDef(scope, index, orig) {
this.global = false;
this.mangled_name = null;
this.undeclared = false;
- this.constant = false;
this.index = index;
this.id = SymbolDef.next_id++;
};
@@ -156,7 +155,6 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
else if (node instanceof AST_SymbolVar
|| node instanceof AST_SymbolConst) {
var def = defun.def_variable(node);
- def.constant = node instanceof AST_SymbolConst;
def.init = tw.parent().value;
}
else if (node instanceof AST_SymbolCatch) {