| 91 | |
| 92 | |
| 93 | HeapCollection* HeapArray::getMutable(uint32_t index, tags ifType) { |
| 94 | if (index >= count()) |
| 95 | return nullptr; |
| 96 | Retained<HeapCollection> result = nullptr; |
| 97 | auto &mval = _items[index]; |
| 98 | if (mval) { |
| 99 | result = mval.makeMutable(ifType); |
| 100 | } else if (_source) { |
| 101 | result = HeapCollection::mutableCopy(_source->get(index), ifType); |
| 102 | if (result) |
| 103 | _items[index].set(result->asValue()); |
| 104 | } |
| 105 | if (result) |
| 106 | setChanged(true); |
| 107 | return result; |
| 108 | } |
| 109 | |
| 110 | MutableArray* HeapArray::getMutableArray(uint32_t i) { |
| 111 | return (MutableArray*)asValue(getMutable(i, internal::kArrayTag)); |
nothing calls this directly
no test coverage detected