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

Method mangle

crates/codegen/src/compile.rs:2004–2012  ·  view source on GitHub ↗
(&self, name: &'a str)

Source from the content-addressed store, hash-verified

2002 }
2003
2004 fn mangle<'a>(&self, name: &'a str) -> Cow<'a, str> {
2005 // Use private from current code unit for name mangling
2006 let private = self
2007 .code_stack
2008 .last()
2009 .and_then(|info| info.private.as_deref());
2010 let mangled_names = self.current_symbol_table().mangled_names.as_ref();
2011 symboltable::maybe_mangle_name(private, mangled_names, name)
2012 }
2013
2014 fn module_name_declared_global_in_nested_scope(table: &SymbolTable, name: &str) -> bool {
2015 table.sub_tables.iter().any(|subtable| {

Callers 8

_name_innerMethod · 0.80
make_qualnameMethod · 0.80
compile_nameMethod · 0.80
compile_expressionMethod · 0.80

Calls 4

maybe_mangle_nameFunction · 0.85
current_symbol_tableMethod · 0.80
lastMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected