mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Wasm: Convert remaining sections to store bytes, and add .size() methods
This commit is contained in:
parent
f4ac5bffa3
commit
5d5e0eca96
5 changed files with 154 additions and 54 deletions
|
@ -476,6 +476,10 @@ impl<'a> CodeBuilder<'a> {
|
|||
|
||||
***********************************************************/
|
||||
|
||||
pub fn size(&self) -> usize {
|
||||
self.inner_length.len() + self.preamble.len() + self.code.len() + self.insert_bytes.len()
|
||||
}
|
||||
|
||||
/// Serialize all byte vectors in the right order
|
||||
/// Also update relocation offsets relative to the base offset (code section body start)
|
||||
pub fn serialize_without_relocs<T: SerialBuffer>(&self, buffer: &mut T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue