Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-11 Thread Yuriy Sydorov via fpc-pascal
On 11.03.2021 1:43, Karoly Balogh via fpc-pascal wrote: Hi, On Wed, 10 Mar 2021, Yuriy Sydorov via fpc-pascal wrote: Neither parameter may be necessary on Windows, but that's probably the only one. Android and MS-DOS targets also ignore -CX -XX * when using the internal l

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Yuriy Sydorov via fpc-pascal
On 10.03.2021 14:29, Jonas Maebe via fpc-pascal wrote: On 10/03/2021 13:17, Yuriy Sydorov via fpc-pascal wrote: On 10.03.2021 11:34, LacaK via fpc-pascal wrote: A.) I compile my (units) program/library with -CX -XX (set in Project Options) Just a small note: -CX -XX are not needed for the

Re: [fpc-pascal] Smart-linking versus Whole Program Optimization

2021-03-10 Thread Yuriy Sydorov via fpc-pascal
On 10.03.2021 11:34, LacaK via fpc-pascal wrote: A.) I compile my (units) program/library with -CX -XX (set in Project Options) Just a small note: -CX -XX are not needed for the top-tier targets nowadays. The section based smart linking is a default option in recent FPC versions. Yuriy. _

Re: [fpc-pascal] Question about System.Move()

2021-01-09 Thread Yuriy Sydorov via fpc-pascal
On 09.01.2021 19:23, Bart via fpc-pascal wrote: On Sat, Jan 9, 2021 at 5:12 PM Yuriy Sydorov via fpc-pascal wrote: 2. Is it OK if the elements of the array are (or contain) managed types? You need to manually finalize/free elements which are overwritten before calling Move. So, if I move

Re: [fpc-pascal] Question about System.Move()

2021-01-09 Thread Yuriy Sydorov via fpc-pascal
On 09.01.2021 17:28, Bart via fpc-pascal wrote: This may be a silly question. I use System.Move() to move items in a dynamic array, like Move(FData[0], FData[OldEnd], FStart*SizeOf(T)); Where T is the type of the elements in the array. This seems to work as expected. I have some questions tho

Re: [fpc-pascal] Best start point for adding new FPC target

2020-01-28 Thread Yuriy Sydorov
On 28.01.2020 21:14, Fabio Luis Girardi via fpc-pascal wrote: Em ter., 28 de jan. de 2020 às 16:04, Yuriy Sydorov mailto:j...@cp-lab.com>> escreveu: You need to add support of a new CPU to the existing freebsd target. The target would be arm-freebsd, since armhf is not treate

Re: [fpc-pascal] Best start point for adding new FPC target

2020-01-28 Thread Yuriy Sydorov
On 28.01.2020 19:08, Fabio Luis Girardi via fpc-pascal wrote: I'm studying how to add a new target for the Freepascal compiler. The target is the missing armhf-FreeBSD. So I have looked at FPC guide (https://wiki.freepascal.org/Porting_Free_Pascal#Adding_a_new_target) and looking at Overview sec

Re: [fpc-pascal] Very vague gettickcount64 description?

2019-09-08 Thread Yuriy Sydorov
On 08.09.2019 13:42, Michael Van Canneyt wrote: On Sun, 8 Sep 2019, Yuriy Sydorov wrote: Strictly defined measurement units are important for cross-platform (and Delphi) compatibility. So GetTickCount_2 - GetTickCount_1 must return how many milliseconds have elapsed between calls of

Re: [fpc-pascal] Very vague gettickcount64 description?

2019-09-08 Thread Yuriy Sydorov
On 08.09.2019 10:09, Michael Van Canneyt wrote: On Sat, 7 Sep 2019, Zoe Peterson wrote: From: Martin Frb But that does not mean, it needs to be changed on existing targets. And if it is not going to be changed, then it can be documented. I agree with everything Martin has said, though IMO

Re: [fpc-pascal] Very vague gettickcount64 description?

