(initialCap: number)
| 564 | } |
| 565 | |
| 566 | private allocObject(initialCap: number): number { |
| 567 | const capacity = Math.max(4, initialCap); |
| 568 | const byteSize = 12 + capacity * 12; |
| 569 | const ptr = this.alloc(byteSize); |
| 570 | const idx = ptr >> 2; |
| 571 | this.u32[idx] = TYPE_OBJECT; |
| 572 | this.u32[idx + 1] = capacity; |
| 573 | this.u32[idx + 2] = 0; |
| 574 | return ptr; |
| 575 | } |
| 576 | |
| 577 | private allocArray(initialCap: number): number { |
| 578 | const capacity = Math.max(4, initialCap); |
no test coverage detected