Alien-LibJIT
view release on metacpan or search on metacpan
libjit/doc/mangling_rules.txt view on Meta::CPAN
<ctor-function> ::= '__' <class-name> <func-params>
<dtor-function> ::= '_' <joiner> '_' <class-name> <func-params>
<joiner> ::= '.' | '$' # system-dependent joiner
<class-name> ::= <qualified-name>
<qualified-name> ::= <component>
::= 'Q' <digit> <component>+
::= 'Q' '_' <digit>+ '_' <component>+
<component> ::= <digit>+ <identifier> # length-prefixed name
<overload-item> ::= 'R' <type> # reference
::= 'P' <type> # array or pointer type
::= 'O' <type> '_' <type> # offset type
::= 'M' <type> <modifiers> <function-type> # methods
::= <function-type>
::= <builtin-type>
::= <qualified-name>
<type> ::= <modifiers> <overload-item>
<function-type> ::= 'F' <func-params> '_' <return-type>
<func-params> ::= 'e' # () parameters
::= 'v' # (void) parameters
::= <parameter>+
::= <parameter>+ 'e' # ends in "..."
<return-type> ::= <type>
<modifiers> ::= [C] [U] [V] [u] # const, unsigned, volatile, restrict
<builtin-type> ::= 'i' # int
::= 'l' # long
::= 's' # short
::= 'Sc' # signed char
::= 'c' # char
::= 'w' # wchar/java-char
::= 'x' # long long
::= 'b' # bool
::= 'r' # long double
::= 'd' # double
::= 'f' # float
::= 'J' <type> # complex <type>
::= 'v' # void
::= 'I' <bit-size> # integer of <bit-size> bits
<bit-size> ::= <hex> <hex> # sizes < 256
::= _ <hex>+ _ # sizes >= 256
<parameter> ::= <type>
::= <repeat-count> <backref>
<repeat-count> ::= 'T' # single repeat
::= 'N' <digit> # repeats of 2..9
::= 'N' <number> '_' # repeats of 10 or more
::= 'n' <digit> # alt-style, repeats of 1..9
::= 'n' <number> '_' # alt-style, repeats of 10+
<backref> ::= <digit> # backrefs 0..9
::= <number> '_' # backrefs of 10 or more
GCC 3.2 name mangling grammar (extracted from gcc sources):
----------------------------------------------------------
<substitution> ::= St
# ::std
::= Sa
# ::std::allocator
::= Sb
# ::std::basic_string
::= Ss
# ::std::basic_string<char,
::std::char_traits<char>,
::std::allocator<char> >
::= Si
# ::std::basic_istream<char, ::std::char_traits<char> >
::= So
# ::std::basic_ostream<char, ::std::char_traits<char> >
::= Sd
# ::std::basic_iostream<char, ::std::char_traits<char> >
::= S <seq-id> _ # base 36 sequence id
::= S_
<mangled-name> ::= _Z <encoding>
<encoding> ::= <function name> <bare-function-type>
::= <data name>
<name> ::= <unscoped-name>
::= <unscoped-template-name> <template-args>
::= <nested-name>
::= <local-name>
If IGNORE_LOCAL_SCOPE option to <name> is non-zero, this production of
<name> is called from <local-name>, which mangles the enclosing scope
elsewhere and then uses this function to mangle just the part
underneath the function scope. So don't use the <local-name>
production, to avoid an infinite recursion.
<unscoped-name> ::= <unqualified-name>
::= St <unqualified-name> # ::std::
<unscoped-template-name> ::= <unscoped-name>
::= <substitution>
<nested-name> ::= N [<CV-qualifiers>] <prefix> <unqualified-name> E
::= N [<CV-qualifiers>] <template-prefix> <template-args> E
<CV-qualifiers> ::= [r] [V] [K]
( run in 0.764 second using v1.01-cache-2.11-cpan-e93a5daba3e )