| 23 | } from './shared/Node'; |
| 24 | |
| 25 | export default class SequenceExpression extends NodeBase { |
| 26 | declare expressions: ExpressionNode[]; |
| 27 | declare type: NodeType.tSequenceExpression; |
| 28 | |
| 29 | deoptimizeArgumentsOnInteractionAtPath( |
| 30 | interaction: NodeInteraction, |
| 31 | path: ObjectPath, |
| 32 | recursionTracker: EntityPathTracker |
| 33 | ): void { |
| 34 | this.expressions[this.expressions.length - 1].deoptimizeArgumentsOnInteractionAtPath( |
| 35 | interaction, |
| 36 | path, |
| 37 | recursionTracker |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | deoptimizePath(path: ObjectPath): void { |
| 42 | this.expressions[this.expressions.length - 1].deoptimizePath(path); |
| 43 | } |
| 44 | |
| 45 | getLiteralValueAtPath( |
| 46 | path: ObjectPath, |
| 47 | recursionTracker: EntityPathTracker, |
| 48 | origin: DeoptimizableEntity |
| 49 | ): LiteralValueOrUnknown { |
| 50 | return this.expressions[this.expressions.length - 1].getLiteralValueAtPath( |
| 51 | path, |
| 52 | recursionTracker, |
| 53 | origin |
| 54 | ); |
| 55 | } |
| 56 | |
| 57 | hasEffects(context: HasEffectsContext): boolean { |
| 58 | for (const expression of this.expressions) { |
| 59 | if (expression.hasEffects(context)) return true; |
| 60 | } |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | hasEffectsOnInteractionAtPath( |
| 65 | path: ObjectPath, |
| 66 | interaction: NodeInteraction, |
| 67 | context: HasEffectsContext |
| 68 | ): boolean { |
| 69 | return this.expressions[this.expressions.length - 1].hasEffectsOnInteractionAtPath( |
| 70 | path, |
| 71 | interaction, |
| 72 | context |
| 73 | ); |
| 74 | } |
| 75 | |
| 76 | include(context: InclusionContext, includeChildrenRecursively: IncludeChildren): void { |
| 77 | this.included = true; |
| 78 | const lastExpression = this.expressions[this.expressions.length - 1]; |
| 79 | for (const expression of this.expressions) { |
| 80 | if ( |
| 81 | includeChildrenRecursively || |
| 82 | (expression === lastExpression && !(this.parent instanceof ExpressionStatement)) || |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…