"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/compiler/ast-node-arg.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.

ast-node-arg.bas  (FreeBASIC-1.07.0-source):ast-node-arg.bas  (FreeBASIC-1.07.1-source)
skipping to change at line 292 skipping to change at line 292
private sub hCheckByrefParam _ private sub hCheckByrefParam _
( _ ( _
byval param as FBSYMBOL ptr, _ byval param as FBSYMBOL ptr, _
byval n as ASTNODE ptr _ byval n as ASTNODE ptr _
) )
dim as ASTNODE ptr t = any dim as ASTNODE ptr t = any
'' skip any casting if they won't do any conversion '' skip any casting if they won't do any conversion
t = astSkipNoConvCAST( n->l ) '' TODO: astSkipConstCASTs() will skip over any CONST conversions
'' This is OK when generating the final AST, as we probably no longer car
e
'' about CONST. However, if we ever get here and we expect PARSER/AST to
'' return an error, or preserve the CONST conversion as part of the
'' translation, this may introduce undesired behaviour. Need to verify.
'' Specifically, using astSkipConstCASTs() instead of astSkipNoConvCAST()
'' allows us to fix the fbc crash as reported in sf.net bug #910
t = astSkipConstCASTs( n->l )
'' If it's a CALL returning a STRING, it actually returns a pointer, '' If it's a CALL returning a STRING, it actually returns a pointer,
'' which can be passed to the BYREF param as-is '' which can be passed to the BYREF param as-is
if( astIsCALL( t ) ) then if( astIsCALL( t ) ) then
select case as const( astGetDataType( t ) ) select case as const( astGetDataType( t ) )
case FB_DATATYPE_STRING, FB_DATATYPE_FIXSTR, _ case FB_DATATYPE_STRING, FB_DATATYPE_FIXSTR, _
FB_DATATYPE_CHAR, FB_DATATYPE_WCHAR FB_DATATYPE_CHAR, FB_DATATYPE_WCHAR
exit sub exit sub
end select end select
end if end if
 End of changes. 1 change blocks. 
1 lines changed or deleted 9 lines changed or added

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