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

Method apply_base_srcloc

cranelift/codegen/src/machinst/buffer.rs:367–388  ·  view source on GitHub ↗

Get a finalized machine buffer by applying the function's base source location.

(self, base_srcloc: SourceLoc)

Source from the content-addressed store, hash-verified

365impl MachBufferFinalized<Stencil> {
366 /// Get a finalized machine buffer by applying the function's base source location.
367 pub fn apply_base_srcloc(self, base_srcloc: SourceLoc) -> MachBufferFinalized<Final> {
368 MachBufferFinalized {
369 data: self.data,
370 relocs: self.relocs,
371 traps: self.traps,
372 call_sites: self.call_sites,
373 patchable_call_sites: self.patchable_call_sites,
374 exception_handlers: self.exception_handlers,
375 srclocs: self
376 .srclocs
377 .into_iter()
378 .map(|srcloc| srcloc.apply_base_srcloc(base_srcloc))
379 .collect(),
380 debug_tags: self.debug_tags,
381 debug_tag_pool: self.debug_tag_pool,
382 user_stack_maps: self.user_stack_maps,
383 unwind_info: self.unwind_info,
384 alignment: self.alignment,
385 frame_layout: self.frame_layout,
386 nop_units: self.nop_units,
387 }
388 }
389}
390
391/// A `MachBuffer` once emission is completed: holds generated code and records,

Callers 3

apply_paramsMethod · 0.80
finalizeMethod · 0.80
finalizeMethod · 0.80

Calls 4

collectMethod · 0.80
mapMethod · 0.45
into_iterMethod · 0.45
expandMethod · 0.45

Tested by

no test coverage detected