Replies: 1 comment
-
Let's experiment and get the tests passing first, as long as there are no performance regressions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
consider the following code:
Currently, the AST generated for this code is (some parts removed for emphasis):
The CFG for this node essentially does the following:
However, strictly speaking, the
return
statement does have a specific control-flow meaning as follows:In this alternate CFG, we see that the second node, containing the
this
is unreachable, whereas thereturn
statement indicates a transition in control flow.Currently, oxc creates the first type of CFG. I'm curious if there are any objections to my changing the CFG node structure to better handle these types of dead code?
Beta Was this translation helpful? Give feedback.
All reactions