diff --git a/src/vm/bin.rs b/src/vm/bin.rs index 1e01b21..fc28b7d 100644 --- a/src/vm/bin.rs +++ b/src/vm/bin.rs @@ -10,7 +10,7 @@ use std::{ pub const MAGIC: u64 = 0xDEAD_BEA7_BA5E_BA11; #[derive(Debug)] -pub struct Bin { +pub struct Object { header: Header, sections: Vec>, } @@ -108,15 +108,15 @@ impl Section for MetaSection { } #[derive(Debug, Clone)] -pub struct BinParser { +pub struct ObjectParser { bytes: Cursor>, } -impl BinParser { - pub fn parse(&mut self) -> Result { +impl ObjectParser { + pub fn parse(&mut self) -> Result { let header = self.parse_header()?; let sections = self.parse_sections()?; - Ok(Bin { header, sections }) + Ok(Object { header, sections }) } fn parse_header(&mut self) -> Result
{ diff --git a/vm.md b/vm.md index f33ea75..6328586 100644 --- a/vm.md +++ b/vm.md @@ -195,9 +195,10 @@ wrapping around to 0. * Pop * More immediate stores? -# Binary format +# Binary object format -The binary format is composed of a header followed by sections that make up the content of the blob. +The binary object format is composed of a header followed by sections that make up the content of +the object. ## Header @@ -213,7 +214,7 @@ Total length: 128 bits ## Sections -The rest of the content is a list of sections. A section's layout is a section header, followed by +The rest of the object is a list of sections. A section's layout is a section header, followed by the section contents. ### Section header