fix variable substitution (#1816)

- let `collapse_vars` take care of value containing any symbols
- improve overhead accounting
This commit is contained in:
Alex Lam S.L
2017-04-16 17:25:39 +08:00
committed by alexlamsl
parent 04b8964505
commit 43ad4e9775
3 changed files with 87 additions and 9 deletions

View File

@@ -35,11 +35,11 @@ f7: {
console.log(a, b);
}
expect_exact: [
"var a = 100, b = 10;",
"var b = 10;",
"",
"!function() {",
" for (;b = a, !1; ) ;",
"}(), console.log(a, b);",
" for (;b = 100, !1; ) ;",
"}(), console.log(100, b);",
]
expect_stdout: true
}