mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
function section
This commit is contained in:
parent
eb9705e2e9
commit
e05ef73f6c
2 changed files with 9 additions and 1 deletions
|
@ -270,7 +270,9 @@ impl<'a> FunctionSection<'a> {
|
|||
|
||||
impl<'a> Serialize for FunctionSection<'a> {
|
||||
fn serialize<T: SerialBuffer>(&self, buffer: &mut T) {
|
||||
todo!();
|
||||
let header_indices = write_section_header(buffer, SectionId::Function);
|
||||
serialize_vector_with_count(buffer, &self.signature_indices);
|
||||
update_section_size(buffer, header_indices);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -114,6 +114,12 @@ impl Serialize for str {
|
|||
}
|
||||
}
|
||||
|
||||
impl Serialize for u32 {
|
||||
fn serialize<T: SerialBuffer>(&self, buffer: &mut T) {
|
||||
buffer.encode_u32(*self);
|
||||
}
|
||||
}
|
||||
|
||||
fn overwrite_padded_u32_help(buffer: &mut [u8], value: u32) {
|
||||
let mut x = value;
|
||||
for byte in buffer.iter_mut().take(4) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue