diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-09-14 15:36:38 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-09-14 15:36:38 +0300 |
commit | 924aa580602a4ad94f1079dcd157286314066553 (patch) | |
tree | acd65dd576ded856e5e7cc3b15ee473539b645ac /lib/parse.js | |
parent | 93b973c99dd25aeff66ff31f2881e9ce252eaac6 (diff) | |
download | tracifyjs-924aa580602a4ad94f1079dcd157286314066553.tar.gz tracifyjs-924aa580602a4ad94f1079dcd157286314066553.zip |
more optimizations that v1 does and some cleanups
- a = a + x ==> a+=x
- joining consecutive var statements (hoisting is not always desirable)
- x == false ==> x == 0, x != true ==> x != 1
- x, x ==> x; x = exp(), x ==> x = exp()
- discarding useless break-s
Diffstat (limited to 'lib/parse.js')
-rw-r--r-- | lib/parse.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/parse.js b/lib/parse.js index 1c9e37fd..77c75343 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -1455,8 +1455,8 @@ function parse($TEXT, exigent_mode) { next(); return new AST_Seq({ start : start, - first : expr, - second : expression(true, no_in), + car : expr, + cdr : expression(true, no_in), end : peek() }); } |