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

Method map_exception_table

cranelift/codegen/src/inline.rs:952–978  ·  view source on GitHub ↗
(&mut self, exception_table: ir::ExceptionTable)

Source from the content-addressed store, hash-verified

950 }
951
952 fn map_exception_table(&mut self, exception_table: ir::ExceptionTable) -> ir::ExceptionTable {
953 let exception_table = &self.callee.dfg.exception_tables[exception_table];
954 let inlined_sig_ref = self.map_sig_ref(exception_table.signature());
955 let inlined_normal_return = self.map_block_call(*exception_table.normal_return());
956 let inlined_table = exception_table
957 .items()
958 .map(|item| match item {
959 ExceptionTableItem::Tag(tag, block_call) => {
960 ExceptionTableItem::Tag(tag, self.map_block_call(block_call))
961 }
962 ExceptionTableItem::Default(block_call) => {
963 ExceptionTableItem::Default(self.map_block_call(block_call))
964 }
965 ExceptionTableItem::Context(value) => {
966 ExceptionTableItem::Context(self.map_value(value))
967 }
968 })
969 .collect::<SmallVec<[_; 8]>>();
970 self.func
971 .dfg
972 .exception_tables
973 .push(ir::ExceptionTableData::new(
974 inlined_sig_ref,
975 inlined_normal_return,
976 inlined_table,
977 ))
978 }
979
980 fn map_block_call(&mut self, block_call: ir::BlockCall) -> ir::BlockCall {
981 let callee_block = block_call.block(&self.callee.dfg.value_lists);

Callers

nothing calls this directly

Calls 11

normal_returnMethod · 0.80
itemsMethod · 0.80
ContextClass · 0.70
TagClass · 0.50
newFunction · 0.50
map_sig_refMethod · 0.45
signatureMethod · 0.45
map_block_callMethod · 0.45
mapMethod · 0.45
map_valueMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected