MCPcopy
hub / github.com/rollup/rollup / deoptimizeAllProperties

Method deoptimizeAllProperties

src/ast/nodes/shared/ObjectEntity.ts:98–119  ·  view source on GitHub ↗
(noAccessors?: boolean)

Source from the content-addressed store, hash-verified

96 }
97
98 deoptimizeAllProperties(noAccessors?: boolean): void {
99 const isDeoptimized = this.hasLostTrack || this.hasUnknownDeoptimizedProperty;
100 if (noAccessors) {
101 this.hasUnknownDeoptimizedProperty = true;
102 } else {
103 this.hasLostTrack = true;
104 }
105 if (isDeoptimized) {
106 return;
107 }
108 for (const properties of [
109 ...this.propertiesAndGettersByKey.values(),
110 ...this.settersByKey.values()
111 ]) {
112 for (const property of properties) {
113 property.deoptimizePath(UNKNOWN_PATH);
114 }
115 }
116 // While the prototype itself cannot be mutated, each property can
117 this.prototypeExpression?.deoptimizePath([UnknownKey, UnknownKey]);
118 this.deoptimizeCachedEntities();
119 }
120
121 deoptimizeArgumentsOnInteractionAtPath(
122 interaction: NodeInteraction,

Callers 3

deoptimizePathMethod · 0.95
deoptimizeCacheMethod · 0.80
deoptimizeCacheMethod · 0.80

Calls 2

deoptimizePathMethod · 0.65

Tested by

no test coverage detected