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

Method expand

cranelift/codegen/src/ir/sourceloc.rs:75–81  ·  view source on GitHub ↗

Expands the relative source location into an absolute one, using the given base.

(&self, base: SourceLoc)

Source from the content-addressed store, hash-verified

73
74 /// Expands the relative source location into an absolute one, using the given base.
75 pub fn expand(&self, base: SourceLoc) -> SourceLoc {
76 if self.is_default() || base.is_default() {
77 Default::default()
78 } else {
79 SourceLoc::new(self.0.wrapping_add(base.bits()))
80 }
81 }
82
83 /// Is this the default relative source location?
84 pub fn is_default(self) -> bool {

Callers 15

current_blockMethod · 0.45
use_var_nonlocalMethod · 0.45
find_varMethod · 0.45
getMethod · 0.45
get_or_lessMethod · 0.45
retainMethod · 0.45
verifyMethod · 0.45
tpathMethod · 0.45
prevMethod · 0.45
gotoMethod · 0.45
try_insertMethod · 0.45
containsMethod · 0.45

Calls 3

newFunction · 0.50
is_defaultMethod · 0.45
bitsMethod · 0.45

Tested by

no test coverage detected