(exps, b)
| 84 | return h; |
| 85 | } |
| 86 | function encodeBool(exps, b) { |
| 87 | const buf = exps.wasm_alloc(1); |
| 88 | new Uint8Array(exps.memory.buffer, buf, 1)[0] = b ? 1 : 0; |
| 89 | const h = exps.host_edge_encode(TAG_BOOL, buf, 1); |
| 90 | exps.wasm_free(buf, 1); |
| 91 | return h; |
| 92 | } |
| 93 | function encodeFloat(exps, f) { |
| 94 | const buf = exps.wasm_alloc(8); |
| 95 | new DataView(exps.memory.buffer).setFloat64(buf, f, true); |