2019-09-06 Thread Yuriy Sydorov
On 06.09.2019 17:06, Tomas Hajny wrote: The documentation is vague on purpose - due to the variety of platforms supported by FPC and the low-level nature of GetTickCount, we do not want to guarantee specific units (GetTickCount is supposed to be supported directly by the platform rather than hav

Re: [fpc-pascal] Error: Local variables size exceeds supported limit

2019-03-10 Thread Yuriy Sydorov
On 10.03.2019 13:48, Jonas Maebe wrote: On 10/03/2019 11:40, Yuriy Sydorov wrote: If I recall correctly, currently the compiler uses longints as stack offsets internally in several places. That's why the limit is 2GB even for 64-bit targets. That would be compiler bugs that need to be

Re: [fpc-pascal] Error: Local variables size exceeds supported limit

2019-03-10 Thread Yuriy Sydorov
On 10.03.2019 12:07, Jonas Maebe wrote: On 2019-03-10 10:22, Yuriy Sydorov wrote: FYI on 64-bit Windows the stack size limit is hard coded to 1GB. The same 1GB limit applies on 32-bit Windows. Probably Linux can be configured for larger stack. Linux needs to be specially configured to forbid

Re: [fpc-pascal] Error: Local variables size exceeds supported limit

2019-03-10 Thread Yuriy Sydorov
On 09.03.2019 14:06, Fabio Luis Girardi wrote: The datatype that throws this error is this (cef3types.pas:2416): TCefCompositionUnderlineArray = array[0..(High(Integer) div SizeOf(TCefCompositionUnderline)) - 1] of TCefCompositionUnderline; The TCefCompositionUnderline is a record with 20 byt

Re: [fpc-pascal] Error: Local variables size exceeds supported limit

2019-03-10 Thread Yuriy Sydorov
On 09.03.2019 14:33, Jonas Maebe wrote: On 09/03/2019 13:06, Fabio Luis Girardi wrote: Thanks by your feedback. Do you think that should I fill a bug report? That's up to you. I think that 2GB on 64 bits a very conservative limit. 2GB stack space on is very large on any platform. Normally

Re: [fpc-pascal] Error: Local variables size exceeds supported limit

2019-03-08 Thread Yuriy Sydorov
On 07.03.2019 22:32, Fabio Luis Girardi wrote: Hi All! I'm trying to use the FPC 3.2.0 beta + Lazarus 2.0.1 with fpCEF3. But when I try compile this package with FPC 3.2.0 I got this error: Error: Local variables size exceeds supported limit It would be helpful if you provide a code snippet

Re: [fpc-pascal] SetLength warnings - request

2018-12-29 Thread Yuriy Sydorov
On 29.12.2018 16:19, Benito van der Zander wrote: Hi, even if there's closed issue https://bugs.freepascal.org/view.php?id=34169 I would like to ask if it can be reconsidered. The subject is that SetLength now gives warning: Variable "dynamic array" of a managed type does not seem to be init

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-13 Thread Yuriy Sydorov
On 12/13/2018 1:06 PM, Martin wrote: Is there a way to use FreeOnTerminate other that setting it in the constructor (or before the thread starts / or in the rather complex manner below)? The doc does not mention any limitations https://www.freepascal.org/docs-html/rtl/classes/tthread.freeonter

Re: [fpc-pascal] pas2jni issues

2018-11-05 Thread Yuriy Sydorov
On 11/4/2018 9:54 PM, kst...@gmail.com wrote: Hello, I would like to make a suggestion regarding the generated code of the pas2jni utility, and report an issue. I answered to your original message. It seems you did not receive the answer. Yuriy. ___

Re: [fpc-pascal] pas2jni issues

2018-11-03 Thread Yuriy Sydorov
On 10/31/2018 3:23 PM, kst...@gmail.com wrote: I would like to make a suggestion regarding the generated code of the pas2jni utility, and report an issue. This utility generates a java file called system.java. First thing is that there is a reference to TClass which is a non-existent Java class: