Improve replace + DCE w. surrounding blocks
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
When Babili is run with replacements, such as to replace `console.log` with empty function, but there's surrounding block, that block is never removed:
```
if (!this.smth) {
console.log("foo bar");
}
```
Contributor guide
Research direction
No source file or test is named. Reproduce the Babili replacement example with the surrounding if block, then trace the replacement and dead-code-elimination passes; done means the block is removed when its only statement becomes an empty function call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100