mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
perf(semantic): simplify resetting ReferenceFlags in AssignmentExpression (#5846)
This commit is contained in:
parent
15743344b1
commit
c3e0fb68c5
1 changed files with 1 additions and 8 deletions
|
|
@ -2003,14 +2003,7 @@ impl<'a> SemanticBuilder<'a> {
|
||||||
}
|
}
|
||||||
self.current_reference_flags -= ReferenceFlags::Write;
|
self.current_reference_flags -= ReferenceFlags::Write;
|
||||||
}
|
}
|
||||||
AstKind::AssignmentExpression(expr) => {
|
AstKind::AssignmentExpression(_) | AstKind::ExportNamedDeclaration(_)
|
||||||
if expr.operator != AssignmentOperator::Assign
|
|
||||||
|| self.is_not_expression_statement_parent()
|
|
||||||
{
|
|
||||||
self.current_reference_flags -= ReferenceFlags::Read;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
AstKind::ExportNamedDeclaration(_)
|
|
||||||
| AstKind::TSTypeQuery(_)
|
| AstKind::TSTypeQuery(_)
|
||||||
// Clear the reference flags that are set in AstKind::PropertySignature
|
// Clear the reference flags that are set in AstKind::PropertySignature
|
||||||
| AstKind::PropertyKey(_) => {
|
| AstKind::PropertyKey(_) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue