[fpc-devel] Minor request with case else branches

2019-05-24 Thread J. Gareth Moreton
Hi everyone, Since the mandatory else section for case blocks isn't going anywhere, I would like to make a small request: Whenever I come across a section of code in my own projects where "*else *;" is necessary, or any empty branch for that matter, I put a "{ Do nothing }" comment just to m

Re: [fpc-devel] Class management operators

2019-05-24 Thread Sven Barth via fpc-devel
Ryan Joseph schrieb am Fr., 24. Mai 2019, 22:26: > > > > On May 24, 2019, at 1:17 PM, Sven Barth via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > > > > This is not desired, because it would mean that for *all* assignments > between *any* class type it must be at least checked for manage

Re: [fpc-devel] Class management operators

2019-05-24 Thread Ryan Joseph
> On May 24, 2019, at 1:17 PM, Sven Barth via fpc-devel > wrote: > > This is not desired, because it would mean that for *all* assignments between > *any* class type it must be at least checked for management operators or it > must be forbidden that a class type with management operators can

Re: [fpc-devel] [PATCH] Add support for Hygon Dhyana processor

2019-05-24 Thread Ralf Quint
On 5/23/2019 2:10 AM, Jinke Fan wrote: Hi, This patch adds vendor id detection for Hygon Dhyana CPUs. Could anyone help me with submit it? More details can be found on: http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.pu...@hygon.cn Why would this be needed

Re: [fpc-devel] Class management operators

2019-05-24 Thread Sven Barth via fpc-devel
Ryan Joseph schrieb am Fr., 24. Mai 2019, 17:43: > Another thing I forget to mention. Since I was looking at management > operator stuff in the compiler I was curious, why don’t classes support > management operators? The infrastructure is already there for built-in > reference types like dynamic

Re: [fpc-devel] [PATCH] Add support for Hygon Dhyana processor

2019-05-24 Thread wkitty42
On 5/23/19 5:10 AM, Jinke Fan wrote: { return base type of processor: 0 - is Unknown, 10 - is AMD (AuthenticAMD), } +{10 - is Hygon (HygonGenuine) } is there a problem here? AMD and Hygon are both listed as 10... {

Re: [fpc-devel] Class management operators

2019-05-24 Thread Ryan Joseph
> On May 24, 2019, at 10:44 AM, Anthony Walter wrote: > > Ryan, I believe the compiler already has management support for complex > types. That is for BOTH records and classes. All that is required is you have > a supported version of the compiler and you add the sugar in the form of > AddRe

Re: [fpc-devel] Class management operators

2019-05-24 Thread Anthony Walter
Ryan, I believe the compiler already has management support for complex types. That is for BOTH records and classes. All that is required is you have a supported version of the compiler and you add the sugar in the form of AddRef, Initialize, and Finalize. See this page for more information: http:

[fpc-devel] Class management operators

2019-05-24 Thread Ryan Joseph
Another thing I forget to mention. Since I was looking at management operator stuff in the compiler I was curious, why don’t classes support management operators? The infrastructure is already there for built-in reference types like dynamic arrays/ansistring’s so it would be relatively trivial t

Re: [fpc-devel] Object upgrades

2019-05-24 Thread Sven Barth via fpc-devel
Ryan Joseph schrieb am Fr., 24. Mai 2019, 01:20: > I’m doing some work to upgrade old-style objects including class > operators/management operators and better construction. > Please don't. They're legacy types (even though we don't consider them obsolete) and geared towards the TP behavior and