(a container)
| 507 | } |
| 508 | |
| 509 | func (bc *bitmapContainer) lazyIOR(a container) container { |
| 510 | switch x := a.(type) { |
| 511 | case *arrayContainer: |
| 512 | return bc.lazyIORArray(x) |
| 513 | case *bitmapContainer: |
| 514 | return bc.lazyIORBitmap(x) |
| 515 | case *runContainer16: |
| 516 | if x.isFull() { |
| 517 | return x.clone() |
| 518 | } |
| 519 | |
| 520 | // Manually inlined setBitmapRange function |
| 521 | bitmap := bc.bitmap |
| 522 | for _, iv := range x.iv { |
| 523 | start := int(iv.start) |
| 524 | end := int(iv.last()) + 1 |
| 525 | if start >= end { |
| 526 | continue |
| 527 | } |
| 528 | firstword := start / 64 |
| 529 | endword := (end - 1) / 64 |
| 530 | if firstword == endword { |
| 531 | bitmap[firstword] |= (^uint64(0) << uint(start%64)) & (^uint64(0) >> (uint(-end) % 64)) |
| 532 | continue |
| 533 | } |
| 534 | bitmap[firstword] |= ^uint64(0) << uint(start%64) |
| 535 | for i := firstword + 1; i < endword; i++ { |
| 536 | bitmap[i] = ^uint64(0) |
| 537 | } |
| 538 | bitmap[endword] |= ^uint64(0) >> (uint(-end) % 64) |
| 539 | } |
| 540 | bc.cardinality = invalidCardinality |
| 541 | return bc |
| 542 | } |
| 543 | panic("unsupported container type") |
| 544 | } |
| 545 | |
| 546 | func (bc *bitmapContainer) lazyOR(a container) container { |
| 547 | switch x := a.(type) { |
nothing calls this directly
no test coverage detected