opcodes and wip

This commit is contained in:
NikVolf
2017-03-31 03:28:03 +03:00
parent 9e3823c3f2
commit f202703106
4 changed files with 223 additions and 1 deletions

View File

@ -26,6 +26,7 @@ pub enum Section {
Table(TableSection),
Memory(MemorySection),
Export(ExportSection),
Start(u32),
}
impl Deserialize for Section {
@ -61,6 +62,10 @@ impl Deserialize for Section {
7 => {
Section::Export(ExportSection::deserialize(reader)?)
},
8 => {
let _section_length = VarUint32::deserialize(reader)?;
Section::Start(VarUint32::deserialize(reader)?.into())
},
_ => {
Section::Unparsed { id: id.into(), payload: Unparsed::deserialize(reader)?.into() }
}