"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/compiler/symb-mangling.bas" between
FreeBASIC-1.07.0-source.tar.gz and FreeBASIC-1.07.1-source.tar.gz

About: FreeBasic is a set of cross-platform development tools consisting of a compiler, GNU-based assembler, linker and archiver, and supporting runtime libraries, including a software-based graphics library.

symb-mangling.bas  (FreeBASIC-1.07.0-source):symb-mangling.bas  (FreeBASIC-1.07.1-source)
skipping to change at line 106 skipping to change at line 106
end function end function
function symbGetDBGName( byval sym as FBSYMBOL ptr ) as zstring ptr function symbGetDBGName( byval sym as FBSYMBOL ptr ) as zstring ptr
'' GDB will demangle the symbols automatically '' GDB will demangle the symbols automatically
if( hDoCppMangling( sym ) ) then if( hDoCppMangling( sym ) ) then
select case as const symbGetClass( sym ) select case as const symbGetClass( sym )
'' but UDT's, they shouldn't include any mangling at all.. '' but UDT's, they shouldn't include any mangling at all..
case FB_SYMBCLASS_ENUM, FB_SYMBCLASS_STRUCT, _ case FB_SYMBCLASS_ENUM, FB_SYMBCLASS_STRUCT, _
FB_SYMBCLASS_CLASS, FB_SYMBCLASS_NAMESPACE FB_SYMBCLASS_CLASS, FB_SYMBCLASS_NAMESPACE
'' check if an alias wasn't given '' check if an alias wasn't given
dim as zstring ptr res = sym->id.alias dim as zstring ptr res = sym->id.alias
if( res = NULL ) then if( res = NULL ) then
res = sym->id.name res = sym->id.name
end if end if
return res return res
case else case else
return symbGetMangledName( sym ) return symbGetMangledName( sym )
end select end select
end if end if
'' Respect ALIAS for array descriptor types, to avoid exposing their '' Respect ALIAS for array descriptor types, to avoid exposing their
'' internal mangling '' internal mangling
if( symbIsStruct( sym ) and symbIsDescriptor( sym ) ) then if( symbIsStruct( sym ) and symbIsDescriptor( sym ) ) then
if( sym->id.alias ) then if( sym->id.alias ) then
skipping to change at line 623 skipping to change at line 623
'' C backend? don't add underscores; gcc will already do it. '' C backend? don't add underscores; gcc will already do it.
if( env.clopt.backend = FB_BACKEND_GCC ) then if( env.clopt.backend = FB_BACKEND_GCC ) then
function = FALSE function = FALSE
else else
'' For ASM, add underscores if the target requires it '' For ASM, add underscores if the target requires it
function = env.underscoreprefix function = env.underscoreprefix
end if end if
end function end function
private function hDoCppMangling( byval sym as FBSYMBOL ptr ) as integer private function hDoCppMangling( byval sym as FBSYMBOL ptr ) as integer
'' C++? '' C++?
if( symbGetMangling( sym ) = FB_MANGLING_CPP ) then if( symbGetMangling( sym ) = FB_MANGLING_CPP ) then
return TRUE return TRUE
end if end if
'' RTL or exclude parent? '' RTL or exclude parent?
if( (symbGetStats( sym ) and (FB_SYMBSTATS_RTL or _ if( ( (symbGetStats( sym ) and (FB_SYMBSTATS_RTL or FB_SYMBSTATS_EXCLPARE
FB_SYMBSTATS_EXCLPARENT NT)) <> 0 ) _
)) <> 0 ) then or ( symbGetMangling( sym ) = FB_MANGLING_RTLIB ) ) then
return FALSE return FALSE
end if end if
'' inside a namespace or class? '' inside a namespace or class?
if( symbGetNamespace( sym ) <> @symbGetGlobalNamespc( ) ) then if( symbGetNamespace( sym ) <> @symbGetGlobalNamespc( ) ) then
return TRUE return TRUE
end if end if
if( sym->class = FB_SYMBCLASS_PROC ) then if( sym->class = FB_SYMBCLASS_PROC ) then
'' overloaded? (this will handle operators too) '' overloaded? (this will handle operators too)
if( symbIsOverloaded( sym ) ) then if( symbIsOverloaded( sym ) ) then
return TRUE return TRUE
end if end if
end if end if
function = FALSE function = FALSE
end function end function
private sub hMangleNamespace _ private sub hMangleNamespace _
( _ ( _
byref mangled as string, _ byref mangled as string, _
byval ns as FBSYMBOL ptr, _ byval ns as FBSYMBOL ptr, _
byval dohashing as integer, _ byval dohashing as integer, _
byval isconst as integer _ byval isconst as integer _
 End of changes. 4 change blocks. 
28 lines changed or deleted 28 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)