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

Method with_trap_code

cranelift/codegen/src/ir/memflags.rs:376–379  ·  view source on GitHub ↗

Configures these flags with the specified trap code `code`. A trap code indicates that this memory operation cannot be optimized away and it must "stay where it is" in the programs. Traps are considered side effects, for example, and have meaning through the trap code that is communicated and which instruction trapped.

(mut self, code: Option<TrapCode>)

Source from the content-addressed store, hash-verified

374 /// considered side effects, for example, and have meaning through the trap
375 /// code that is communicated and which instruction trapped.
376 pub const fn with_trap_code(mut self, code: Option<TrapCode>) -> Self {
377 self.flags = self.flags.with_trap_code(code);
378 self
379 }
380}
381
382impl From<MemFlagsData> for MachMemFlags {

Callers 7

set_by_nameMethod · 0.45
with_notrapMethod · 0.45
roundtrip_trapsFunction · 0.45
load_code_and_vmctxMethod · 0.45
gc_memflagsMethod · 0.45
prepare_table_addrMethod · 0.45

Calls

no outgoing calls

Tested by 1

roundtrip_trapsFunction · 0.36