We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f619c71 commit a48c4b1Copy full SHA for a48c4b1
zjit/src/hir.rs
@@ -1018,7 +1018,8 @@ impl Insn {
1018
Insn::StringCopy { .. } => Effect::from_write(effect_sets::Allocator),
1019
Insn::NewArray { .. } => Effect::from_write(effect_sets::Allocator),
1020
Insn::NewHash { elements, .. } => {
1021
- // Empty is elidable
+ // NewHash's operands may be hashed and compared for equality, which could have
1022
+ // side-effects. Empty hashes are definitely elidable.
1023
if elements.is_empty() {
1024
Effect::from_write(effect_sets::Allocator)
1025
}
0 commit comments