The delete operator needs the Reference produced by an optional chain when the chain ends in a property access. We evaluated the chain for side effects and returned true, so delete object?.property reported success without removing the property. Emit delete-specific optional-chain bytecode. It short-circuits to true for nullish optional hops, but performs DeleteById or DeleteByValue when the final property reference is reached. Add runtime coverage for named, computed, and short-circuited optional deletes. |
||
|---|---|---|
| .. | ||
| AST | ||
| Bytecode | ||
| Runtime | ||
| CMakeLists.txt | ||
| test-bytecode-cache.cpp | ||
| test-js-ast.py | ||
| test-js-bytecode.py | ||
| test-js.cpp | ||
| test-primitive-string.cpp | ||
| test-value-js.cpp | ||