Понедельник, 24.04.2017, 19:56Приветствую Вас Гость | RSS
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
Страница 1 из 11
Форум » Freebasic » Вопросы по языку FreeBasic » Вышла новая версия компилятора FreeBasic (1.04.0) (Обновления)
Вышла новая версия компилятора FreeBasic (1.04.0)
haavДата: Пятница, 02.10.2015, 08:35 | Сообщение # 1
Группа: Администраторы
Сообщений: 733
Репутация: 33
Статус: Offline
Вышла новая версия компилятора FreeBasic (1.04.0)

Привет всем!

Разработчики выпустили новую версию компилятора. Основными изменениями можно считать добавление нового типа данных Boolean. Конечно же в связи с добавлением Boolean, компилятор теперь знает о константах TRUE и FALSE и их не нужно теперь объявлять вручную. Так же появилось новое ключевое слово CBOOL для преобразования данных в тип Boolean. Кроме того, разработчики внесли еще одно добавление: ссылка или псевдоним переменной. Выглядит это примерно так:

Dim i as integer    
Dim Byref ri as integer = i
Dim Byref ri2 as integer = i

На первый взгляд кажется, что здесь три переменные, но в реале только одна и две ссылки\псевдонима на эту переменную. Говоря простыми словами, все они указывают на одно место в памяти и если изменить одну, меняются все.

Из исправлений , наверно не последнее по значимости - это выгрузка ресурсов FBGFX , из-за чего на windows 10 был конфликт при завершении программы (говоря попросту программа аварийно завершалась).

Конечно же как всегда куча обновлений заголовков, и другие исправления. Весь changelog:

Version 1.04.0

[changed]- FileAttr() now returns an Integer instead of a Long, and now supports returning OS handles on 64bit
- #750: The gfxlib is now cleaned-up by END (which also happens automatically at the end of the implicit main function), instead of the FB runtime's global destructor. This should fix the "hang on exit on Windows 10" issues. The reason is that the gfxlib clean-up needs to wait for the background thread to exit, which cannot safely be done in a global destructor on Windows, due to the loader lock. This means it is definitely not safe anymore to use FB graphics commands during global variable destructors or module-level destructors.
- Windows API binding: The BOOLEAN typedef has been renamed to WINBOOLEAN due to the addition of built-in Boolean type to FB. You can #undef Boolean before #including to get the Windows API BOOLEAN typedef again.
- Many bindings now declare CTRUE (1) instead of TRUE (1), to avoid conflicting with the new built-in True (-1) keyword. You can #undef True before #including them to get their old TRUE (1) again.
- On 64bit, but not -lang qb, integer number literals > 32bit now default to being Integers instead of LongInts, since 64bit Integers are the default type on 64bit. This only makes a difference for overload resolution and typeof(). No changes on 32bit or -lang qb.
- #738: Operator overloading: The overload resolution is now a bit more permissive with regards to CONSTness; for example non-const UDT objects can be passed to Byref As Const UDT parameters, regardless of the other argument/parameter (if it's a binary operator). Previously this was disallowed (though only sometimes, due to a separate issue).
- #756: Val() no longer recognizes 0x or 0X prefixes for hexadecimal values. &h or &H should be used instead. Previously it was only "supported" accidentally, and could produce wrong values (all d's turned into e's in the string before the conversion).

