MCPcopy
hub / github.com/rollup/rollup / deoptimizePath

Method deoptimizePath

src/ast/variables/ParameterVariable.ts:236–261  ·  view source on GitHub ↗
(path: ObjectPath)

Source from the content-addressed store, hash-verified

234 }
235
236 deoptimizePath(path: ObjectPath): void {
237 if (path.length === 0) {
238 this.markReassigned();
239 return;
240 }
241 if (this.deoptimizedFields.has(UnknownKey)) {
242 return;
243 }
244 const key = path[0];
245 if (this.deoptimizedFields.has(key)) {
246 return;
247 }
248 this.deoptimizedFields.add(key);
249 for (const entity of this.argumentsToBeDeoptimized) {
250 // We do not need a recursion tracker here as we already track whether
251 // this field is deoptimized
252 entity.deoptimizePath([...this.initPath, key]);
253 }
254 if (key === UnknownKey) {
255 // save some memory
256 this.deoptimizationInteractions = NO_INTERACTIONS;
257 this.deoptimizations = EMPTY_PATH_TRACKER;
258 this.deoptimizedFields = UNKNOWN_DEOPTIMIZED_FIELD;
259 this.argumentsToBeDeoptimized = UNKNOWN_DEOPTIMIZED_ENTITY;
260 }
261 }
262
263 getReturnExpressionWhenCalledAtPath(
264 path: ObjectPath

Calls 4

markReassignedMethod · 0.95
addMethod · 0.80
hasMethod · 0.65
deoptimizePathMethod · 0.65

Tested by

no test coverage detected