mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
perf(semantic): simplify resetting ReferenceFlags in AssignmentExpression (#5846)
This commit is contained in:
1 parent
15743344b1
commit
c3e0fb68c5
1 file changed
+1
-8
@@ -2003,14 +2003,7 @@ impl<'a> SemanticBuilder<'a> {
|
||||
}
|
||||
self.current_reference_flags -= ReferenceFlags::Write;
|
||||
}
|
||||
AstKind::AssignmentExpression(expr) => {
|
||||
if expr.operator != AssignmentOperator::Assign
|
||||
|| self.is_not_expression_statement_parent()
|
||||
{
|
||||
self.current_reference_flags -= ReferenceFlags::Read;
|
||||
}
|
||||
}
|
||||
AstKind::ExportNamedDeclaration(_)
|
||||
AstKind::AssignmentExpression(_) | AstKind::ExportNamedDeclaration(_)
|
||||
| AstKind::TSTypeQuery(_)
|
||||
// Clear the reference flags that are set in AstKind::PropertySignature
|
||||
| AstKind::PropertyKey(_) => {
|
||||
|
||||
Reference in new issue
Block a user