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

Function make_test_table

crates/environ/src/module_artifacts.rs:692–720  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

690 }
691
692 fn make_test_table() -> CompiledFunctionsTable {
693 let mut builder = CompiledFunctionsTableBuilder::new();
694
695 builder
696 // ========= Dense =========
697 .push_func(def_func_key(0, 0), func_loc(0..10), FilePos::new(111))
698 .push_func(def_func_key(0, 1), func_loc(10..20), FilePos::new(222))
699 .push_func(def_func_key(0, 2), func_loc(20..30), FilePos::none())
700 // Gap in dense keys!
701 .push_func(def_func_key(0, 5), func_loc(30..40), FilePos::new(333))
702 // ========= Sparse =========
703 .push_func(
704 array_to_wasm_tramp_key(0, 1),
705 func_loc(100..110),
706 FilePos::none(),
707 )
708 .push_func(
709 array_to_wasm_tramp_key(0, 2),
710 func_loc(110..120),
711 FilePos::none(),
712 )
713 .push_func(
714 array_to_wasm_tramp_key(0, 5),
715 func_loc(120..130),
716 FilePos::none(),
717 );
718
719 builder.finish()
720 }
721
722 #[test]
723 fn src_locs() {

Callers 3

src_locsFunction · 0.85
func_locsFunction · 0.85
reverse_func_locsFunction · 0.85

Calls 6

def_func_keyFunction · 0.85
func_locFunction · 0.85
array_to_wasm_tramp_keyFunction · 0.85
push_funcMethod · 0.80
newFunction · 0.50
finishMethod · 0.45

Tested by 3

src_locsFunction · 0.68
func_locsFunction · 0.68
reverse_func_locsFunction · 0.68