Difference between revisions of "FPC New Features Trunk"

From Lazarus wiki
Jump to navigationJump to search
 
(144 intermediate revisions by 20 users not shown)
Line 1: Line 1:
 
== About this page ==
 
== About this page ==
  
Below you can find a list of new features introduced since the [[FPC_New_Features_2.6.2|previous release]], along with some background information and examples. Note that since svn trunk is by definition still under development, some of the features here may still change before they end up in a release version.
+
Below you can find a list of new features introduced since the [[FPC_New_Features_3.2.2|previous release]], along with some background information and examples. Note that since svn trunk is by definition still under development, some of the features here may still change before they end up in a release version.
  
 
A list of changes that may break existing code can be found [[User Changes Trunk|here]].
 
A list of changes that may break existing code can be found [[User Changes Trunk|here]].
  
 
== All systems ==
 
== All systems ==
 +
 +
=== Compiler ===
 +
 +
==== fpcres can compile RC files ====
 +
 +
* '''Overview''': The ''fpcres'' utility gained support for compiling RC files to RES files if the output format (parameter ''-of'') is set to ''rc''. The Free Pascal compiler itself can use ''fpcres'' instead of ''windres'' or ''gorc'' as well if the option ''-FF'' is supplied.
 +
* '''Notes''': Using ''fpcres'' instead of ''windres'' or ''gorc'' will become default once a release with the new ''fpcres'' is released.
 +
* '''svn''': 46398 (and others before and after that)
  
 
=== Language ===
 
=== Language ===
  
==== Delphi-like namespaces units ====
+
==== Support for "volatile" intrinsic ====
* '''Overview''': Support has been added for unit names with dots.  
+
* '''Overview''': A '''volatile''' intrinsic has been added to indicate to the code generator that a particular load from or store to a memory location must not be removed.
* '''Notes''': Delphi-compatible.
+
* '''Notes''':
* '''More information''': Unit names with dots creates namespace symbols which always have a precedence over unit names in an identifier search.
+
** Delphi uses an attribute rather than an intrinsic. Such support will be added once support for attributes is available in FPC. An intrinsic that applies only to a specific memory access also has the advantages outlined in https://lwn.net/Articles/233482/
 +
** Accesses to fixed absolute addresses (as common on DOS and embedded platforms) are automatically marked as volatile by the compiler.
 +
* '''Example''': https://gitlab.com/freepascal.org/fpc/source/-/blob/main/tests/test/tmt1.pp
 +
* '''svn''': 40465
  
==== Dynamic array constructors ====
+
==== Support for "noinline" modifier ====
* '''Overview''': Support has been added for constructing dynamic arrays with class-like constructors.
+
* '''Overview''': A '''noinline''' modifier has been added that can be used to prevent a routine from ever being inlined (even by automatic inlining).
* '''Notes''': Delphi-compatible.
+
* '''Notes''': Mainly added for internal compiler usage related to LLVM support.
* '''More information''': Only constructor name 'CREATE' is valid for dynamic arrays.
+
* '''svn''': 41198
* '''Examples''': SomeArrayVar := TSomeDynArrayType.Create(value1, value2)
+
 
 +
==== Support for multiple active helpers per type ====
 +
* '''Overview''': With the modeswitch ''multihelpers'' multiple helpers for a single type can be active at once. If a member of the type is accessed it's first checked in all helpers that are in scope in reverse order before the extended type itself is checked.
 +
* '''Examples''': All tests with the name ''tmshlp*.pp'' in https://gitlab.com/freepascal.org/fpc/source/-/tree/main/tests/test
 +
* '''svn''': 42026
 +
 
 +
==== Support for custom attributes ====
 +
* '''Overview''': Custom attributes allow to decorate types and published properties of classes to be decorated with additional metadata. The metadata are by itself descendants of ''TCustomAttribute'' and can take additional parameters if the classes have a suitable constructor to take these parameters. This feature requires the new modeswitch ''PrefixedAttributes''. This modeswitch is active by default in modes ''Delphi'' and ''DelphiUnicode''. Attributes can be queried using the ''TypInfo'' or ''Rtti'' units.
 +
