(offset, type)
| 407 | } |
| 408 | |
| 409 | function getHeapOffset(offset, type) { |
| 410 | const sz = getNativeTypeSize(type); |
| 411 | if (sz == 1) { |
| 412 | return offset; |
| 413 | } |
| 414 | if (MEMORY64 == 1) { |
| 415 | return `((${offset})/${sz})`; |
| 416 | } |
| 417 | const shifts = Math.log(sz) / Math.LN2; |
| 418 | if (CAN_ADDRESS_2GB) { |
| 419 | return `((${offset})>>>${shifts})`; |
| 420 | } |
| 421 | return `((${offset})>>${shifts})`; |
| 422 | } |
| 423 | |
| 424 | function ensureDot(value) { |
| 425 | value = value.toString(); |
no test coverage detected