alexlamsl
4f08c2f504
Merge branch 'master' into harmony-v3.2.0
2017-11-26 04:23:57 +08:00
Alex Lam S.L
c141ae6f8d
fix argument/atom collision by properties ( #2514 )
...
fixes #2513
2017-11-25 22:52:46 +08:00
Alex Lam S.L
f1e3ef5262
separate keep_classnames & keep_fnames ( #2510 )
...
fixes #2418
2017-11-25 16:31:52 +08:00
Alex Lam S.L
3b28b915eb
extend escape analysis on constant expression properties ( #2509 )
...
fixes #2508
2017-11-24 14:07:39 +08:00
Alex Lam S.L
eb001dc1d9
fix argument/atom collision by collapse_vars ( #2507 )
...
fixes #2506
2017-11-24 07:26:22 +08:00
Alex Lam S.L
aa9bdf416e
make AST_Lambda.contains_this() less magical ( #2505 )
2017-11-24 07:03:37 +08:00
Alex Lam S.L
bbf38dc9c0
fix reduce_vars on arrow functions with this ( #2504 )
...
fixes #2496
2017-11-24 06:21:49 +08:00
Alex Lam S.L
8987780db6
eliminate invalid state caching in collapse_vars ( #2502 )
...
fixes #2497
2017-11-24 04:12:37 +08:00
kzc
3d8341a7ab
fix properties for array literal with spread ( #2499 )
...
fixes #2498
2017-11-24 02:04:26 +08:00
Alex Lam S.L
b80062c490
enable hoist_props by default ( #2492 )
2017-11-19 14:56:23 +08:00
alexlamsl
227b58812d
Merge branch 'master' into harmony-v3.1.10
2017-11-19 14:34:27 +08:00
Alex Lam S.L
ae28a24c7f
fix cross-scope inlining of AST_Functions ( #2486 )
...
fixes #2485
2017-11-16 10:04:30 +08:00
Alex Lam S.L
ebe761cad0
minor consolidations ( #2484 )
...
- unique symbol generation
- `unsafe` on `AST_Call`
2017-11-16 04:37:37 +08:00
Alex Lam S.L
49fbe9c5ac
fix replacement logic in collapse_vars ( #2475 )
2017-11-13 07:37:42 +08:00
Alex Lam S.L
2ac5086831
fix top_retain on hoist_props ( #2474 )
...
fixes #2473
2017-11-13 00:59:41 +08:00
Alex Lam S.L
c6cfa04d10
allow symbol replacement on multiple occurrences ( #2472 )
...
- all-or-nothing replacement
- avoid unmangleable names
fixes #2436
2017-11-12 22:31:47 +08:00
alexlamsl
11c0b1e1f9
Merge branch 'master' into harmony-v3.1.9
2017-11-11 15:45:34 +08:00
Alex Lam S.L
cda27b0970
extend reduce_funcs to cover cross-scope substitutions ( #2469 )
...
fixes #2468
2017-11-11 15:30:17 +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
650d5d5c9b
suppress hoist_props on export ( #2463 )
...
Miscellaneous
- fix double semi-colons from `beautify` in `export`
fixes #2462
2017-11-10 17:38:31 +08:00
Alex Lam S.L
94525d859f
fix object literal tracing in reduce_vars ( #2461 )
2017-11-10 05:47:10 +08:00
Alex Lam S.L
1127a2caf3
fix multiple nested function substitutions ( #2458 )
...
fixes #2449
2017-11-09 23:30:00 +08:00
Alex Lam S.L
246d9d4e83
remove hack in collapse_vars ( #2457 )
...
fixes #2456
2017-11-09 20:00:58 +08:00
Alex Lam S.L
4c0b0177b6
preserve function identity in reduce_vars ( #2451 )
...
fixes #2450
2017-11-08 03:28:46 +08:00
Alex Lam S.L
dd0a36119b
fix const under collapse_vars without unused ( #2454 )
...
fixes #2453
2017-11-08 02:10:46 +08:00
alexlamsl
e11cec1ab8
Merge branch 'master' into harmony
2017-11-07 04:30:40 +08:00
Alex Lam S.L
bbedbf4ea0
handle circular function reference gracefully ( #2446 )
...
fixes #2442
2017-11-07 02:37:23 +08:00
Alex Lam S.L
2cfb5aa7da
account for eval & with in reduce_vars ( #2441 )
...
fixes #2440
2017-11-06 16:10:57 +08:00
Alex Lam S.L
6c45101870
consolidate & enhance unused ( #2439 )
...
- defer declaration removal in `collapse_vars`
- account for `AST_SymbolFunarg` in deduplication
- private accounting for `collapse_vars`
- avoid issues with identity reference due to deep cloning
fixes #2437
2017-11-06 14:25:10 +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
df9c8dfd72
Merge branch 'master' into harmony-v3.1.7
2017-11-05 15:47:40 +08:00
Alex Lam S.L
5b4b07e9a7
extend function inlining safety checks ( #2430 )
2017-11-05 06:18:45 +08:00
Alex Lam S.L
a8aa28a7a6
consolidate single-use function reduction ( #2427 )
...
fixes #2423
2017-11-05 04:27:01 +08:00
Alex Lam S.L
fe5a68f9d5
maintain call argument order in collapse_vars ( #2426 )
...
fixes #2425
2017-11-05 00:00:18 +08:00
Alex Lam S.L
c8b6f4733d
reduce this within functions ( #2421 )
...
- only replace same-scope usages
- augment `test/ufuzz.js` to test for `this`
fixes #2420
2017-11-04 00:31:37 +08:00
kzc
29bbc41dfe
hoist_props: implement limited hoisting of class expressions ( #2415 )
2017-10-30 23:20:54 +08:00
Alex Lam S.L
a48f87abf2
compress new function containing this ( #2417 )
2017-10-30 23:19:27 +08:00
alexlamsl
0a9cdb6c73
handle computed properties correctly
2017-10-29 17:46:25 +08:00
alexlamsl
3ae34177a6
merge #2391 & #2393
2017-10-29 17:14:52 +08:00
alexlamsl
086cb33163
Merge branch 'master' into harmony-v3.1.6
2017-10-29 13:23:39 +08:00
Alex Lam S.L
8428326ea1
enhance properties ( #2412 )
...
- trim array items only if `side_effects`
- extend to non-identifier properties
2017-10-29 04:11:26 +08:00
Alex Lam S.L
6371e2ee63
consistently reduce const safe literals ( #2411 )
...
fixes #2406
2017-10-28 11:36:44 +08:00
Alex Lam S.L
6ab73c7bd5
fix & improve AST_TemplateString ( #2410 )
...
- resolve `semicolons:false` ambiguity with tagged literals
- allow `side_effects` to work on template literals
- traverse `AST_TemplateString` properly
fixes #2401
2017-10-28 11:36:09 +08:00
Alex Lam S.L
31f8209193
remove dead code ( #2405 )
2017-10-27 14:28:09 +08:00
Alex Lam S.L
9b0f86f5a1
fix reduce_vars on AST_Array.length ( #2404 )
2017-10-27 02:33:37 +08:00
Alex Lam S.L
ee082ace1b
compress self comparisons ( #2398 )
2017-10-26 01:16:12 +08:00
Alex Lam S.L
4178289c38
implement hoist_props ( #2396 )
...
fixes #2377
2017-10-25 03:38:11 +08:00
Alex Lam S.L
74ae16f9f8
fix unsafe reduce_vars on arrays & objects ( #2397 )
2017-10-24 22:10:36 +08:00
Alex Lam S.L
86ea38a259
enhance unsafe evaluate of arrays & objects ( #2394 )
2017-10-24 02:58:30 +08:00
Alex Lam S.L
8a713e449f
deduplicate declarations regardless of toplevel ( #2393 )
2017-10-23 01:00:50 +08:00