|
sammine-lang
|
#include <MonomorphizedName.h>

Public Member Functions | |
| std::string | instance_key () const |
| Typeclass instance lookup key: "Add<i32>". | |
| std::string | mangled () const |
| QualifiedName | to_qualified_name () const |
Static Public Member Functions | |
| static MonomorphizedName | generic (QualifiedName base, std::string type_args) |
| Generic function/enum: identity<i32>, Option<i32>. | |
| static MonomorphizedName | typeclass (std::string class_name, std::string concrete_type_str, std::string method_name) |
| Typeclass instance method: Add<i32>::add. | |
Public Attributes | |
| QualifiedName | base |
| std::string | type_args |
| std::string | method_name |
Encapsulates the naming of monomorphized generics and typeclass instances. Separates monomorphization naming from QualifiedName (which handles scope resolution). After scope generation, all compiler-generated names should go through this class — never QualifiedName::local().
Mangling formats: generic: "math::identity<i32>" (base.mangled() + type_args) typeclass: "Add<i32>::add" (base.mangled() + type_args + :: + method)
|
inline |
Full mangled string for lookups and codegen symbol names. generic: "math::identity<i32>" typeclass: "Add<i32>::add"
|
inline |
Produce a QualifiedName suitable for prototype functionName / codegen. generic: qualified("math", "identity<i32>") — module preserved typeclass: local("Add<i32>::add") — single part for mangleName() compat