alexlamsl
a3b8dec347
Merge branch 'master' into harmony-v3.3.1
2017-12-25 17:34:16 +08:00
Alex Lam S.L
49ce573971
handle non-ES5 node types in inline ( #2648 )
...
fixes #2647
2017-12-25 17:25:38 +08:00
Alex Lam S.L
cb6a92892f
fix infinite loop during inline ( #2645 )
...
fixes #2644
2017-12-25 01:57:11 +08:00
alexlamsl
fc3010bec5
add tests for #2613
2017-12-24 22:18:34 +08:00
alexlamsl
dbf8684287
Merge branch 'master' into harmony-v3.3.0
2017-12-24 19:19:24 +08:00
Alex Lam S.L
202f90ef8f
fix corner cases with collapse_vars, inline & reduce_vars ( #2637 )
...
fixes #2630
2017-12-24 01:24:12 +08:00
Alex Lam S.L
fac003c64f
avoid inline of function with special argument names ( #2625 )
2017-12-20 02:48:04 +08:00
Alex Lam S.L
2273655c17
fix inline after single-use reduce_vars ( #2623 )
2017-12-19 22:19:33 +08:00
Alex Lam S.L
032f096b7f
add test for #2613 ( #2618 )
2017-12-19 05:22:05 +08:00
Alex Lam S.L
4b334edf49
handle global constant collision with local variable after inline ( #2617 )
...
fixes #2616
2017-12-19 03:05:30 +08:00
Alex Lam S.L
8ddcbc39e6
compress apply() & call() of function ( #2613 )
...
- `fn.apply(a, [ ... ])` => `fn.call(a, ...)`
- `fn.call(a, ... )` => `a, fn(...)`
where `fn` can be `function` literal or symbol reference linked through `reduce_vars`
2017-12-18 16:23:39 +08:00
Alex Lam S.L
21794c9b8d
account for catch variable when inline ( #2605 )
...
fixes #2604
2017-12-16 15:21:09 +08:00
Alex Lam S.L
6c686ce593
fix nested inline ( #2602 )
...
fixes #2601
2017-12-16 02:16:35 +08:00
Alex Lam S.L
8f681b1d17
handle inline of function arguments ( #2590 )
...
fixes #2476
2017-12-15 13:28:30 +08:00
Alex Lam S.L
90313875f7
inline single-use function across loop ( #2594 )
2017-12-14 19:24:54 +08:00
Alex Lam S.L
ef618332ea
fold cascade functionality into collapse_vars ( #2586 )
2017-12-14 01:20:36 +08:00
alexlamsl
21c986ff5b
Merge branch 'master' into harmony-v3.2.2
2017-12-10 14:12:24 +08:00
Alex Lam S.L
d21cb84696
eliminate noop calls more aggressively ( #2559 )
2017-12-07 01:22:08 +08:00
alexlamsl
c9dbe9deb1
Merge branch 'master' into harmony-v3.2.1
2017-12-03 11:59:41 +08:00
Alex Lam S.L
5a1e99d713
improve compression of if conditions ( #2544 )
2017-12-01 06:18:31 +08:00
Alex Lam S.L
bc5047c1e7
fix inline on nested substitutions ( #2533 )
...
fixes #2531
2017-11-29 13:31:41 +08:00
alexlamsl
11c0b1e1f9
Merge branch 'master' into harmony-v3.1.9
2017-11-11 15:45:34 +08:00
Alex Lam S.L
3c74047368
implement compress option reduce_funcs ( #2466 )
...
- inline single-use function declarations as expressions when permissible
- depend on `reduce_vars`
- enabled by default
- disable for speed critical code
fixes #2464
2017-11-11 05:59:35 +08:00
Alex Lam S.L
1127a2caf3
fix multiple nested function substitutions ( #2458 )
...
fixes #2449
2017-11-09 23:30:00 +08:00
alexlamsl
e11cec1ab8
Merge branch 'master' into harmony
2017-11-07 04:30:40 +08:00
Alex Lam S.L
2c2fd89e34
inline single-use functions that are not constant expressions ( #2434 )
...
fixes #2428
2017-11-05 22:14:11 +08:00
alexlamsl
086cb33163
Merge branch 'master' into harmony-v3.1.6
2017-10-29 13:23:39 +08:00
Alex Lam S.L
24aa07855b
safer properties transform ( #2391 )
...
`{ a: x, b: y }.a` => `[ x, y ][0]`
- `x` cannot be function containing `this`
`[ x, y, z ][1]` => `(x, z, y)`
- only if `z` is side-effect-free
2017-10-22 20:10:13 +08:00
Alex Lam S.L
011123223b
fix unsafe escape analysis in reduce_vars ( #2387 )
2017-10-22 03:23:31 +08:00
alexlamsl
e77b6d525c
Merge branch 'master' into harmony-v3.0.23
2017-07-02 17:47:21 +08:00
Alex Lam S.L
d40950b741
improve inline efficiency ( #2188 )
...
... by teaching `collapse_vars` some new tricks.
fixes #2187
2017-07-02 01:05:14 +08:00
alexlamsl
087bce508a
Merge branch 'master' into harmony-v3.0.21
2017-06-29 00:58:28 +08:00
Alex Lam S.L
f0a99125ee
improve unsafe_Func ( #2171 )
...
- minimise disturbance to `compute_char_frequency()`
- remove extraneous quotation marks
2017-06-27 23:53:42 +08:00
alexlamsl
11afa816e3
Merge branch 'master' into harmony-v3.0.20
2017-06-25 16:43:44 +08:00
Alex Lam S.L
dc6bcaa18e
synchronise mangle.properties for minify() & test/compress ( #2151 )
2017-06-23 15:53:13 +08:00
alexlamsl
daaf1273fa
Merge branch 'master' into harmony-v3.0.18
2017-06-18 15:49:49 +08:00
Alex Lam S.L
0a0f4f5591
make defensive copies when inline ( #2116 )
...
fixes #2114
2017-06-17 14:32:37 +08:00
Alex Lam S.L
11e63bc335
correctly determine scope of AST_This ( #2109 )
...
fixes #2107
2017-06-16 14:54:46 +08:00
alexlamsl
78cf35f89c
Merge branch 'master' into harmony-v3.0.17
2017-06-15 19:01:36 +08:00
Alex Lam S.L
b85a358deb
suppress inline of this ( #2103 )
...
fixes #2101
2017-06-15 12:14:16 +08:00
Alex Lam S.L
3f961bbba0
compute uses_arguments correctly in figure_out_scope() ( #2099 )
...
fixes #2097
2017-06-15 03:28:26 +08:00
alexlamsl
8af362ed57
Merge branch 'master' into harmony-v3.0.16
2017-06-14 17:09:30 +08:00
Alex Lam S.L
2bdc8802dd
fix variable accounting in inline ( #2085 )
...
fixes #2084
2017-06-13 01:40:14 +08:00
Alex Lam S.L
3493a182b2
implement function inlining ( #2053 )
...
- empty body
- single `AST_Return`
- single `AST_SimpleStatement`
- avoid `/*#__PURE__*/`
Miscellaneous
- enhance single-use function substitution
fixes #281
2017-06-06 05:49:53 +08:00
Alex Lam S.L
27c5284d3d
workaround webkit parsing error ( #2056 )
...
apply `webkit` to jetstream tests
2017-06-06 04:06:42 +08:00
alexlamsl
c814060b4a
Merge branch 'master' into harmony-v3.0.14
2017-05-31 11:42:54 +08:00
Alex Lam S.L
e9645e017f
introduce unsafe_Func ( #2033 )
...
Separate flag for #203 functionality.
2017-05-31 03:38:00 +08:00
Alex Lam S.L
79131cd647
extend node_version range on applicable tests ( #2015 )
2017-05-27 22:18:28 +08:00
alexlamsl
94d2aeee89
fix block-scoped function for ES6
...
fixes #1903
2017-05-27 19:28:07 +08:00
Alex Lam S.L
7b13159cda
fix hoist_funs on block-scoped function under "use strict" ( #2013 )
...
Technically not part of ES5, but commonly used code exists in the wild.
2017-05-27 17:44:59 +08:00