(ownerID, nodes, bitmap, including, node)
| 810 | } |
| 811 | |
| 812 | function expandNodes(ownerID, nodes, bitmap, including, node) { |
| 813 | let count = 0; |
| 814 | const expandedNodes = new Array(SIZE); |
| 815 | for (let ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { |
| 816 | expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; |
| 817 | } |
| 818 | expandedNodes[including] = node; |
| 819 | return new HashArrayMapNode(ownerID, count + 1, expandedNodes); |
| 820 | } |
| 821 | |
| 822 | function popCount(x) { |
| 823 | x -= (x >> 1) & 0x55555555; |