329809de818366cfccf0a6a69e00191b2639efeb
I realized a wayyyy simpler approach to inlining a lambda: wrap it in a labeled
block. The transformation is roughly as follows:
```javascript
// Before
const x = useMemo(() => {
if (a) {
return b;
}
return c;
}, [a, b, c]);
return x;
// After
let x;
label: {
if (a) {
x = b;
break label;
}
x = c;
break label;
}
return x;
```
The key to making this work is fixing up some edge cases in labeled blocks,
hence the previous PRs.
Description
No description provided
Languages
JavaScript
68.1%
TypeScript
29%
HTML
1.5%
CSS
1.1%
CoffeeScript
0.2%
Other
0.1%