| 591 | } |
| 592 | |
| 593 | string getTypeInfoMangledName ( TypeInfo * info ) { |
| 594 | TextWriter ss; |
| 595 | if ( info->flags & TypeInfo::flag_isConst ) ss << "C"; |
| 596 | if ( info->flags & TypeInfo::flag_ref ) ss << "&"; |
| 597 | if ( info->flags & TypeInfo::flag_isTemp ) ss << "#"; |
| 598 | if ( info->flags & TypeInfo::flag_isImplicit ) ss << "I"; |
| 599 | // if ( explicitConst )ss << "="; |
| 600 | // if ( explicitRef ) ss << "R"; |
| 601 | // if ( isExplicit ) ss << "X"; |
| 602 | // if ( aotAlias ) ss << "F"; |
| 603 | if ( info->dimSize ) { |
| 604 | for ( uint32_t d=0, ds=info->dimSize; d!=ds; ++d ) { |
| 605 | ss << "[" << info->dim[d] << "]"; |
| 606 | } |
| 607 | } |
| 608 | if ( info->argNames ) { |
| 609 | ss << "N<"; |
| 610 | for ( uint32_t a=0, as=info->argCount; a!=as; ++a ) { |
| 611 | if ( a ) ss << ";"; |
| 612 | ss << info->argNames[a]; |
| 613 | } |
| 614 | ss << ">"; |
| 615 | } |
| 616 | if ( info->argTypes ) { |
| 617 | ss << "0<"; |
| 618 | for ( uint32_t a=0, as=info->argCount; a!=as; ++a ) { |
| 619 | if ( a ) ss << ";"; |
| 620 | ss << getTypeInfoMangledName(info->argTypes[a]); |
| 621 | } |
| 622 | ss << ">"; |
| 623 | } |
| 624 | if ( info->firstType ) { |
| 625 | ss << "1<" << getTypeInfoMangledName(info->firstType) << ">"; |
| 626 | } |
| 627 | if ( info->secondType ) { |
| 628 | ss << "2<" << getTypeInfoMangledName(info->secondType) << ">"; |
| 629 | } |
| 630 | if ( info->type==Type::tHandle ) { |
| 631 | ss << "H<"; |
| 632 | auto annotation = info->getAnnotation(); |
| 633 | if ( !annotation->module->name.empty() ) { |
| 634 | ss << annotation->module->name << "::"; |
| 635 | } |
| 636 | ss << annotation->name << ">"; |
| 637 | } else if ( info->type==Type::tStructure ) { |
| 638 | ss << "S<"; |
| 639 | // TODO: add module name to struct info |
| 640 | /* |
| 641 | if ( info->structType->module && !info->structType->module->name.empty() ) { |
| 642 | ss << info->structType->module->name << "::"; |
| 643 | } |
| 644 | */ |
| 645 | ss << info->structType->name << ">"; |
| 646 | } else if ( info->type==Type::tEnumeration || info->type==Type::tEnumeration8 || info->type==Type::tEnumeration16 || info->type==Type::tEnumeration64 ) { |
| 647 | ss << "E"; |
| 648 | if ( info->type==Type::tEnumeration8 ) ss << "8"; |
| 649 | else if ( info->type==Type::tEnumeration16 ) ss << "16"; |
| 650 | else if ( info->type==Type::tEnumeration64 ) ss << "64"; |
no test coverage detected