[changed]:
gcc: '-funwind-tables' enabled on 64-bit targets for stack unwinding (adeyblue)
fbc: '--eh-frame-hdr' for linking on 64-bit nix targets for stack unwinding (adeyblue)
x86: arch 686 by default instead of 486 (SARG)
x86: arch 586 by default instead of 486 on DOS
asm backend: only with 686 arch, use of fcomi(p) to avoid slower instructions and also less code (SARG)
fbc: #DUMP <expr> and #ODUMP <expr> pragmas only available in debug version of fbc
inc/fbmath.bi renamed to inc/fbprng.bi
fbc: file I/O statements return "Expected file number expression" when checking for file number expression
fbc: [LINE] INPUT statements return "Expected ',' or ';'" error when checking for the comma or semi-colon separator
sf.net #953: fbc: improve compile time error messages for INPUT
sf.net #953: fbc: improve compile time error messages for LINE INPUT
- statements giving better positional information
sf.net #826: fbc: booleans are ranked against integer types to determine closest match in type resolution
sf.net #455: fbc: Allow &nnn... octal literals in source (like VALINT and friends)
fbc: automatically restart fbc/parser at first executable statement if required after preprocessor statements parsed
fbc: -forcelang overrides default lang, -lang, previous -forcelang, #lang, #cmdline "-lang", #cmdline "-forcelang"
fbc: allow gnu triplets for -target option even in standalone builds
gfxlib2: store alpha from source to destination when blending alpha primitives in MMX blender to match C blender
makefile: internal rename (TARGET_PRFEX => BUILD_PREFIX) and conditionally set the library and object directories (default is still based on TARGET)
fbc: dos: set DXE_LD_LIBRARY_PATH environment variable when calling DXE3GEN
release: target DOS gcc 9.3.0 and binutils 2.35.1 for next release
Unix GETMOUSE() under TERM=linux now requires libgpm 1.20.4 or higher (libgpm.so.2), instead of the older libgpm.so.1 versions. (for compatibility with modern Debian/Ubuntu versions, and probably other distros, since 2008)
gas64 : SGN type is INTEGER for whole numbers instead LONG
fbc: thiscall calling convention default for extern "c++" / win32 / x86 / non-static member procedures
fbc: disable byval cva_list returns on ARM targets
fbc: If a procedure definition has a declaration and the definition does not explicitly specify a calling convention, then the calling convention is implied by the declaration.
fbc: Improve handling of closing parenthesis in first argument of a procedure call for some expressions (sf.net # 468). If there is no leading parenthesis, then there should be no ambiguity that the procedure is being invoked without the parentheses
fbc: remove #pragma push( lookup108 ) to use symbol lookup method from fbc-1.08.x and earlier on unqualified symbol names - it was crutch for fb 1.09.0 to help with testing and transition to better lookups
fbc: passing byval constructor preference: prefer A.constructor( B ) instead of of B.operator CAST() as A + A.constructor() when passing UDT by value - this is to fix some inconsistencies in the rules when converting by construction one type to another
fbc: only up-cast initializers when needed. New behaviour is to try matching initializers without up-casting before matching with up-casting.
fbc: don't join operators separated by white space. Previously, '<' + '=', '<' + '>', '=' + '>', and '-' + '>' were joined together even if separated by whitespace.
fbc: don't skip whitespace between decimal point and digit. Previously, '.' + '0..9' floating point literals were allowed to be separated by whitespace.
gfxlib2: gfx_dos drivers initialize the internal dirty array based on scanline size
[added]:
gas/gas64: '.cif_sections' and '.cif_' directives for stack unwinding (adeyblue)
gas/gas64: '.seh_' directives for stack unwinding (adeyblue)
fbc: '-eunwind' command line option to enable stack unwind information, implied by '-e', '-ex', '-exx'
fbc: set bit value '__FB_ERR__' = &h200 if '-eunwind' is enabled
gas64 : stack overflow check (total of all local variables) at compile time --> warning - stack size for linux = 8MB, for Windows = default or defined by user (SARG)
gas64 : stack overflow check at run time if -exx is used - stack size for linux = 8MB, for Windows = default or defined by user (SARG)
fbc: debug pragma #LOOKUP <sym>
rtlib: DOS serial driver - add support for second PIC and IRQ 8 to 15
fbc allow '-target i386-pc-msdosdjgpp' and similar for cross compiling dos targets (even in stand alone)
rtlib: ./inc/fbc-int/system.bi - for fb_CpuDetect()
gfxlib2: ./inc/fbc-int/gfx.bi - to expose FB_GFXCTX structure and some typedefs from gfx lib (useful for some tests in the test-suite)
fbc: basic-macros: add __FB_IIF__( compare-expr, true-expr, false-expr ) macro
github #357: fbc: add '-buildprefix <name>' command line option to specify tool name prefix in both fbc standalone and normal set-ups. Overrides default 'target-' prefix on tool names in normal fbc set-up
fbgfx.bi: add scancode SC_CENTER=&h4C as alias for SC_CLEAR - used for NUMPAD 5 key
makefile: 'DISABLE_GAS64_DEBUG=1' makefile configuration option to disable debugging comments in gas64 asm files
gfxlib2: add FB.GET_SCANLINE_SIZE to fbgfx.bi and ScreenControl() to get current internal scan line size multiplier
gfxlib2: SCREENCONTROL: add getters for GL parameters - new GET_GL_* constants in fbgfx.bi
fbc: allow a TYPE or UNION to be declared inside another TYPE or UNION to allow declaration of nested named types. Support c++ name mangling parameters of named nested types. Support definition of variables declared in a named nested type.
Name mangling for c++ 'char' through BYTE/UBYTE parameters using the form "[unsigned] byte alias "char". Data type size is still 8 byte signed/unsigned from fbc side, but will be mangled as 'char'; neither signed nor unsigned for the c++ side.
Support 'SOURCE_DATE_EPOCH' environment variable for controlling the instrinsic __DATE__, __DATE_ISO__, __TIME__ macros. This in turn controls __FB_BUILD_DATE__ and __FB_BUILD_DATE_ISO__ macros when building the compiler. Report error message on malformed values.
fbc -nolib a,b,c command line option for selectively excluding specific libraries when linking (more fine-grained control than -nodeflibs, and not only for default libraries)
fbc will restart the parser when #cmdline "-mt" is used or usage of any threaded functions automatically enable -mt. This allows the compiler to parse the current module from the beginning and process any __FB_MT__ checks.
fbc: __fastcall support for gcc/gas 32-bit x86 - fbc passes first and second integer arguments in ECX and EDX registers respectively, caller cleans up stack.
fbc: __FB_QUERY_SYMBOL__( what, sym ) built-in macro for querying fbc symbol internals. Added fbc-int/symbol.bi.
add '-z retinflts' command line option for code generation. This option enables returning some structures (types) in floating point registers. This is a work-around for different handling of structs returned by value on different tool chains / targets.
fbgfx.bi: add private function fb.__pixels() to return a pointer to the image data (paul doe)
fbc: add command line option and warning '-w upcast' to warn when up-casting would discard initializers
fbc headers: add ./inc/fblimits.bi for minimum and maximum value constants - for example fb.MIN_VALUE_INTEGER and fb.MAX_VALUE_INTEGER
In normal build of fbc, try to automatically use gcc to query the search path for a std c++ library. This helps with dependency for tests/cpp and for some users that want to interop with c++
Add makefile option DISABLE_STDCXX_PATH to disable using gcc to search for some c++ library path
fbc: allow typename.member symbol checks for #ifdef / #ifndef / defined() where member can be a data field, static data field, nested type, constructor, destructor, property, operator (self-assignment, new, new[], delete, delete[], let, cast, for, step, next), or member procedure.
rtlib: dos: add "__fb_dos_no_dpmi_yield" variable to control calling "__dpmi_yield()" and prevent a crash under some dos extenders in dosbox
fbc: PROCPTR( UDT.member [, ANY|SUB|FUNCTION ...] ) to get a procedure pointer for type member procedures. If the member is abstract, then return 0 (null function pointer of the member procedure's call signature)
fbc: PROCPTR( UDT.member [, VIRTUAL ANY|SUB|FUNCTION ...] ) to get the zero based index in the virtual table. If there is no virtual table entry (or no virtual table at all) then return the special value of -1
[fixed]:
gas64: missing restoring of use of one virtual register on sqr for float (SARG)
gas64: variable of constant datatype not propagated when emitting uop (SARG)
llvm: add missing data type in datatype array (not tested)
sf.net #951: fbc: remove guessed type for cva_list (aka __builtin_va_list)
sf.net #952: fbc: CINT (and other conversion keywords) fails - don't allow inexact conversions or casts from UDT cast operators
sf.net #817: fbc: Type mismatch not detected when passing an array of UDT incompatible with the expected UDT
sf.net #953: fbc: no error generated on INPUT #h, "text" statements
sf.net #953: fbc: no error generated on LINE INPUT #h, "text" statements
sf.net #826: fbc: Weird overload resolution with booleans
sf.net #916: fbc: 'LINE INPUT [#1 | prompt,] variable [, maxchars]' requires length parameter for ZSTRING/WSTRING PTR variable
sf.net #916: fbc: Error on LINE INPUT [#1] if either missing or irrelevant max length argument
sf.net #892: fbc: Bug when default calling via a pointer to a 'Sub' defined with the only 'Any Ptr' optional parameter
github #403: fbc: The default value of the parameter was passed incorrectly when calling the pointer function (Skyfish) [optional parameter values are specified by the function pointer declaration]
sf.net #944: fbc: regression - local static arrays shouldn't have the array descriptor moved to global scope - partially revert #944 and add test
fbc: parser skips extra token on error recovery for #if/#ifndef/defined() statements
sf.net #455: fbc: Number lexing allows much bad input - a show a warning message "Expected digit" where '&o', '&h', '&b' has no digits following
gas64: initialize debug structure even if not emitting debug info to prevent errors due to setup changes by #cmdline inside the parser
fbc: don't allow '-lang' option to override '-forcelang' option on command line
github #199: Gfxlib Different Pixel Output Between C & MMX - change MMX Alpha blenders to match C blenders
github #368: Fix mangling involving toplevel CONST and abbreviations (dkl)
fbc: dos: invoke dxe3gen when cross compiling to dos - previously only executed on DOS host
fbc: dos: when invoking dxe3gen on cross compiler, don't write to ldopt.tmp, dxe3gen doesn't seem to be able to handle the ldopt.tmp argument
fbc: remove double path separator characters '/', '' when setting the fbc path prefix
rtlib: multikey was missing VK_NUMPAD5 and SC_CLEAR scancodes in the key table, causing NUMPAD-5 to be handled as escape in the windows D2D gfx driver
sf.net: #961: rtlib/gfxlib: COLOR() function returns LONG but should be ULONG
The DISABLE_GPM build option for the Unix rtlib now only disables GETMOUSE() for TERM=linux, which is the case that uses GPM, however GETMOUSE() for TERM=xterm now keeps working under DISABLE_GPM, since that case does not use GPM.
Unix rtlib: Multi-threaded use of shell()/exec()/dylibload()/dylibfree() can no longer cause input/output terminal configuration cleanup at program exit to fail
sf.net #965: fbc: Bad code generation in gcc backend for NOT PTR_EXPR - don't allow unary ops on pointers
Internal (unit tests): Stack corruption in mid() tests (regression from 1.07.0)
gfxlib2: LINE statement computing an incorrect line style pattern on any non-X86 (i.e. 64-bit, etc)
github #393: rtlib: OPEN fails when opening an encoded file for append. Check the BOM on existing files for INPUT/APPEND, write the BOM for new files for OUTPUT/APPEND.
sf.net #968: fbc: major changes how initializers are handled and pairing of a UDT's (internal) structure and the initializer list given by the user.
fbc: show an error on byref initializers that can't take address of. Previously this was checked by fbc debug assertion only.
sf.net #894: Can't initialise a UDT as copy of another if the first element is a UNION, fixed by sf.net #968
sf.net #922: Sometimes can't use extra backets inside TYPE UDT initialiser - now, don't allow optional parentheses when parsing type<UDT>(...) if left parenthesis is found
sf.net #824: Illegal destructor call after '#print typeof( f() )' when f() is a function returning an object by value
fbc: delete destructor calls of discarded expressions in IIF(), previously, unscoped dtors (to be called after the expression) and deleted dtors (to be never called) were being handled the same
gas backend: fix spill registers when all reused registers are within the same emit operation
github #404: gas64: fix stack size and alignment for GOSUB usage (SARG)
fbc: #macro definition parsing incorrectly handles single line comments ending with line continuation character and incorrectly joins the following line to the comment
fbc: add special handling for #inclib "fbgfx?" to fix incorrect linking to non-threaded gfx library. #include "fbgfx.bi" was causing the libfbgfx library to always be linked even when thread safe version was expected (causing deadlocks in user programs)
gfxlib2: fix dos keyboard handler so that left shift key will release in multikey() checks
sf.net #970: Illicit "error 202: Illegal member access, UDT.operator.cast" compiler error message - suppress bogus error message when checking procedure overloads for possible candidate
sf.net #811: *(ptr).field should give an error
sf.net #972: A local Type cannot access members of an inherited Type external to its scope but normally accessible
sf.net #834: Line continuation not handled during #if 0 skipping - fixed by ignoring line continuation characters and invalid directives - continue to preserve multiline comment parsing
fbc: internal: throw an error if __FB_EVAL__ would cause the parser to nest too deeply
fbc: improve code generation for structs returned by value and structs returned in registers - some structs where not handled correctly and had mismatched code generation when mixing modules with different fbc backends or linking again c libraries (e.g. gas+gcc or gas64+gcc) resulting in stack corruption or wrong values returned in structs
gas64: improve code generation for structs returned by value, fix optimization no 16, fix relocations for static / shared in shared libraries
fbgfx.bi: fix structures and declarations for #lang "qb" (paul doe)
gas64: fix structures passed by upcasting (SARG)
fbc: discard assignments and constructor calls in initializers that would write outside of the target when emitting initializer lists - previously, up-casted initializers were writing beyond the limits of the target and trashing memory
fix regression due to previous change on sf.net #917: optimization of 'm += s'. The optimization failed to consider 's = s + expr' where expr might contain 's'. In such a case, the optimization cannot be applied.
fbc: basic-macros: improve the handling of optional parens in function like macros by ending a macro argument list on the number of arguments expected (non-variadic macros only).
fbc: bad error recovery after overloaded operator [] caused compiler crash, for example if overloaded operator [] is found but can't be used due to mixing const and non-const types, or invalid members
fbc: improve error message 215 to indicate that only static members can be accessed from parameter intializers as well as static functions
fbc: #cmdline "-c ..." needs to restart parser since code generation is affected. The implicit main was being emitted even when '-c' was give in #cmdline and was working differently than when '-c' given on the actual command line.
fbc: extend lifetime of temporary variables in WITH TYPE(...) expressions to the END WITH statement
fbc: #cmdline "-r -rr -R -RR -o objfile ..." needs to restart the parser and handle changes in keeping the ASM file. In the case of '-o objfile' a major restart is needed since some initialization of filenames is done before parsing starts. By default the temporary ASM file was being kept even if #cmdline options indicate to keep it.
sf.net #569: gfxlib2: GetMouse/SetMouse scaling problem in QB modes Screen 2 & 8 - adjust GetMouse/SetMouse by internal scanline_size
fbc: fbc: fix bad error recovery on BYREF intializer. 'Dim Byref As UDT u = UDT()' would case compiler crash if UDT constructor argument optional