mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(cfg): include export default code in CFG instructions (#7862)
Previously any instructions happening inside of the expression passed to `export default` were invisible in the CFG. Example: ``` // Uncommenting this line makes the call to bar() disappear from the // CFG view of the program: // export default bar(); ```
This commit is contained in:
parent
eb47d433ff
commit
3659e6d768
2 changed files with 4 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ impl<'a> AstKind<'a> {
|
|||
| Self::DebuggerStatement(_) | Self::EmptyStatement(_) | Self::ExpressionStatement(_)
|
||||
| Self::LabeledStatement(_) | Self::ReturnStatement(_) | Self::SwitchStatement(_)
|
||||
| Self::ThrowStatement(_) | Self::TryStatement(_) | Self::WithStatement(_)
|
||||
| Self::IfStatement(_) | Self::VariableDeclaration(_))
|
||||
| Self::IfStatement(_) | Self::VariableDeclaration(_) | Self::ExportDefaultDeclaration(_))
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ bb6: {
|
|||
}
|
||||
|
||||
bb7: {
|
||||
|
||||
statement
|
||||
}
|
||||
|
||||
bb8: {
|
||||
|
|
@ -172,7 +172,8 @@ ExpressionStatement" shape = box]
|
|||
5 [ label = "bb5" shape = box]
|
||||
6 [ label = "bb6
|
||||
return" shape = box]
|
||||
7 [ label = "bb7" shape = box]
|
||||
7 [ label = "bb7
|
||||
ExportDefaultDeclaration" shape = box]
|
||||
8 [ label = "bb8" shape = box]
|
||||
9 [ label = "bb9
|
||||
return" shape = box]
|
||||
|
|
|
|||
Loading…
Reference in a new issue