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

Method deoptimizePath

src/ast/variables/NamespaceVariable.ts:57–69  ·  view source on GitHub ↗
(path: ObjectPath)

Source from the content-addressed store, hash-verified

55 }
56
57 deoptimizePath(path: ObjectPath) {
58 if (path.length > 1) {
59 const key = path[0];
60 if (typeof key === 'string') {
61 this.module.getExportedVariablesByName().get(key)?.deoptimizePath(path.slice(1));
62 } else if (!this.areAllMembersDeoptimized) {
63 this.areAllMembersDeoptimized = true;
64 for (const variable of this.module.getExportedVariablesByName().values()) {
65 variable.deoptimizePath(UNKNOWN_PATH);
66 }
67 }
68 }
69 }
70
71 getLiteralValueAtPath(path: ObjectPath): LiteralValueOrUnknown {
72 if (path[0] === SymbolToStringTag) {

Callers

nothing calls this directly

Calls 3

getMethod · 0.80
deoptimizePathMethod · 0.65

Tested by

no test coverage detected