Delphi 13.2 Update

The Delphi 13.2 update has just been released.



Ever since the 13.1 update and the new LLVM-based Windows ARM compiler, the LLVM toolchain has entered a cycle of rapid development and improvements. 13.2 continues that trend with a completely revamped 64-bit Linux compiler, which can now be integrated with the 64-bit Delphi IDE.

The new Linux compiler is based on LLVM 20, just like the Windows ARMEC compiler, and the debugger format has been upgraded from DWARF v2 to v4, resulting in more complete debug information.

The new LLVM toolchain also brings two very important improvements: IR optimizations for better performance of compiled applications, and parallel compiling — parallel code generation — for those two newest LLVM-based compilers: Linux and Windows ARMEC.

Of course, turning on code optimization slows down the application building process, but this is where parallel code generation steps in and gives a significant performance boost.

Parallel code generation is a configurable option: You can select the desired number of worker threads, where 0 leaves that selection to automatic process (I got the best results on the Auto setting), 1 is the same as old serial code generation as it uses only a single worker, and, of course, any other number will create that many workers.

You can also enable/disable parallel code generation for each project separately through Project Options or the command line.


Speaking of compiler changes, there is one change which impacts all compilers, and it is possible that some existing code might not compile as-is and will have to be tweaked.

The change is in how the compiler treats a generic type T constrained to a class or interface. Where the compiler previously allowed automatic conversion from TObject or IInterface to T, you will now have to use variables of type T or typecast.

The change is a fix for https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-5756: IInterface argument silently accepted for TProc<T> parameter when T is constrained to IInterface — no E2010, no QueryInterface, leads to access violation

If you are now getting an E2010 Incompatible types compiler error, this fix is the reason. You should carefully inspect the code you are fixing, because that implicit conversion allowed completely incorrect conversions. In other words, it would allow using TObject or IInterface in situations where some other more specific type was expected, which could lead to runtime errors.


You can find more information about the above, and other features and enhancements, at https://docwiki.embarcadero.com/RADStudio/Florence/en/13_Florence_-_Release_2

Comments

Popular posts from this blog

Delphi 13.1 Update: Windows Arm64EC compiler

Delphi 13 Florence: 64-bit IDE debugging experience

Using atomic operations to achieve thread safety