[added]- BOOLEAN data type (compatible to GCC C++). Logic operations involving boolean operands also return a boolean.
- TRUE/FALSE built-in constants (programs may still declare them manually, but a warning will be shown)
- Boolean support for PRINT, INPUT, DATA, WRITE etc. Booleans are represented as "true"/"false" strings (case-insensitive).
- DIM|VAR BYREF id AS datatype, for creating local references to other objects, similar to BYREF parameters
- exepath() now works on FreeBSD, NetBSD, Darwin and Solaris
- The FB gfxlib can now be built on OS X using XQuartz by passing ENABLE_XQUARTZ=1 to make
- Redundant float constant declarations are now also allowed
- Updated Mesa OpenGL binding to 10.6.4
- Updated Windows API binding to MinGW-w64 4.0.4
- Updated IUP binding to 3.15
- Updated CD binding to 5.8.2
- Updated FreeType binding to 2.6
- Updated Lua binding to 5.3.1
- Updated LLVM/clang bindings to 3.6.2
- Updated some CRT/glibc bindings to glibc 2.22
- Updated curl binding to 7.44.0
- Updated libffi binding to 3.2.1
- Updated libpng bindings to 1.5.23 and 1.6.18
- Updated libzip binding to 1.0.1
- New binding for libxcb 1.11
- crt/ now declares FLT_MIN and DBL_MIN
- Updated cgi-util binding to 2.2.1, with 64bit support
- New binding for Chipmunk 7.0.1, with 64bit support
- New binding for cryptlib (cl343_beta), with 64bit support
- New binding for DevIL 1.7.8, with 64bit support
- New disphelper binding
- New binding for Expat 2.1.0, with 64bit support
- New binding for FLite 2.0.0, with 64bit support
- New binding for FreeImage 3.17.0, with 64bit support
- New binding for GD 2.1.1, with 64bit support
- New binding for GDBM 1.11, with 64bit support
- New binding for GDSL 1.8, with 64bit support
- New binding for gif_lib 4.2.3 and 5.1.1, with 64bit support
- New binding for GMP 6.0.0, with 64bit support
- New binding for GRX 2.4.9, with 64bit support
- New binding for GSL 1.16, with 64bit support
- New binding for IM 3.9.1, with 64bit support
- Updated glib binding to 2.44.1
- Updated GTK+ binding to 2.24.28 and 3.16.6
- Updated ATK binding to 2.16.0
- New binding for jpeglib 6b, 7, 8, 9a, with 64bit support
- New binding for json-c 0.12, with 64bit support
- New binding for libxml2 2.9.2 and libxslt 1.1.28, with 64bit support
- New binding for liblzma from xz 5.2.1, with 64bit support
- New binding for LZO 2.09, with 64bit support
- New binding for MediaInfo 0.7.77, with 64bit support
- New binding for libmodplug, with 64bit support
- New binding for libmpg123 1.22.4, with 64bit support
- New binding for Mini-XML 2.9, with 64bit support
- New bindings for SQLite 2.8.17 and, with 64bit support
- New bindings for PCRE 8.37 and PCRE2 10.20, with 64bit support
- New binding for PostgreSQL 9.4.4, with 64bit support
- New binding for libogg 1.3.2, with 64bit support
- New binding for libvorbis 1.3.5, with 64bit support
- New binding for Newton 3.13, with 64bit support
- New binding for ODE 0.13.1, with 64bit support
- New binding for PortAudio (pa_stable_v19_20140130), with 64bit support
- New binding for libsndfile 1.0.25, with 64bit support
- New binding for libuuid (e2fsprogs-libs-1.42.13), with 64bit support
- New binding for libxmp 4.3.9, with 64bit support
- New binding for ZeroMQ 4.1.3, with 64bit support
- New binding for libVLC 2.2.1, with 64bit support
- Select Case As Const maximum allowed Cases (jump table slots) increased from 4097 to 8192

