()
| 75 | } |
| 76 | |
| 77 | deoptimizeCache(): void { |
| 78 | if (this.hasDeoptimizedCache) return; |
| 79 | this.hasDeoptimizedCache = true; |
| 80 | if (this.usedBranch) { |
| 81 | const unusedBranch = this.usedBranch === this.left ? this.right : this.left; |
| 82 | this.usedBranch = null; |
| 83 | unusedBranch.deoptimizePath(UNKNOWN_PATH); |
| 84 | if (this.included) { |
| 85 | // As we are not tracking inclusions, we just include everything |
| 86 | unusedBranch.includePath(UNKNOWN_PATH, createInclusionContext()); |
| 87 | } |
| 88 | } |
| 89 | const { |
| 90 | scope: { context }, |
| 91 | expressionsToBeDeoptimized |
| 92 | } = this; |
| 93 | this.expressionsToBeDeoptimized = EMPTY_ARRAY as unknown as DeoptimizableEntity[]; |
| 94 | for (const expression of expressionsToBeDeoptimized) { |
| 95 | expression.deoptimizeCache(); |
| 96 | } |
| 97 | // Request another pass because we need to ensure "include" runs again if |
| 98 | // it is rendered |
| 99 | context.requestTreeshakingPass(); |
| 100 | } |
| 101 | |
| 102 | deoptimizePath(path: ObjectPath): void { |
| 103 | const usedBranch = this.getUsedBranch(); |
nothing calls this directly
no test coverage detected