| 27 | import SpreadElement from './SpreadElement'; |
| 28 | |
| 29 | export default class ObjectExpression extends NodeBase implements DeoptimizableEntity { |
| 30 | declare properties: readonly (Property | SpreadElement)[]; |
| 31 | declare type: NodeType.tObjectExpression; |
| 32 | private objectEntity: ObjectEntity | null = null; |
| 33 | private protoProp: Property | null = null; |
| 34 | |
| 35 | deoptimizeArgumentsOnInteractionAtPath( |
| 36 | interaction: NodeInteraction, |
| 37 | path: ObjectPath, |
| 38 | recursionTracker: EntityPathTracker |
| 39 | ): void { |
| 40 | this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath( |
| 41 | interaction, |
| 42 | path, |
| 43 | recursionTracker |
| 44 | ); |
| 45 | } |
| 46 | |
| 47 | deoptimizeCache(): void { |
| 48 | this.getObjectEntity().deoptimizeAllProperties(); |
| 49 | } |
| 50 | |
| 51 | deoptimizePath(path: ObjectPath): void { |
| 52 | this.getObjectEntity().deoptimizePath(path); |
| 53 | } |
| 54 | |
| 55 | getLiteralValueAtPath( |
| 56 | path: ObjectPath, |
| 57 | recursionTracker: EntityPathTracker, |
| 58 | origin: DeoptimizableEntity |
| 59 | ): LiteralValueOrUnknown { |
| 60 | return this.getObjectEntity().getLiteralValueAtPath(path, recursionTracker, origin); |
| 61 | } |
| 62 | |
| 63 | getReturnExpressionWhenCalledAtPath( |
| 64 | path: ObjectPath, |
| 65 | interaction: NodeInteractionCalled, |
| 66 | recursionTracker: EntityPathTracker, |
| 67 | origin: DeoptimizableEntity |
| 68 | ): [expression: ExpressionEntity, isPure: boolean] { |
| 69 | return this.getObjectEntity().getReturnExpressionWhenCalledAtPath( |
| 70 | path, |
| 71 | interaction, |
| 72 | recursionTracker, |
| 73 | origin |
| 74 | ); |
| 75 | } |
| 76 | |
| 77 | hasEffectsOnInteractionAtPath( |
| 78 | path: ObjectPath, |
| 79 | interaction: NodeInteraction, |
| 80 | context: HasEffectsContext |
| 81 | ): boolean { |
| 82 | return this.getObjectEntity().hasEffectsOnInteractionAtPath(path, interaction, context); |
| 83 | } |
| 84 | |
| 85 | include(context: InclusionContext, includeChildrenRecursively: IncludeChildren) { |
| 86 | if (!this.included) this.includeNode(context); |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…