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

Method add_sig

cranelift/reader/src/parser.rs:349–362  ·  view source on GitHub ↗

Allocate a new signature.

(
        &mut self,
        sig: SigRef,
        data: Signature,
        loc: Location,
        defaultcc: CallConv,
    )

Source from the content-addressed store, hash-verified

347
348 // Allocate a new signature.
349 fn add_sig(
350 &mut self,
351 sig: SigRef,
352 data: Signature,
353 loc: Location,
354 defaultcc: CallConv,
355 ) -> ParseResult<()> {
356 self.map.def_sig(sig, loc)?;
357 while self.function.dfg.signatures.next_key().index() <= sig.index() {
358 self.function.import_signature(Signature::new(defaultcc));
359 }
360 self.function.dfg.signatures[sig] = data;
361 Ok(())
362 }
363
364 // Resolve a reference to a signature.
365 fn check_sig(&self, sig: SigRef, loc: Location) -> ParseResult<()> {

Callers 1

parse_preambleMethod · 0.80

Calls 6

OkFunction · 0.85
def_sigMethod · 0.80
newFunction · 0.50
indexMethod · 0.45
next_keyMethod · 0.45
import_signatureMethod · 0.45

Tested by

no test coverage detected