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
This commit is contained in:
Mihai Bazon
2012-09-14 15:36:38 +03:00
parent 93b973c99d
commit 924aa58060
6 changed files with 256 additions and 79 deletions

View File

@@ -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()
});
}