| 478 | } |
| 479 | |
| 480 | void WriteMap::coalesceOver(OperationStack& stack, RYWMutation newEntry, Arena& arena) { |
| 481 | RYWMutation existingEntry = stack.top(); |
| 482 | if (existingEntry.type == newEntry.type && newEntry.type != MutationRef::CompareAndClear) { |
| 483 | if (isNonAssociativeOp(existingEntry.type) && existingEntry.value.present() && |
| 484 | existingEntry.value.get().size() != newEntry.value.get().size()) { |
| 485 | stack.push(newEntry); |
| 486 | } else { |
| 487 | stack.poppush(coalesce(existingEntry, newEntry, arena)); |
| 488 | } |
| 489 | } else { |
| 490 | if (isAtomicOp(newEntry.type) && isAtomicOp(existingEntry.type)) { |
| 491 | stack.push(newEntry); |
| 492 | } else { |
| 493 | stack.poppush(coalesce(existingEntry, newEntry, arena)); |
| 494 | } |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | RYWMutation WriteMap::coalesceUnder(OperationStack const& stack, Optional<ValueRef> const& value, Arena& arena) { |
| 499 | if (!stack.isDependent() && stack.size() == 1) |
nothing calls this directly
no test coverage detected