[fixed]- False-positive "ambigious sizeof" warnings if the identifier could refer only to a type or procedure (in that case it should already be fairly clear that the type will be chosen, not the procedure, because sizeof() can't be applied to procedures at all), or if an expression such as "array(0)" is given to sizeof() (i.e. something that starts with an identifier but is followed by further tokens that clarify that it's not refering to a type)
- Adjusted "ambigious sizeof" warning message for the case when it could refer to a forward reference or a variable
- 1.03.0 regression: Compiler crash during error recovery in case a CONST declaration was a duplicate definition
- 1.02.0 regression: couldn't be #included behind due to the declarations for SEEK_SET & co
- Typedefs allowed the data type or forward reference identifier to be omitted (e.g. "type T as")
- Typedefs allowed forward references named after keywords, even though no such type alias or UDT can be declared (only quirk keywords are allowed as type names, not "core" keywords though)
- #747: SPC(n) only allowed skipping into the next line, and truncated bigger values of n. Now it can skip multiple lines if n is big enough.
- IUP binding: added various missing #inclibs
- #782: C backend: inline ASM keywords were turned into references to previously declared FB variables/procedures/labels, if those were named after ASM keywords. Inline ASM keywords will now be left untouched (using the same heuristic, a list of ASM keywords, as used by the ASM backend).
- __FB_ASM__ wasn't #defined for x86_64 even though the -asm option can be used on x86_64 too
- C backend: UDTs using Field=N were emitted incorrectly (causing gcc errors), if they contained a field of type of another UDT that didn't use Field=N.
- False-positive "ambigious sizeof" warnings if the identifier could refer to a type or variable of that type (in this case the size is obviously the same, and it doesn't matter which one is used)
- C backend: Procedure pointers having a circular dependency on themselves could result in duplicate typedefs being emitted, causing gcc errors with older gcc versions.
- rtlib & gfxlib compilation was broken on NetBSD, Darwin and Solaris (header & include-path issues)
- On Darwin, linking with rtlib failed due to __fb_errmsg being discarded
- Correctly implemented fb_hGetExeName for FreeBSD, NetBSD, Darwin and Solaris (needed by gfxlib2)
- The FB makefile can now detect the OS when building on Solaris
- fbc will now pass the proper parameters to "as" on OS X
- 1.02.0 regression: NULL was declared with pointer type in updated bindings (Windows API, SDL, etc.), and is now just an integer constant again, so it can be passed to things like WPARAM/LPARAM without triggering a compiler warning.
- Open Com on Windows didn't invoke GetCommState() properly, meaning it could "randomly" fail. Also, the port was not always opened for exclusive access, even though MSDN says that is the only possibility.
- 1.03.0 regression: OpenAL binding: The ALboolean and ALCboolean typedefs were incorrectly expanded and translated as zstring in some places
- format(now(), "ttttt") now works as expected under unix-like systems
- -profile now works on win64; the compiler generated calls to "mcount" which doesn't exist on win64; it's named "_mcount" instead. (with MinGW-w64's libgmon at least)
- 1.02.0 regression: CHAR/WCHAR typedefs (and others) in the Windows API bindings were translated as zstring/wstring; they're now translated as byte/wchar_t again (and accordingly in some cases where fields/parameters use them as type and clearly don't want a zero-terminated string), to allow them to refer to a single char again.
- 1.01.0 regression: CGUI binding: InitCgui*() macros were all broken, not just InitCgui() (that was fixed before)
- GdiPlus binding: Fixed GdipMeasureCharacterRanges() declaration (wrong parameter type)
- RETURN in BYREF-result functions could erronously try to construct a result object, if the result UDT had constructor overloads taking a pointer
- LLVM backend: Accesses to fixed-length strings now use the proper types
- LLVM backend: Structs using FIELD=1 are now emitted as packed structs
- Many bindings and especially the Windows API binding now use more proper Const/Type/Extern/Sub/Function declarations instead of #defines, allowing many identifiers (such as "LoadImage" which is also a Windows API function) to be used for custom functions in namespaces, even if the file #includes or others.
- 1.02.0 regression: Windows API binding: COM interfaces in win/ were missing vtable entries
- #761: crt/ and win/ can now be used together - they use #undefs to override each-other (e.g. strcpy() vs StrCpy()), whichever is #included last wins.
- Windows API binding: The NM_* constants from win/ are now adjusted to work on 64bit.
- X11 binding: X11's boolean typedef was errornously translated as string type in some places - it is now preserved, named "XBoolean", and translated as byte as intended.
- GTK+ 2 binding: GtkCurve structure was translated incorrectly (i.e. wrong sizeof())
- 1.02.0 regression: Windows API binding: The LPRGLPVOID typedef and related ones were omitted from win/ due to a translation bug
- Windows API binding: win/ now uses the Gdiplus namespace and #inclib on 64bit too.
- The @N stdcall suffix was calculated incorrectly (i.e. it was incompatible with gcc and MSVC) for procedures with Byval non-trivial UDT or Byval String parameters.
- Static member variables using the parent UDT as their data type could be allocated incorrectly (not enough memory reserved, possible even zero memory), if they were declared above some or all fields (related to bug #649)
- C backend: References to procedures and labels are now emitted as-is, instead of using gcc's inline asm place-holders with memory reference constraints (the latter only makes sense for variables, not functions/labels)
- C backend: Inline ASM using labels (i.e. jumps) should now work, using gcc's "asm goto()" syntax
- C backend: The register clobber lists produced for inline ASM are now adjusted to the target - now x86_64 and ARM is supported (though ARM/AArch64 support is probably incomplete), no longer x86 only.
- GET# didn't work with wstrings
- Integer-only operations like AND, OR, \ and MOD converted non-integer operands to Integer, even if the other was a LongInt or UInteger. Now the conversion will use an integer type matching the integer operand (if any), to avoid truncating floating point values, and give more expected results.
- ASM backend: Cross-compiling could give different results than native compilation with regards to the choice of whether to place string literals into .data or const (e.g. .rodata) sections
- Compiling a Select Case As Const block containing a Case with a huge range of values such as won't cause the compiler to "hang" anymore
- Select Case As Const: now triggers a compile-time error if a > b, instead of silently doing nothing
- #784: C backend: String literals in inline ASM (containing double quotes, backslashes, etc.) were emitted into the .c code without escaping
- #777: -lang qb: Suffixed identifiers on the left-hand side of assignments were resolved by prefering global variables instead of local ones. Now local ones take priority, as in other places (e.g. expressions) and as in QB.
- #783: C backend: Run-time float-to-uint64 conversions truncated the value to int64
- #745 part 1: PRINT comma-padding could wrap into the next line too early (if the padding would move the caret beyond column width-FB_TAB_WIDTH). This happened in both console and graphics modes.
- #745 part 2: FB runtime cached the console/graphics window width but didn't update it when it got resized, this should now be fixed at least for the graphics window and Linux console window.
- #743: 1.00.0 regression: len() used on UDT with overloaded cast() operators returned the result type and value of one of these cast operators, instead of the sizeof()
- #738: Operator overloading: The overload resolution gave different results for b+a compared to a+b, if one argument/parameter differed only in CONSTness, and the other didn't.
- #746: -lang qb's Open "Pipe:" wasn't working. Only Open "Pipe:" was accepted (but that's useless); anything else was treated as normal Open file command.
- #414: ASM backend: Bad code generated for comparisons such as IF @globalvar = @stackvar THEN ...
- C backend: Extern Import variables were not emitted and accessed correctly

Скачать компилятор можно как всегда с Оф. сайта или с моего сайта

Вы сохраняете власть над людьми покуда оставляете им что-то…Отберите у человека все, и этот человек уже будет неподвластен вам…
WQДата: Воскресенье, 25.10.2015, 13:08 | Сообщение # 2
Группа: Пользователи
Сообщений: 122
Репутация: 2
Статус: Offline
Хорошие новости, спасибо

Наконец-то обновили заголовки IM, а в заменили zstring на wstring (в свое время долго не мог понять, почему не удается подключиться к mediainfo.dll)
Ну, и IUP довели до 3.15

Добавлено (25.10.2015, 13:08)
angry Рано радовался - IM компилируется только при линковании к динамической библиотеке, статическая IM компилируется только с версией FB 0.90
Ну, или я что-то не так постоянно делаю cry

( Для тех, кто не в курсе, что такое IM: это кроссплатформенная библиотека работы с изображениями с большим количеством функций и небольшим размером, с интеграцией в IUP и свободной лицензией )  

Свой основной проект на 1.04 вообще собрать не смог, сотни ошибок компилятора. Но при таком количестве библиотек это неудивительно
Кстати, теперь понимаю сложность создания сборок FB под новые версии компилятора, чтобы все работало wacko

Форум » Freebasic » Вопросы по языку FreeBasic » Вышла новая версия компилятора FreeBasic (1.04.0) (Обновления)
Страница 1 из 11