• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            歲月流轉(zhuǎn),往昔空明

            C++博客 首頁(yè) 新隨筆 聯(lián)系 聚合 管理
              118 Posts :: 3 Stories :: 413 Comments :: 0 Trackbacks

            Syntax of SASL Symbol Name Mangling

            September 26

            2010

            This script describes the rules of symbol name mangling.

            V1.0

            SASL Name Mangling Syntax

            V1.0

            Name mangling can be applied to name of function mainly, for distinguishing the overloaded function

            MangledName is the result of Name Mangling. It starts with ‘M’ character and ends with ‘Z’ character.

            MangledName ::= ‘M’ QualifiedName ‘@@’ ParameterTypes CallingConvention

            QualifiedName is base name qualified by scope name. A scope name could be a structure name, class name or namespace name.

            ParameterTypes describes the types of parameter list.

            ‘@@’ is the splitter between qualified name and parameter type.

            QualifiedName ::= ( ScopeName ‘@’ )* BaseName

            QualifiedName is composited by scope name and base name. ‘@’ is used to split the scope segments.

            ScopeName ::=

            ‘S’ StructTypeName

            ‘N’ NamespaceName

            StructTypeName ::= <name of structure>

            NamespaceName ::= <name of namespace>

            BaseName ::= <literal name of function>

            ScopeName are two sorts, structure name or namespace name. Sorts are distinguished by a lead character. If the name starts with ‘S’ it means the name of structure, and ‘N’ means following name represents a namespace. Note that, if

            BaseName is the literal name of the function or a type.

            ParameterTypes is a list of parameter types. Because SASL do not support variance parameters, so we need not to considerate that. Syntax of ParameterTypes as following:

            ParameterTypes ::= ( ParameterType ‘@@’)*

            ParameterType is encoded by type qualifiers and type name.

            NOTE THAT, anywhere type name referred means that the original definition name but not alias( such as generated by “typedef” ).

            ParameterType ::= ScopeQualifiedTypeName

            ScopeQualifiedTypeName is the type name qualified by scopes. It is similar with qualified name.

            ScopeQualifiedTypeName ::= ( ScopeName ‘@’ )* BaseTypeName

            ScopeName ::= ( ‘S’ StructTypeName ) | ( ‘N’ NamespaceName )

            QualifiedBaseTypeName ::= TypeQualifier BaseTypeName

            TypeQualifier ::= (‘C’)?(‘S’)?(‘U’)?Q

            TypeQualifier describes the qualifier of declaration. In SASL, following qualifiers are supported: constant qualifier (‘C’), uniform qualifier (‘U’) and shared qualifier (‘S’). Each qualifier is represented as a character, and qualifiers is ended by a character ‘Q’.

            BaseTypeName ::=

            ‘S’ StructTypeName

            ‘B’ BuildinScalarTypeName

            ‘V’ BuildinVectorTypeName

            ‘F’ FunctionTypeName

            ‘M’ BuildinMatrixTypeName

            ‘A’ ArraySize ArrayComponentTypeName

            StructTypeName ::= <literal name of structure>

            BuildinScalarTypeNames encode all build-in type into one or two characters.

            BuildinScalarTypeName ::=

            ‘U1’ | ‘U2’ | ‘U4’ | ‘U8’ |‘I1’ | ‘I2’ | ‘I4’ | ‘I8’ | ‘B’ | ’F’ | ‘D’ | ‘O’

            ArrayComponentTypeName ::= QualifiedBaseTypeName

            ArraySize ::=

            <length of array >

            ‘V’

            They are corresponded following building types: uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t, boolean, float, double and omit (void).

            BuildinVectorName ::= VectorLength BuildinScalarTypeName

            BuildinMatrixName ::= RowCountOfMatrix ColumnCountOfMatrix BuildinScalarTypeName

            BuildinVectorTypeName shows the name of building vector. It makes of length component and scalar type component.

            VectorLength Could be 1, 2, 3 or 4 and represents the length of vector.

            And the BuildinMatrixTypeName is similar as build-in vector type name.

            ArraySize is an integer demonstrating the size of fixed-length array or ‘V’ (void or variant) means that it is a variant length array.

            ArrayComponentTypeName is the description of type of component of array. For example, array component type of “int32_t[]” is “int32_t”. So array component type name is set to the mangled name of int32_t, “I4”.

            CallingConvention is a single character which shows the calling convention of this function. ‘S’ means “__stdcall”, ‘C’ means “__cdecl” and ‘F’ ,means “__fastcall”

            CallingConvention ::=

            ‘S’

            ‘C’

            ‘F’

            FunctionTypeName reuses all non-terminators and terminators mentioned above.

            FunctionTypeName ::= ReturnType PrarameterTypes CallConvetion ‘@@@’

            ReturnType ::= ParameterType ‘@@’

            posted on 2010-09-26 19:12 空明流轉(zhuǎn) 閱讀(1686) 評(píng)論(2)  編輯 收藏 引用

            評(píng)論

            # re: SASL Name Mangling (Release Candidate Version) 2010-09-27 09:02 ccsdu2009
            如果是你弄得 為什么要弄英文 ?  回復(fù)  更多評(píng)論
              

            # re: SASL Name Mangling (Release Candidate Version) 2010-09-27 13:28 空明流轉(zhuǎn)
            @ccsdu2009
            這是SoftArt文檔的一部分,自然選擇用英文。  回復(fù)  更多評(píng)論
              


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            久久w5ww成w人免费| 无码任你躁久久久久久老妇| 精品久久久久久无码人妻热 | 日产精品久久久久久久| 久久综合久久综合九色| 蜜臀av性久久久久蜜臀aⅴ| 精品伊人久久大线蕉色首页| 亚洲精品国产综合久久一线| 久久国产精品无| segui久久国产精品| 久久免费线看线看| 国产午夜电影久久| 久久久久99精品成人片| 亚洲国产精品成人久久蜜臀| 久久久无码精品亚洲日韩京东传媒 | 蜜臀av性久久久久蜜臀aⅴ| 久久精品无码一区二区无码 | 热久久这里只有精品| 久久99精品久久久久久不卡| 久久久久婷婷| 97精品伊人久久久大香线蕉 | 四虎国产精品成人免费久久| 久久婷婷色综合一区二区| 伊人久久大香线蕉综合Av| 国内精品久久久久久99蜜桃| 成人精品一区二区久久| 国产精品一区二区久久精品涩爱| 中文字幕人妻色偷偷久久| 久久精品国产91久久综合麻豆自制| 99热精品久久只有精品| 久久久www免费人成精品| 国产精品久久久久9999| 性做久久久久久久久| 精品乱码久久久久久久| 亚洲国产成人久久一区WWW| 九九精品99久久久香蕉| 一本色道久久88综合日韩精品| 久久精品人人做人人爽97| 久久天天躁狠狠躁夜夜2020老熟妇 | 久久国产精品无码网站| 亚洲va中文字幕无码久久不卡|