MCPcopy Index your code
hub / github.com/RustPython/RustPython / _name_inner

Method _name_inner

crates/codegen/src/compile.rs:1704–1715  ·  view source on GitHub ↗
(
        &mut self,
        name: &str,
        cache: impl FnOnce(&mut ir::CodeInfo) -> &mut IndexSet<String>,
    )

Source from the content-addressed store, hash-verified

1702 }
1703
1704 fn _name_inner(
1705 &mut self,
1706 name: &str,
1707 cache: impl FnOnce(&mut ir::CodeInfo) -> &mut IndexSet<String>,
1708 ) -> u32 {
1709 let name = self.mangle(name);
1710 let cache = cache(self.current_code_info());
1711 cache
1712 .get_index_of(name.as_ref())
1713 .unwrap_or_else(|| cache.insert_full(name.into_owned()).0)
1714 .to_u32()
1715 }
1716
1717 /// Set the qualified name for the current code object
1718 // = compiler_set_qualname

Callers 2

nameMethod · 0.80
varnameMethod · 0.80

Calls 6

cacheFunction · 0.85
mangleMethod · 0.80
current_code_infoMethod · 0.80
into_ownedMethod · 0.80
to_u32Method · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected