* arm: Re-enabled "inline" on "fpc_ansistr_decr_ref" and "fpc_ansistr_incr_ref".

This commit is contained in:
J. Gareth "Curious Kit" Moreton 2024-05-22 01:20:53 +01:00
parent 2519f42854
commit d729d5a5b1

View File

@ -302,15 +302,10 @@ Function fpc_Val_smallint_UnicodeStr (Const S : UnicodeString; out Code : ValSIn
{$endif CPU16 or CPU8} {$endif CPU16 or CPU8}
{$ifdef FPC_HAS_FEATURE_ANSISTRINGS} {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
{ There is a glitch in the compiler (present in FPC 3.2.2 and beyond) that { A glitch in FPC 3.2.2 prevents inline from working properly here on
prevents these two subroutines from working properly with the inline ARM (causes a dangling pointer and hence heap corrpution). }
directive under ARM. This is almost certainly related to the fact that the Procedure fpc_ansistr_decr_ref (Var S : Pointer); compilerproc; {$if FPC_FULLVERSION>30202}inline;{$ifend}
implementation is a pure assembler routine. Procedure fpc_ansistr_incr_ref (S : Pointer); compilerproc; {$if FPC_FULLVERSION>30202}inline;{$ifend}
TODO: Actually fix the compiler bug rather than avoid triggering it. [Kit]
}
Procedure fpc_ansistr_decr_ref (Var S : Pointer); compilerproc; {$ifndef arm}inline;{$endif not arm}
Procedure fpc_ansistr_incr_ref (S : Pointer); compilerproc; {$ifndef arm}inline;{$endif not arm}
Procedure fpc_AnsiStr_Assign (Var DestS : Pointer;S2 : Pointer); compilerproc; Procedure fpc_AnsiStr_Assign (Var DestS : Pointer;S2 : Pointer); compilerproc;
Procedure fpc_AnsiStr_Concat (Var DestS : RawByteString;const S1,S2 : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING}); compilerproc; Procedure fpc_AnsiStr_Concat (Var DestS : RawByteString;const S1,S2 : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING}); compilerproc;
Procedure fpc_AnsiStr_Concat_multi (Var DestS : RawByteString;const sarr:array of RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING}); compilerproc; Procedure fpc_AnsiStr_Concat_multi (Var DestS : RawByteString;const sarr:array of RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING}); compilerproc;