* '''Notes''': More information can be seen in the [https://lists.freepascal.org/pipermail/fpc-announce/2019-July/000612.html announcement mail] and [[Custom_Attributes|Custom Attributes]]
 +
* '''svn''': 42356 - 42411
 +
* '''Example''':
 +
<syntaxhighlight lang="pascal">
 +
program tcustomattr;
 +
 
 +
{$mode objfpc}{$H+}
 +
{$modeswitch prefixedattributes}
  
==== New compiler intrinsic ''Default'' ====
 
* '''Overview''': A new compiler intrinsic ''Default'' has been added which allows you get a correctly initialized value of a type which is given as parameter. It can also be used with generic type parameters to get a default value of the type.
 
* '''Notes''': Delphi-compatible.
 
* '''More information''': In simple terms the value returned by ''Default'' will be initialized with zeros. The ''Default'' intrinsic is not allowed on file types or records/objects/arrays containing such types (Delphi ignores file types in sub elements).
 
* '''Examples''':
 
<syntaxhighlight>
 
 
type
 
type
   TRecord = record
+
   TMyAttribute = class(TCustomAttribute)
     i: LongInt;
+
     constructor Create;
     s: AnsiString;
+
    constructor Create(aArg: String);
 +
    constructor Create(aArg: TGUID);
 +
     constructor Create(aArg: LongInt);
 
   end;
 
   end;
  
 +
  {$M+}
 +
  [TMyAttribute]
 +
  TTestClass = class
 +
  private
 +
    fTest: LongInt;
 +
  published
 +
    [TMyAttribute('Test')]
 +
    property Test: LongInt read fTest;
 +
  end;
 +
  {$M-}
 +
 +
  [TMyAttribute(1234)]
 +
  [TMy('Hello World')]
 +
  TTestEnum = (
 +
    teOne,
 +
    teTwo
 +
  );
 +
 +
  [TMyAttribute(IInterface), TMy(42)]
 +
  TLongInt = type LongInt;
 +
 +
constructor TMyAttribute.Create;
 +
begin
 +
end;
 +
 +
constructor TMyAttribute.Create(aArg: String);
 +
begin
 +
end;
 +
 +
constructor TMyAttribute.Create(aArg: LongInt);
 +
begin
 +
end;
 +
 +
constructor TMyAttribute.Create(aArg: TGUID);
 +
begin
 +
end;
 +
 +
begin
 +
 +
end.
 +
</syntaxhighlight>
 +
 +
==== Support for constant parameters in generics ====
 +
* '''Overview''': Generic types and routines can now be declared with constants as parameters which function as untyped constants inside the generic. However these generic parameters have a type which allows the author of the generic to restrict the possible values for the constant. Only constant types that can also be used for untyped constants can be used.
 +
* '''Notes''':
 +
** This feature is not Delphi compatible, but can be used in mode ''Delphi'' as well
 +
** More information is available in the [https://lists.freepascal.org/pipermail/fpc-devel/2020-April/042708.html announcement mail].
 +
* '''Examples''': All tests with the name ''tgenconst*.pp'' in https://gitlab.com/freepascal.org/fpc/source/-/tree/main/tests/test
 +
* '''svn''': 45080
 +
 +
==== Support for "IsConstValue" intrinsic ====
 +
* '''Overview''': An ''IsConstValue'' intrinsic has been added to check whether a provided value is considered a constant value. This is mainly useful inside inlined functions to manually improve the generated code if a constant is encountered.
 +
* '''Notes''':
 +
** This function returns a constant Boolean value and is Delphi compatible.
 +
** Typed constants are ''not'' considered constants (Delphi compatible and also compatible with the usual modus operandi regarding typed constants).
 +
* '''Example''': https://gitlab.com/freepascal.org/fpc/source/-/tree/main/tests/test/tisconstvalue2.pp
 +
* '''svn''': 45695
 +
 +
==== Copy supports Open Array parameters ====
 +
* '''Overview''': The ''Copy'' intrinsic can now be used to copy (a part of) the contents of an open array parameter to a dynamic array.
 +
* '''Notes''':
 +
** The result of the ''Copy'' function will have the type of a dynamic array with the same element type as the parameter that is copied from.
 +
** If the ''Start'' parameter is out of range the resulting dynamic array will be empty.
 +
** If the ''Count'' parameter is too large then the resulting dynamic array will only contain the elements that exist.
 +
* '''svn''': 46890
 +
* '''Example''':
 +
<syntaxhighlight lang="pascal">
 +
procedure Test(aArg: array of LongInt);
 
var
 
var
   i: LongInt;
+
   arr: array of LongInt;
  o: TObject;
 
  r: TRecord;
 
 
begin
 
begin
   i := Default(LongInt); // 0
+
   arr := Copy(aArg, 3, 5);
  o := Default(TObject); // Nil
+
end;
  r := Default(TRecord); // ( i: 0; s: '')
+
</syntaxhighlight>
 +
 
 +
==== Array constructors for static arrays ====
 +
* '''Overview''': Array constructors can be used to assign values to static arrays.
 +
* '''Notes''':
 +
** The array constructor needs to have the same amount of elements as the static array.
 +
** The first element of the array constructor will be placed at the location of the first element of the static array (e.g. if the array starts at -1 the first element will be at that location).
 +
** Arrays with enumeration index are supported as well.
 +
* '''svn''': 46891, 46901
 +
* '''Example''': https://gitlab.com/freepascal.org/fpc/source/-/tree/main/tests/test/tarrconstr16.pp
 +
 
 +
==== "Align" modifier support for record definitions ====
 +
* '''Overview''': It is now possible to add an '''Align X''' modifier at the end of a record definition to indicate that the record as a whole should be aligned to a particular boundary.
 +
* '''Notes''':
 +
** Should be Delphi compatible, although documentation is not available ([https://web.archive.org/web/20171221044023/http://qc.embarcadero.com/wc/qcmain.aspx?d=87283 "semi-official" reference]; the mentioned issue does not exist in the FPC implementation).
 +
** This does not influence the alignment of the individual fields, which are still aligned according to the current ''{$packrecords y}''/''{$align y}'' settings.
 +
** X can be 1, 2, 4, 8, 16, 32 or 64.
 +
* '''svn''': 47892
 +
* '''Example''': https://gitlab.com/freepascal.org/fpc/source/-/blob/main/tests/webtbs/tw28927.pp
 +
 
 +
==== Support for binary literals in Delphi mode ====
 +
* '''Overview''': It is now possible to use binary literals ('%' as prefix) in Delphi mode.
 +
* '''Notes''': [https://docwiki.embarcadero.com/RADStudio/Alexandria/en/What%27s_New#Binary_Literals_and_Digit_Separator Delphi compatibility].
 +
* '''GitLab issue''': [https://gitlab.com/freepascal.org/fpc/source/-/issues/39503 #39503]
 +
* '''Example''':
 +
<syntaxhighlight lang="pascal">
 +
{$mode Delphi}
 +
var
 +
  b: byte;
 +
begin
 +
  b:=%11001001;
 
end.
 
end.
 
</syntaxhighlight>
 
</syntaxhighlight>
  
<syntaxhighlight>
+
==== Support for Digit Separator ====
 +
* '''Overview''': It is now possible to use the Digit Separator ('_') with the ''underscoreisseparator'' modeswitch. It is also enabled by default in Delphi mode.
 +
* '''Notes''': [https://docwiki.embarcadero.com/RADStudio/Alexandria/en/What%27s_New#Binary_Literals_and_Digit_Separator Delphi compatibility].
 +
* '''GitLab issue''': [https://gitlab.com/freepascal.org/fpc/source/-/issues/39504 #39504]
 +
* '''Example''':
 +
<syntaxhighlight lang="pascal">
 +
{$mode Delphi}
 +
var
 +
  i: Integer;
 +
  r: Real;
 +
begin
 +
  i := %1001_1001;
 +
  i := &121_102;
 +
  i := 1_123_123;
 +
  i := $1_123_123; 
 +
  r := 1_123_123.000_000;
 +
  r := 1_123_123.000_000e1_2;
 +
end.
 +
</syntaxhighlight>
 +
 
 +
==== Support for forward declarations of generic types ====
 +
* '''Overview''': It is now possible to use forward declarations for generic classes and interfaces like is possible for non-generic classes and interfaces.
 +
* '''Notes''':
 +
** Generic type constraints and const declarations need to be used for both the forward and the final implementation like is necessary for global generic routines.
 +
** This is Delphi-compatible.
 +
* '''Commit''': [https://gitlab.com/freepascal.org/fpc/source/-/commit/2a5023508a2bc4ff3ba4f3a0ca16366d3df86db8 2a502350]
 +
* '''Example''':
 +
<syntaxhighlight lang="pascal">
 +
{$mode objfpc}
 
type
 
type
   generic TTest<T> = class
+
   generic TTest<T> = class;
     procedure Test;
+
  generic TFoo<T: class> = class;
 +
  generic TBar<const N: LongInt> = class;
 +
 
 +
  TSomething = class
 +
    fTest: specialize TTest<LongInt>;
 +
    fFoo: specialize TFoo<TObject>;
 +
     fBar: specialize TBar<42>;
 
   end;
 
   end;
  
procedure TTest.Test;
+
  generic TTest<T> = class end;
var
+
  generic TFoo<T: class> = class end;
   myt: T;
+
   generic TBar<const N: LongInt> = class end;
 +
 
 
begin
 
begin
  myt := Default(T); // will have the correct Default if class is specialized
+
end.
end;
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==== Support for type helpers ====
+
==== Support for Function References and Anonymous Functions ====
* '''Overview''': Support has been added for type helpers which allow you to add methods and properties to primitive types.
+
* '''Function References''': Function References (also applicable names are Procedure References and Routine References, in the following only Function References will be used) are types that can take a function (or procedure or routine), method, function variable (or procedure variable or routine variable), method variable, nested function (or nested procedure or nested routine) or an anonymous function (or anonymous procedure or anonymous routine) as a value. The function reference can then be used to call the provided function just like other similar routine pointer types. In contrast to these other types nearly all function-like constructs can be assigned to it (the only exception are nested function variables (or nested procedure variables or nested routine variables), more about that later on) and then used or stored.
* '''Notes''': In mode ''Delphi'' it's implemented in a Delphi-compatible way using ''record helper'' for declaration, while the modes ''ObjFPC'' and ''MacPas'' use ''type helper'' (the feature can also be enabled in other modes if mode switch ''Class'' is set).
+
* '''Anonymous Functions''': Anonymous Functions (or Anonymous Procedures or Anonymous Routines, in the following simply Anonymous Functions) are routines that have no name associated with them and are declared in the middle of a code block (for example on the right side of an expression or as a parameter for a function call). However they can just as well be called directly like a nested function (or nested procedure or nested routine) would.
* '''More information''':
+
* '''More Information and Examples''': [https://forum.lazarus.freepascal.org/index.php/topic,59468.0.html Feature announcement: Function References and Anonymous Functions]
** [http://lists.freepascal.org/lists/fpc-announce/2013-February/000587.html This] announcement e-mail contains a detailed description of the feature
+
* '''GitLab Issue''': [https://gitlab.com/freepascal.org/fpc/source/-/issues/24481 #24481]
** The tests are named ''tthlp*.pp'' and are available in http://svn.freepascal.org/svn/fpc/trunk/tests/test/
+
 
 +
==== Descendant type helpers can extend type aliases ====
 +
* '''Overview''': A type helper that descends from another type helper can now extend a unique type alias of the type the inherited type helper extends. This way a type helper for the original type can be made available for the type alias as well.
 +
* '''Notes''':
 +
** The type alias the descendant extends does not need to be a ''direct'' type alias of the parent's extended type.
 +
** The other way around is not allowed: a type helper that inherits from another helper which extends a unique type alias can not extend the base type.
 +
* '''Example''': See the [https://gitlab.com/freepascal.org/fpc/source/-/blob/main/tests/test/tthlp30.pp test] for the feature.
 +
* '''Commit''': [https://gitlab.com/freepascal.org/fpc/source/-/commit/7133ad7ecc46700618193adff85cef84682355b0 7133ad7e]
 +
 
 +
==== Support for Unicode RTL ====
 +
* '''Overview''': The Unicode RTL is required for Delphi 2009+ compatibility. This also includes support for dotted filenames like ''System.SysUtils''
 +
* '''Notes''': [https://wiki.freepascal.org/FPC_Unicode_RTL FPC Unicode RTL].
 +
* '''fpc-devel Mailinglist announcement''': [https://lists.freepascal.org/pipermail/fpc-devel/2023-July/045194.html Unicode RTL]
  
==== Support for codepage-aware strings ====
+
==== Support for Extended RTTI ====
* '''Overview''': Ansistrings have been made codepage-aware. This means that every ansistring now has an extra piece of meta-information that indicates the codepage in which the characters of that string are encoded.
+
* '''Overview''': Extended RTTI includes the for ''$RTTI'' directive, generating RTTI metadata for all fields, methods and properties and allowing the access of the RTTI metadata via TypInfo and RTTI unit.
* '''Notes''': Delphi-compatible (2009 and later).
+
* '''Notes''': [https://docwiki.embarcadero.com/RADStudio/Alexandria/en/RTTI_directive_(Delphi) Delphi 2010+ compatibility].
* '''More Information:''' [http://edn.embarcadero.com/article/images/38980/Delphi_and_Unicode.pdf Embarcadero white paper], specifically the sections ''The Many String Types'' and ''Converting Strings''
+
* '''GitLab issue''': [https://gitlab.com/freepascal.org/fpc/source/-/issues/38964 #38964]
 +
* '''Commit''': [https://gitlab.com/freepascal.org/fpc/source/-/compare/c74441323ac9712f0a1f08349debcffe580734d1...a98462835ed6848b62ef95188627e11c4ba52df0 7eea8507..a9846283]
  
=== Code generator ===
+
=== Units ===
  
==== Class field reordering ====
+
==== DaemonApp ====
* '''Overview''': The compiler can now reorder instance fields in classes in order to minimize the amount of memory wasted due to alignment gaps.
+
===== Additional control codes on Windows =====
* '''Notes''': Since the internal memory layout of  a class is opaque (except by querying the RTTI, which is updated when fields are moved around), this change should not affect any code. It may cause problems when using so-called "class crackers" in order to work around the language's type checking though.
+
* '''Overview''': Windows allows a service to request additional control codes to be received. For example if the session of the user changed. These might also carry additional parameters that need to be passed along to the ''TDaemon'' instance. For this the ''WinBindings'' class of the ''TDaemonDef'' now has an additional ''AcceptedCodes'' field (which is a set) that allows to define which additional codes should be requested. Then the daemon should handle the ''OnControlCodeEvent'' event handler which in contrast to the existing ''OnControlCode'' handler takes two additional parameters that carry the parameters that the function described for MSDNs ''[https://docs.microsoft.com/en-us/windows/win32/api/winsvc/nc-winsvc-lphandler_function_ex LPHANDLER_FUNCTION_EX]'' takes as well.
* '''More information''': This optimization is currently only enabled by default at the new optimization level -O4, which enables optimizations that may have (unforeseen) side effects. The reason for this is fairly widespread use of some existing code that relies on class crackers. In the future, this optimization may be moved to level -O2. You can also enable the optimization individually using the ''-Ooorderfields'' command line option, or by adding ''{$optimization orderfields}'' to your source file. It is possible to prevent the fields of a particular class from being reordered by adding ''{$push} {$optimization noorderfields}'' before the class' declaration and ''{$pop}'' after it.
+
* '''Notes''': This lead to slight incompatibilities which are mentioned in [[User_Changes_Trunk#DaemonApp|User Changes Trunk]]
 +
* '''svn''': 46326, 46327
  
==== Removing the calculation of dead values ====
+
==== Classes ====
* '''Overview''': The compiler can now in some cases (which may be extended in the future) remove the calculation of dead values, i.e. values that are computed but not used afterwards.
+
===== Naming of Threads =====
* '''Notes''': While the compiler will never remove such calculations if they have explicit side effects (e.g. they change the value of a global variable), this optimization can nevertheless result in changes in program behaviour. Examples include removed invalid pointer dereferences and removed calculations that would overflow or cause a range check error.
+
* '''Overview''': ''TThread.NameThreadForDebugging'' has been implemented for macOS.
* '''More information''': This optimization is only enabled by default at the new optimization level -O4, which enables optimizations that may have (unforeseen) side effects. You can also enable the optimization individually using the ''-Oodeadvalues'' command line option, or by adding ''{$optimization deadvalues}'' to your source file.
+
* '''Notes''': Delphi compatible, was already implemented for Windows, Linux and Android and finally for macOS now. Read documentation as every platform has its own restrictions.
 +
* '''svn:''' 49323
  
==== Shortcuts to speed up floating point calculations ====
+
==== Objects ====
* '''Overview''': The compiler can now in some cases (which may be extended in the future) take shortcuts to optimize the evaluation of floating point expressions, at the expense of potentially reducing the precision of the results.
+
===== TRawByteStringCollection =====
* '''Notes''': Examples of possible optimizations include turning divisions by a value into multiplications with the reciprocal value (not yet implemented), and reordering the terms in a floating point expression.
+
* '''Overview''': A new object type TRawByteStringCollection, similar to TStringCollection, but works with RawByteString/AnsiString
* '''More information''': This optimization is only enabled by default at the new optimization level -O4, which enables optimizations that may have (unforeseen) side effects. You can also enable the optimization individually using the ''-Oofastmath'' command line option, or by adding ''{$optimization fastmath}'' to your source file.
+
* '''git:''' 0b8a0fb4
  
==== Removing the calculation of dead values ====
+
===== TUnicodeStringCollection =====
* '''Overview''': The compiler can now in some cases (which may be extended in the future) remove the calculation of dead values, i.e. values that are computed but not used afterwards.
+
* '''Overview''': A new object type TUnicodeStringCollection, similar to TStringCollection, but works with UnicodeString
* '''Notes''': While the compiler will never remove such calculations if they have explicit side effects (e.g. they change the value of a global variable), this optimization can nevertheless result in changes in program behaviour. Examples include removed invalid pointer dereferences and removed calculations that would overflow or cause a range check error.
+
* '''git:''' 0b8a0fb4
* '''More information''': This optimization is only enabled by default at the new optimization level -O4, which enables optimizations that may have (unforeseen) side effects. You can also enable the optimization individually using the ''-Oodeadvalues'' command line option, or by adding ''{$optimization deadvalues}'' to your source file.
 
  
==== Constant propagation ====
+
===== TStream methods for reading and writing RawByteString and UnicodeString =====
* '''Overview''': The compiler can now, to a limited extent, propagate constant values across multiple statements in function and procedure bodies.
+
* '''Overview''': New methods have been added to TStream for reading and writing RawByteString/AnsiString and UnicodeString types.
* '''Notes''': Constant propagation can cause range errors that would normally manifest themselves at runtime to be detected at compile time already.
+
* '''Notes''': The following methods have been added:
* '''More information''':This optimization is enabled by default at optimization level -O3 and higher. You can also enable the optimization individually using the ''-Ooconstprop'' command line option, or by adding ''{$optimization constprop}'' to your source file.
+
FUNCTION TStream.ReadRawByteString: RawByteString;
 +
FUNCTION TStream.ReadUnicodeString: UnicodeString;
 +
PROCEDURE TStream.WriteRawByteString (Const S: RawByteString);
 +
PROCEDURE TStream.WriteUnicodeString (Const S: UnicodeString);
 +
RawByteStrings are written to the stream as a 16-bit code page, followed by 32-bit length, followed by the string contents. UnicodeStrings are written as a 32-bit length (the number of 16-bit UTF-16 code units needed to encode the string), followed by the string itself in UTF-16.
 +
* '''git:''' 0b8a0fb4
  
==== Dead store elimination ====
+
==== Free Vision ====
* '''Overview''': The compiler can now, to a limited extent, remove stores to local variables and parameters if these values are not used before they are overwritten.
+
===== Unicode support =====
* '''Notes''': The use of this optimization requires that data flow analysis (-Oodfa) is enabled. It can help in particular with cleaning up instructions that have become useless due to constant propagation.
+
* '''Overview''': Unicode versions of the Free Vision units have been added.
* '''More information''': This optimization is currently not enabled by default at any optimization level because -Oodfa is still a work in progress. You can enable the optimization individually using the ''-Oodeadstore'' command line option, or by adding ''{$optimization deadstore}'' to your source file.
+
* '''Notes''': The Unicode versions of the units have the same name as their non-Unicode counterparts, but with an added 'U' prefix in the beginning of their name. For example, the Unicode version of the 'app' unit is 'uapp', the Unicode version of 'views' is 'uviews', etc. The Unicode versions of the units use the UnicodeString type, instead of shortstrings and pchars. Mixing Unicode and non-Unicode Free Vision units in the same program is not supported and will not work.
 +
* '''More information''': [[Free_Vision#Unicode_version]]
 +
* '''git:''' 0b8a0fb4
  
=== Units and packages ===
+
==== Video ====
==== TDBF support for Visual FoxPro files ====
+
===== Unicode output support =====
* '''Overview''': TDBf now has explicit support for Visual FoxPro (tablelevel 30) files, including the VarBinary and VarChar datatypes.
+
* '''Overview''': Unicode video buffer support has been added to the Video unit.
* '''Notes''': TDBF version increased to 7.0.0.
+
* '''Notes''': To use the Unicode video buffer, you must call InitEnhancedVideo instead of InitVideo and finalize the unit with DoneEnhancedVideo instead of DoneVideo. After initializing with InitEnhancedVideo, you must use the EnhancedVideoBuf array instead of VideoBuf. On non-Unicode operating systems, the Video unit will automatically translate Unicode characters to the console code page. This is done transparently to the user application, so new programs can always use EnhancedVideoBuf, without worrying about compatibility.
* '''More information''': The code does not support .dbc containers, only freestanding dbfs. It does not support (and quite likely will never support) .cdx index files.
+
* '''git:''' 0b8a0fb4
Additionally, TDBf is now included in the database test suite and has received several fixes (including better Visual FoxPro codepage support).
 
  
==== TODBCConnection (odbcconn) Support for 64 bit ODBC  ====
+
==== Keyboard ====
* '''Overview''': 64 bit ODBC support has been added.
+
===== Unicode keyboard input support =====
* '''Notes''': if you use unixODBC version 2.3 or higher on Linux/Unix, the unit has to be (re)compiled with -dODBCVER352 to enable 64 bit support
+
* '''Overview''': Unicode keyboard input support has been added to the Keyboard unit.
* '''More information''': Only tested on Windows and Linux.
+
* '''Notes''': After initializing the unit normally via InitKeyboard, you can obtain enhanced key events, which include Unicode character information, as well as an enhanced shift state. To get enhanced key events, use GetEnhancedKeyEvent or PollEnhancedKeyEvent. They return a TEnhancedKeyEvent, which is a record with these fields:
 +
  TEnhancedKeyEvent = record
 +
    VirtualKeyCode: Word;    { device-independent identifier of the key }
 +
    VirtualScanCode: Word;  { device-dependent value, generated by the keyboard }
 +
    UnicodeChar: WideChar;  { the translated Unicode character }
 +
    AsciiChar: Char;        { the translated ASCII character }
 +
    ShiftState: TEnhancedShiftState;
 +
    Flags: Byte;
 +
  end;
  
==== TZipper support for zip64 format ====
+
TEnhancedShiftState is a set of TEnhancedShiftStateElement, which is defined as:
* '''Overview''': TZipper now supports the zip64 extensions to the zip file format: > 65535 files and > 4GB file size (bug #23533). Related fixes also allow path/filenames > 255 characters.
+
  TEnhancedShiftStateElement = (
* '''Notes''': the zip64 format will automatically be used if the number or size of files involved exceed the limits of the old zip format. Zip64 is unrelated to the processor type/bitness (such as x86, x64, ...).
+
    essShift,            { either Left or Right Shift is pressed }
* '''More information''': More information on zip64: http://en.wikipedia.org/wiki/ZIP_%28file_format%29#ZIP64
+
    essLeftShift,
 +
    essRightShift,
 +
    essCtrl,              { either Left or Right Ctrl is pressed }
 +
    essLeftCtrl,
 +
    essRightCtrl,
 +
    essAlt,              { either Left or Right Alt is pressed, but *not* AltGr }
 +
    essLeftAlt,
 +
    essRightAlt,          { only on keyboard layouts, without AltGr }
 +
    essAltGr,            { only on keyboard layouts, with AltGr instead of Right Alt }
 +
    essCapsLockPressed,
 +
    essCapsLockOn,
 +
    essNumLockPressed,
 +
    essNumLockOn,
 +
    essScrollLockPressed,
 +
    essScrollLockOn
 +
  );
  
==== Multiple codepage and unicode support for most file-related RTL routines ====
+
A special value NilEnhancedKeyEvent is used to indicate no key event available in the result of PollEnhancedKeyEvent:
* '''Overview''': Most file-related routines from the ''system'' and ''sysutils'' units have been made codepage-aware: they now accept ansistrings encoded in arbitrary codepages as well as unicodestrings, and will convert these to the appropriate codepage before calling OS APIs.
+
  { The Nil value for the enhanced key event }
* '''Notes''': /
+
  NilEnhancedKeyEvent: TEnhancedKeyEvent = (
* '''More information''': [[FPC_Unicode_support#Current_support_via_merged_cpstrrtl_branch|Detailed list]] of all related changes to the RTL.
+
    VirtualKeyCode: 0;
 +
    VirtualScanCode: 0;
 +
    UnicodeChar: #0;
 +
    AsciiChar: #0;
 +
    ShiftState: [];
 +
    Flags: 0;
 +
  );
  
=== Tools and miscellaneous ===
+
* '''git:''' 0b8a0fb4
==== New ''Pas2jni'' utility  ====
 
* '''Overview''': The new ''pas2jni'' utility generates a JNI (Java Native Interface) bridge for Pascal code. This enables Pascal code (including classes and other advanced features) to be easily used from Java programs.
 
* '''Notes''': The following Pascal features are supported by pas2jni: function/procedure, var/out parameters, class, record, property, constant, enum, TGuid type, pointer type, string types, all numeric types
 
* '''More information''': /
 
  
== (Mac) OS X/iOS ==
+
== Darwin/macOS platforms ==
  
=== New ''iosxlocale'' unit ===
+
=== Support for symbolicating Dwarf backtraces ===
* '''Overview''': The new unit called ''iosxlocale'' can be used initialises the ''DefaultFormatSettings'' and other related locale information in the ''sysutils'' unit based on the settings in the (Mac) OS X ''System Preferences'' or the iOS ''Settings'' app.
+
* '''Overview''': The -gl option now works with DWARF debug information on Darwin. This is the default for non-PowerPC Darwin targets, and the only support format for ARM and 64 bit Darwin targets.
* '''Notes''': The ''clocale'' unit, which also works on (Mac) OS X and iOS, instead gets its information from the Unix-layer. This information depends on the contents of the ''LC_ALL'', ''LC_NUMERIC'' etc environment variables (see ''man locale'' for more information). Adding both ''clocale'' and ''iosxlocale'' to the uses clause will cause the second in line to overwrite the settings set by the first one.
+
* '''Notes''': You have to also use the -Xg command line option when compiling the main program or library, to generate a .dSYM bundle that contains all debug information. You can also do this manually by calling ''dsymutil''
* '''More information''': Adding this unit to the uses clause is enough to use its functionality.
+
* '''svn''': 49140
  
 
== New compiler targets ==
 
== New compiler targets ==
  
=== Support for the Java Virtual Machine and Dalvik targets ===
+
=== Support for code generation through LLVM ===
 +
* '''Overview''': The compiler now has a code generator that generates LLVM bitcode.
 +
* '''Notes''': LLVM still requires target-specific support and modifications in the compiler. Initially, the LLVM code generator only works when targeting Darwin/x86-64, Darwin/AArch64 (only macOS; iOS has not been tested), Linux/x86-64, Linux/ARMHF and Linux/AArch64.
 +
* '''More information''': [[LLVM]]
 +
* '''svn''': 42260
  
* '''Overview''': Support has been added for generating Java byte code as supported by the Java Virtual Machine and by the Dalvik (Android) virtual machine.
+
=== Support for address sanitizer (asan) through LLVM ===
* '''Notes''': Not all language features are supported for these targets.
+
* '''Overview''': The compiler allows to check code with the LLVM address sanitizer.
* '''More information''': [[FPC_JVM|The FPC JVM target]]
+
* '''Notes''': The LLVM address sanitizer is supported for all 64 bit targets supported by the LLVM code generator.
 +
* '''More information''':
 +
** [[LLVM]]
 +
** [https://en.wikipedia.org/wiki/AddressSanitizer Address Sanitizer on Wikipedia]
 +
* '''git''': [https://gitlab.com/freepascal.org/fpc/source/-/commit/403292a13151dbc265748d2119f9d1bd52fb9d54 403292a1]
  
=== Support for the AIX target ===
+
=== Support for the Z80 ===
 +
* '''Overview''': Support has been added for generating Z80 code.
 +
* '''More information''': [[Z80]]
  
* '''Overview''': Support has been added for the AIX operating system. Both PowerPC 32bit and 64bit are supported, except that at this time the resource compiler does not yet work for ppc64.
+
=== Support for the WebAssembly target ===
* '''Notes''': AIX 5.3 and later are supported.
+
* '''Overview''': Support has been added for generating WebAssembly code.
* '''More information''': [[FPC_AIX_Port|The FPC AIX port]]
+
* '''More information''': [[WebAssembly/Compiler]]
  
== See also ==
+
{{Navbar Lazarus Release Notes}}
*[[User Changes Trunk]]
 
  
 
[[Category:FPC New Features by release]]
 
[[Category:FPC New Features by release]]
 +
[[Category:Release Notes]]

Latest revision as of 21:28, 27 January 2024

About this page

Below you can find a list of new features introduced since the previous release, along with some background information and examples. Note that since svn trunk is by definition still under development, some of the features here may still change before they end up in a release version.

A list of changes that may break existing code can be found here.

All systems

Compiler

fpcres can compile RC files

  • Overview: The fpcres utility gained support for compiling RC files to RES files if the output format (parameter -of) is set to rc. The Free Pascal compiler itself can use fpcres instead of windres or gorc as well if the option -FF is supplied.
  • Notes: Using fpcres instead of windres or gorc will become default once a release with the new fpcres is released.
  • svn: 46398 (and others before and after that)

Language

Support for "volatile" intrinsic

  • Overview: A volatile intrinsic has been added to indicate to the code generator that a particular load from or store to a memory location must not be removed.
  • Notes:
    • Delphi uses an attribute rather than an intrinsic. Such support will be added once support for attributes is available in FPC. An intrinsic that applies only to a specific memory access also has the advantages outlined in https://lwn.net/Articles/233482/
    • Accesses to fixed absolute addresses (as common on DOS and embedded platforms) are automatically marked as volatile by the compiler.
  • Example: https://gitlab.com/freepascal.org/fpc/source/-/blob/main/tests/test/tmt1.pp
  • svn: 40465

Support for "noinline" modifier

  • Overview: A noinline modifier has been added that can be used to prevent a routine from ever being inlined (even by automatic inlining).
  • Notes: Mainly added for internal compiler usage related to LLVM support.
  • svn: 41198

Support for multiple active helpers per type

  • Overview: With the modeswitch multihelpers multiple helpers for a single type can be active at once. If a member of the type is accessed it's first checked in all helpers that are in scope in reverse order before the extended type itself is checked.
  • Examples: All tests with the name tmshlp*.pp in https://gitlab.com/freepascal.org/fpc/source/-/tree/main/tests/test
  • svn: 42026

Support for custom attributes

  • Overview: Custom attributes allow to decorate types and published properties of classes to be decorated with additional metadata. The metadata are by itself descendants of TCustomAttribute and can take additional parameters if the classes have a suitable constructor to take these parameters. This feature requires the new modeswitch PrefixedAttributes. This modeswitch is active by default in modes Delphi and DelphiUnicode. Attributes can be queried using the TypInfo or Rtti units.
  • Notes: More information can be seen in the announcement mail and Custom Attributes
  • svn: 42356 - 42411
  • Example:
program tcustomattr;

{$mode objfpc}{$H+}
{$modeswitch prefixedattributes}

type
  TMyAttribute = class(TCustomAttribute)
    constructor Create;
    constructor Create(aArg: String);
    constructor Create(aArg: TGUID);
    constructor Create(aArg: LongInt);
  end;

  {$M+}
  [TMyAttribute]
  TTestClass = class
  private
    fTest: LongInt;
  published
    [TMyAttribute('Test')]
    property Test: LongInt read fTest;
  end;
  {$M-}

  [TMyAttribute(1234)]
  [TMy('Hello World')]
  TTestEnum = (
    teOne,
    teTwo
  );

  [TMyAttribute(IInterface), TMy(42)]
  TLongInt = type LongInt;

constructor TMyAttribute.Create;
begin
end;

constructor TMyAttribute.Create(aArg: String);
begin
end;

constructor TMyAttribute.Create(aArg: LongInt);
begin
end;

constructor TMyAttribute.Create(aArg: TGUID);
begin
end;

begin

end.

Support for constant parameters in generics

  • Overview: Generic types and routines can now be declared with constants as parameters which function as untyped constants inside the generic. However these generic parameters have a type which allows the author of the generic to restrict the possible values for the constant. Only constant types that can also be used for untyped constants can be used.
  • Notes:
    • This feature is not Delphi compatible, but can be used in mode Delphi as well
    • More information is available in the announcement mail.
  • Examples: All tests with the name tgenconst*.pp in https://gitlab.com/freepascal.org/fpc/source/-/tree/main/tests/test
  • svn: 45080

Support for "IsConstValue" intrinsic

  • Overview: An IsConstValue intrinsic has been added to check whether a provided value is considered a constant value. This is mainly useful inside inlined functions to manually improve the generated code if a constant is encountered.
  • Notes:
    • This function returns a constant Boolean value and is Delphi compatible.
    • Typed constants are not considered constants (Delphi compatible and also compatible with the usual modus operandi regarding typed constants).
  • Example: https://gitlab.com/freepascal.org/fpc/source/-/tree/main/tests/test/tisconstvalue2.pp
  • svn: 45695

Copy supports Open Array parameters

  • Overview: The Copy intrinsic can now be used to copy (a part of) the contents of an open array parameter to a dynamic array.
  • Notes:
    • The result of the Copy function will have the type of a dynamic array with the same element type as the parameter that is copied from.
    • If the Start parameter is out of range the resulting dynamic array will be empty.
    • If the Count parameter is too large then the resulting dynamic array will only contain the elements that exist.
  • svn: 46890
  • Example:
procedure Test(aArg: array of LongInt);
var
  arr: array of LongInt;
begin
  arr := Copy(aArg, 3, 5);
end;

Array constructors for static arrays

  • Overview: Array constructors can be used to assign values to static arrays.
  • Notes:
    • The array constructor needs to have the same amount of elements as the static array.
    • The first element of the array constructor will be placed at the location of the first element of the static array (e.g. if the array starts at -1 the first element will be at that location).
    • Arrays with enumeration index are supported as well.
  • svn: 46891, 46901
  • Example: https://gitlab.com/freepascal.org/fpc/source/-/tree/main/tests/test/tarrconstr16.pp

"Align" modifier support for record definitions

  • Overview: It is now possible to add an Align X modifier at the end of a record definition to indicate that the record as a whole should be aligned to a particular boundary.
  • Notes:
    • Should be Delphi compatible, although documentation is not available ("semi-official" reference; the mentioned issue does not exist in the FPC implementation).
    • This does not influence the alignment of the individual fields, which are still aligned according to the current {$packrecords y}/{$align y} settings.
    • X can be 1, 2, 4, 8, 16, 32 or 64.
  • svn: 47892
  • Example: https://gitlab.com/freepascal.org/fpc/source/-/blob/main/tests/webtbs/tw28927.pp

Support for binary literals in Delphi mode

  • Overview: It is now possible to use binary literals ('%' as prefix) in Delphi mode.
  • Notes: Delphi compatibility.
  • GitLab issue: #39503
  • Example:
{$mode Delphi}
var
  b: byte;
begin
  b:=%11001001;
end.

Support for Digit Separator

  • Overview: It is now possible to use the Digit Separator ('_') with the underscoreisseparator modeswitch. It is also enabled by default in Delphi mode.
  • Notes: Delphi compatibility.
  • GitLab issue: #39504
  • Example:
{$mode Delphi}
var
  i: Integer;
  r: Real;
begin
  i := %1001_1001;
  i := &121_102;
  i := 1_123_123;
  i := $1_123_123;  
  r := 1_123_123.000_000;
  r := 1_123_123.000_000e1_2;
end.

Support for forward declarations of generic types

  • Overview: It is now possible to use forward declarations for generic classes and interfaces like is possible for non-generic classes and interfaces.
  • Notes:
    • Generic type constraints and const declarations need to be used for both the forward and the final implementation like is necessary for global generic routines.
    • This is Delphi-compatible.
  • Commit: 2a502350
  • Example:
{$mode objfpc}
type
  generic TTest<T> = class;
  generic TFoo<T: class> = class;
  generic TBar<const N: LongInt> = class;

  TSomething = class
    fTest: specialize TTest<LongInt>;
    fFoo: specialize TFoo<TObject>;
    fBar: specialize TBar<42>;
  end;

  generic TTest<T> = class end;
  generic TFoo<T: class> = class end;
  generic TBar<const N: LongInt> = class end;

begin
end.

Support for Function References and Anonymous Functions

  • Function References: Function References (also applicable names are Procedure References and Routine References, in the following only Function References will be used) are types that can take a function (or procedure or routine), method, function variable (or procedure variable or routine variable), method variable, nested function (or nested procedure or nested routine) or an anonymous function (or anonymous procedure or anonymous routine) as a value. The function reference can then be used to call the provided function just like other similar routine pointer types. In contrast to these other types nearly all function-like constructs can be assigned to it (the only exception are nested function variables (or nested procedure variables or nested routine variables), more about that later on) and then used or stored.
  • Anonymous Functions: Anonymous Functions (or Anonymous Procedures or Anonymous Routines, in the following simply Anonymous Functions) are routines that have no name associated with them and are declared in the middle of a code block (for example on the right side of an expression or as a parameter for a function call). However they can just as well be called directly like a nested function (or nested procedure or nested routine) would.
  • More Information and Examples: Feature announcement: Function References and Anonymous Functions
  • GitLab Issue: #24481

Descendant type helpers can extend type aliases

  • Overview: A type helper that descends from another type helper can now extend a unique type alias of the type the inherited type helper extends. This way a type helper for the original type can be made available for the type alias as well.
  • Notes:
    • The type alias the descendant extends does not need to be a direct type alias of the parent's extended type.
    • The other way around is not allowed: a type helper that inherits from another helper which extends a unique type alias can not extend the base type.
  • Example: See the test for the feature.
  • Commit: 7133ad7e

Support for Unicode RTL

  • Overview: The Unicode RTL is required for Delphi 2009+ compatibility. This also includes support for dotted filenames like System.SysUtils
  • Notes: FPC Unicode RTL.
  • fpc-devel Mailinglist announcement: Unicode RTL

Support for Extended RTTI

  • Overview: Extended RTTI includes the for $RTTI directive, generating RTTI metadata for all fields, methods and properties and allowing the access of the RTTI metadata via TypInfo and RTTI unit.
  • Notes: Delphi 2010+ compatibility.
  • GitLab issue: #38964
  • Commit: 7eea8507..a9846283

Units

DaemonApp

Additional control codes on Windows
  • Overview: Windows allows a service to request additional control codes to be received. For example if the session of the user changed. These might also carry additional parameters that need to be passed along to the TDaemon instance. For this the WinBindings class of the TDaemonDef now has an additional AcceptedCodes field (which is a set) that allows to define which additional codes should be requested. Then the daemon should handle the OnControlCodeEvent event handler which in contrast to the existing OnControlCode handler takes two additional parameters that carry the parameters that the function described for MSDNs LPHANDLER_FUNCTION_EX takes as well.
  • Notes: This lead to slight incompatibilities which are mentioned in User Changes Trunk
  • svn: 46326, 46327

Classes

Naming of Threads
  • Overview: TThread.NameThreadForDebugging has been implemented for macOS.
  • Notes: Delphi compatible, was already implemented for Windows, Linux and Android and finally for macOS now. Read documentation as every platform has its own restrictions.
  • svn: 49323

Objects

TRawByteStringCollection
  • Overview: A new object type TRawByteStringCollection, similar to TStringCollection, but works with RawByteString/AnsiString
  • git: 0b8a0fb4
TUnicodeStringCollection
  • Overview: A new object type TUnicodeStringCollection, similar to TStringCollection, but works with UnicodeString
  • git: 0b8a0fb4
TStream methods for reading and writing RawByteString and UnicodeString
  • Overview: New methods have been added to TStream for reading and writing RawByteString/AnsiString and UnicodeString types.
  • Notes: The following methods have been added:
FUNCTION TStream.ReadRawByteString: RawByteString;
FUNCTION TStream.ReadUnicodeString: UnicodeString;
PROCEDURE TStream.WriteRawByteString (Const S: RawByteString);
PROCEDURE TStream.WriteUnicodeString (Const S: UnicodeString);

RawByteStrings are written to the stream as a 16-bit code page, followed by 32-bit length, followed by the string contents. UnicodeStrings are written as a 32-bit length (the number of 16-bit UTF-16 code units needed to encode the string), followed by the string itself in UTF-16.

  • git: 0b8a0fb4

Free Vision

Unicode support
  • Overview: Unicode versions of the Free Vision units have been added.
  • Notes: The Unicode versions of the units have the same name as their non-Unicode counterparts, but with an added 'U' prefix in the beginning of their name. For example, the Unicode version of the 'app' unit is 'uapp', the Unicode version of 'views' is 'uviews', etc. The Unicode versions of the units use the UnicodeString type, instead of shortstrings and pchars. Mixing Unicode and non-Unicode Free Vision units in the same program is not supported and will not work.
  • More information: Free_Vision#Unicode_version
  • git: 0b8a0fb4

Video

Unicode output support
  • Overview: Unicode video buffer support has been added to the Video unit.
  • Notes: To use the Unicode video buffer, you must call InitEnhancedVideo instead of InitVideo and finalize the unit with DoneEnhancedVideo instead of DoneVideo. After initializing with InitEnhancedVideo, you must use the EnhancedVideoBuf array instead of VideoBuf. On non-Unicode operating systems, the Video unit will automatically translate Unicode characters to the console code page. This is done transparently to the user application, so new programs can always use EnhancedVideoBuf, without worrying about compatibility.
  • git: 0b8a0fb4

Keyboard

Unicode keyboard input support
  • Overview: Unicode keyboard input support has been added to the Keyboard unit.
  • Notes: After initializing the unit normally via InitKeyboard, you can obtain enhanced key events, which include Unicode character information, as well as an enhanced shift state. To get enhanced key events, use GetEnhancedKeyEvent or PollEnhancedKeyEvent. They return a TEnhancedKeyEvent, which is a record with these fields:
 TEnhancedKeyEvent = record
   VirtualKeyCode: Word;    { device-independent identifier of the key }
   VirtualScanCode: Word;   { device-dependent value, generated by the keyboard }
   UnicodeChar: WideChar;   { the translated Unicode character }
   AsciiChar: Char;         { the translated ASCII character }
   ShiftState: TEnhancedShiftState;
   Flags: Byte;
 end;

TEnhancedShiftState is a set of TEnhancedShiftStateElement, which is defined as:

 TEnhancedShiftStateElement = (
   essShift,             { either Left or Right Shift is pressed }
   essLeftShift,
   essRightShift,
   essCtrl,              { either Left or Right Ctrl is pressed }
   essLeftCtrl,
   essRightCtrl,
   essAlt,               { either Left or Right Alt is pressed, but *not* AltGr }
   essLeftAlt,
   essRightAlt,          { only on keyboard layouts, without AltGr }
   essAltGr,             { only on keyboard layouts, with AltGr instead of Right Alt }
   essCapsLockPressed,
   essCapsLockOn,
   essNumLockPressed,
   essNumLockOn,
   essScrollLockPressed,
   essScrollLockOn
 );

A special value NilEnhancedKeyEvent is used to indicate no key event available in the result of PollEnhancedKeyEvent:

 { The Nil value for the enhanced key event }
 NilEnhancedKeyEvent: TEnhancedKeyEvent = (
   VirtualKeyCode: 0;
   VirtualScanCode: 0;
   UnicodeChar: #0;
   AsciiChar: #0;
   ShiftState: [];
   Flags: 0;
 );
  • git: 0b8a0fb4

Darwin/macOS platforms

Support for symbolicating Dwarf backtraces

  • Overview: The -gl option now works with DWARF debug information on Darwin. This is the default for non-PowerPC Darwin targets, and the only support format for ARM and 64 bit Darwin targets.
  • Notes: You have to also use the -Xg command line option when compiling the main program or library, to generate a .dSYM bundle that contains all debug information. You can also do this manually by calling dsymutil
  • svn: 49140

New compiler targets

Support for code generation through LLVM

  • Overview: The compiler now has a code generator that generates LLVM bitcode.
  • Notes: LLVM still requires target-specific support and modifications in the compiler. Initially, the LLVM code generator only works when targeting Darwin/x86-64, Darwin/AArch64 (only macOS; iOS has not been tested), Linux/x86-64, Linux/ARMHF and Linux/AArch64.
  • More information: LLVM
  • svn: 42260

Support for address sanitizer (asan) through LLVM

  • Overview: The compiler allows to check code with the LLVM address sanitizer.
  • Notes: The LLVM address sanitizer is supported for all 64 bit targets supported by the LLVM code generator.
  • More information:
  • git: 403292a1

Support for the Z80

  • Overview: Support has been added for generating Z80 code.
  • More information: Z80

Support for the WebAssembly target

  • Overview: Support has been added for generating WebAssembly code.
  • More information: WebAssembly/Compiler