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

Method to_bytes

winch/codegen/src/masm.rs:1220–1228  ·  view source on GitHub ↗

Get a little endian representation of the immediate. This method heap allocates and is intended to be used when adding values to the constant pool.

(&self)

Source from the content-addressed store, hash-verified

1218 /// This method heap allocates and is intended to be used when adding
1219 /// values to the constant pool.
1220 pub fn to_bytes(&self) -> Vec<u8> {
1221 match self {
1222 Imm::I32(n) => n.to_le_bytes().to_vec(),
1223 Imm::I64(n) => n.to_le_bytes().to_vec(),
1224 Imm::F32(n) => n.to_le_bytes().to_vec(),
1225 Imm::F64(n) => n.to_le_bytes().to_vec(),
1226 Imm::V128(n) => n.to_le_bytes().to_vec(),
1227 }
1228 }
1229}
1230
1231/// The location of the [VMcontext] used for function calls.

Callers 10

splatMethod · 0.45
replace_laneMethod · 0.45
load_constantMethod · 0.45
mov_irMethod · 0.45
send_request_withMethod · 0.45
execute_oneFunction · 0.45
gen_moduleFunction · 0.45
execute_oneFunction · 0.45
run_oneFunction · 0.45
gen_moduleFunction · 0.45

Calls 1

to_vecMethod · 0.45

Tested by 1

send_request_withMethod · 0.36