Commit 845ba18
js-port: peephole-collapse the call-result temp and identity copy-pairs
{ let __result = <call>; X = __result; } -> X = <call>; (RHS fully
evaluates before the store, so the rewrite is sound even when X appears
in the call expression), plus the adjacent X = Y; Y = X; identity pair.
Modest raw win (-13KB; esbuild already collapses most of these
downstream) but it also shrinks the pre-esbuild chunks the whitespace
budget and chunk splitter operate on. Suite green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 407555f commit 845ba18
1 file changed
Lines changed: 19 additions & 0 deletions
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
1110 | 1129 | | |
1111 | 1130 | | |
1112 | 1131 | | |
| |||
0 commit comments