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

Method start_srcloc

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

Set the `SourceLoc` for code from this offset until the offset at the next call to `end_srcloc()`. Returns the current [CodeOffset] and [RelSourceLoc].

(&mut self, loc: RelSourceLoc)

Source from the content-addressed store, hash-verified

1793 /// next call to `end_srcloc()`.
1794 /// Returns the current [CodeOffset] and [RelSourceLoc].
1795 pub fn start_srcloc(&mut self, loc: RelSourceLoc) -> (CodeOffset, RelSourceLoc) {
1796 let cur = (self.cur_offset(), loc);
1797 self.cur_srcloc = Some(cur);
1798 cur
1799 }
1800
1801 /// Mark the end of the `SourceLoc` segment started at the last
1802 /// `start_srcloc()` call.

Callers 4

emitMethod · 0.80
start_source_locMethod · 0.80
start_source_locMethod · 0.80

Calls 1

cur_offsetMethod · 0.80

Tested by

no test coverage detected