(items []sparseArrayItem, newMaxIdx int)
| 550 | } |
| 551 | |
| 552 | func (a *arrayObject) setValuesFromSparse(items []sparseArrayItem, newMaxIdx int) { |
| 553 | a.values = make([]Value, newMaxIdx+1) |
| 554 | for _, item := range items { |
| 555 | a.values[item.idx] = item.value |
| 556 | } |
| 557 | a.objCount = len(items) |
| 558 | } |
| 559 | |
| 560 | func toIdx(v valueInt) uint32 { |
| 561 | if v >= 0 && v < math.MaxUint32 { |