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

Method set_entry

cranelift/frontend/src/switch.rs:55–58  ·  view source on GitHub ↗

Set a switch entry

(&mut self, index: EntryIndex, block: Block)

Source from the content-addressed store, hash-verified

53
54 /// Set a switch entry
55 pub fn set_entry(&mut self, index: EntryIndex, block: Block) {
56 let prev = self.cases.insert(index, block);
57 assert!(prev.is_none(), "Tried to set the same entry {index} twice");
58 }
59
60 /// Get a reference to all existing entries
61 pub fn entries(&self) -> &HashMap<EntryIndex, Block> {

Callers 7

do_caseFunction · 0.45
switch_64bitFunction · 0.45
switch_128bitFunction · 0.45
switch_128bit_max_u64Function · 0.45
insert_terminatorMethod · 0.45
switch_errorFunction · 0.45
switch_errorFunction · 0.45

Calls 1

insertMethod · 0.45

Tested by 5

switch_64bitFunction · 0.36
switch_128bitFunction · 0.36
switch_128bit_max_u64Function · 0.36
switch_errorFunction · 0.36
switch_errorFunction · 0.36