Repository navigation
Commit bd1e383
committed
perf(javascript): inline single-use functions and literals, join string literals in the one pass
A function declaration read once before it prints at that read, the walk
printing it first; an object or array literal of constants folds into its
one read anywhere in the next statement; literals added to a string join;
and an operation folded into a read prints without parentheses it needs not.
Claude-Session: https://claude.ai/code/session_01Tgxgyb4N35ndP6cC4KcrXC1 parent f2b0c68 commit bd1e383
6 files changed
Lines changed: 357 additions & 6 deletions
File tree
- .changeset
- lib/javascript
- test/unitCases/javascript
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4723 | 4723 | | |
4724 | 4724 | | |
4725 | 4725 | | |
4726 | | - | |
| 4726 | + | |
| 4727 | + | |
| 4728 | + | |
| 4729 | + | |
| 4730 | + | |
4727 | 4731 | | |
4728 | 4732 | | |
4729 | 4733 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20964 | 20964 | | |
20965 | 20965 | | |
20966 | 20966 | | |
| 20967 | + | |
| 20968 | + | |
| 20969 | + | |
| 20970 | + | |
| 20971 | + | |
| 20972 | + | |
20967 | 20973 | | |
20968 | 20974 | | |
20969 | 20975 | | |
| |||
21050 | 21056 | | |
21051 | 21057 | | |
21052 | 21058 | | |
| 21059 | + | |
| 21060 | + | |
| 21061 | + | |
| 21062 | + | |
| 21063 | + | |
21053 | 21064 | | |
21054 | | - | |
21055 | | - | |
| 21065 | + | |
| 21066 | + | |
21056 | 21067 | | |
21057 | 21068 | | |
21058 | 21069 | | |
| |||
21064 | 21075 | | |
21065 | 21076 | | |
21066 | 21077 | | |
| 21078 | + | |
| 21079 | + | |
| 21080 | + | |
| 21081 | + | |
| 21082 | + | |
| 21083 | + | |
| 21084 | + | |
| 21085 | + | |
| 21086 | + | |
| 21087 | + | |
| 21088 | + | |
| 21089 | + | |
| 21090 | + | |
| 21091 | + | |
| 21092 | + | |
| 21093 | + | |
| 21094 | + | |
| 21095 | + | |
| 21096 | + | |
| 21097 | + | |
| 21098 | + | |
| 21099 | + | |
| 21100 | + | |
21067 | 21101 | | |
21068 | 21102 | | |
21069 | 21103 | | |
| |||
21603 | 21637 | | |
21604 | 21638 | | |
21605 | 21639 | | |
| 21640 | + | |
| 21641 | + | |
21606 | 21642 | | |
21607 | 21643 | | |
21608 | 21644 | | |
| |||
21683 | 21719 | | |
21684 | 21720 | | |
21685 | 21721 | | |
| 21722 | + | |
| 21723 | + | |
| 21724 | + | |
| 21725 | + | |
| 21726 | + | |
| 21727 | + | |
| 21728 | + | |
0 commit comments