This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Binary format is out of date #16
Closed
Description
The decoder in this branch is out of date with the bulk-memory-operations branch.
In particular, for data segments:
This repo:
let segment dat s =
let index = at var s in
let offset = const s in
let init = dat s in
{index; offset; init}
Bulk memory:
let data s =
match vu32 s with
| 0x00l ->
let dmode = at active_zero s in
let dinit = string s in
{dinit; dmode}
| 0x01l ->
let dmode = at passive s in
let dinit = string s in
{dinit; dmode}
| 0x02l ->
let dmode = at active s in
let dinit = string s in
{dinit; dmode}
| _ -> error s (pos s - 1) "invalid data segment kind"
I.e. it appears this repo is interpreting the reserved 0 byte as i32
index, when it should be a flags bitfield, with bit 6 indicating the presence of a memory segment index.
Metadata
Metadata
Assignees
Labels
No labels