Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: remove bad leftovers
  • Loading branch information
cyyynthia committed Jul 26, 2025
commit f7370ba2fd4add5b97152714d5258ae52bc5460b
16 changes: 8 additions & 8 deletions src/ast/nodes/BinaryExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ import {
type LiteralValueOrUnknown,
UnknownValue
} from './shared/Expression';
import { type ExpressionNode, type IncludeChildren, NodeBase } from './shared/Node';
import {
doNotDeoptimize,
type ExpressionNode,
type IncludeChildren,
NodeBase
} from './shared/Node';

type Operator =
| '!='
Expand Down Expand Up @@ -139,13 +144,6 @@ export default class BinaryExpression extends NodeBase implements DeoptimizableE
return type !== INTERACTION_ACCESSED || path.length > 1;
}

applyDeoptimizations(): void {
this.deoptimized = true;
if (this.operator !== 'in' || !this.right.variable?.isNamespace) {
this.scope.context.requestTreeshakingPass();
}
}

include(
context: InclusionContext,
includeChildrenRecursively: IncludeChildren,
Expand Down Expand Up @@ -182,3 +180,5 @@ export default class BinaryExpression extends NodeBase implements DeoptimizableE
}
}
}

BinaryExpression.prototype.applyDeoptimizations = doNotDeoptimize;