MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / append_padding

Method append_padding

crates/cranelift/src/obj.rs:208–214  ·  view source on GitHub ↗

Appends the specified amount of bytes of padding into the text section. This is only useful when fuzzing and/or debugging cranelift itself and for production scenarios `padding` is 0 and this function does nothing.

(&mut self, padding: usize)

Source from the content-addressed store, hash-verified

206 /// This is only useful when fuzzing and/or debugging cranelift itself and
207 /// for production scenarios `padding` is 0 and this function does nothing.
208 pub fn append_padding(&mut self, padding: usize) {
209 if padding == 0 {
210 return;
211 }
212 self.text
213 .append(false, &vec![0; padding], 1, &mut self.ctrl_plane);
214 }
215
216 /// Indicates that the text section has been written completely and this
217 /// will finish appending it to the original object.

Callers 1

append_codeMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected