HaxeFoundation / HaxeFoundation/haxe

No unused code diagnostics

Open
#12,891 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

```haxe
class Main {
static function main() {
var x = 1;
var dead = x + 1;
deadCall();
}

@:pure static function deadCall():Void {
"dead";
}
}
```
There is almost no unused code after `4.3.0` (regression since 4.3.1)
Especially with `analyzer-optimize` enabled.
```
-cp src
-D analyzer-optimize
-main Main
--interp
--dce full
```

Contributor guide

Open the contributing guide

Research direction

Start by running the provided Main example with -D analyzer-optimize, --interp, and --dce full, comparing the behavior with the stated 4.3.0 baseline. Trace how unused-code diagnostics and dead-code elimination handle the shown unused variable and @:pure deadCall() case; done means the regression is reproduced and unused code is diagnosed again without breaking the supplied compilation options.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.