MCPcopy
hub / github.com/rollup/rollup / deoptimizeCache

Method deoptimizeCache

src/ast/nodes/ConditionalExpression.ts:56–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 }
55
56 deoptimizeCache(): void {
57 if (this.hasDeoptimizedCache) return;
58 this.hasDeoptimizedCache = true;
59 if (this.usedBranch !== null) {
60 const unusedBranch = this.usedBranch === this.consequent ? this.alternate : this.consequent;
61 this.usedBranch = null;
62 unusedBranch.deoptimizePath(UNKNOWN_PATH);
63 if (this.included) {
64 unusedBranch.includePath(UNKNOWN_PATH, createInclusionContext());
65 }
66 const { expressionsToBeDeoptimized } = this;
67 this.expressionsToBeDeoptimized = EMPTY_ARRAY as unknown as DeoptimizableEntity[];
68 for (const expression of expressionsToBeDeoptimized) {
69 expression.deoptimizeCache();
70 }
71 }
72 }
73
74 deoptimizePath(path: ObjectPath): void {
75 const usedBranch = this.getUsedBranch();

Callers

nothing calls this directly

Calls 4

createInclusionContextFunction · 0.90
deoptimizePathMethod · 0.65
includePathMethod · 0.65
deoptimizeCacheMethod · 0.65

Tested by

no test coverage detected