Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-15 Thread Sven Barth
Am 15.12.2016 09:53 schrieb "Maciej Izak" : > > > 2016-12-14 20:06 GMT+01:00 Sven Barth : >> >> I found the "problem": write_rtti_ref() will always write an indirect >> reference (which is by design), so I adjusted the code that it will >> really

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-15 Thread Maciej Izak
2016-12-14 20:06 GMT+01:00 Sven Barth : > I found the "problem": write_rtti_ref() will always write an indirect > reference (which is by design), so I adjusted the code that it will > really write a direct one. Bye, bye, one level of indirection ;) > ^_^ but... I

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-14 Thread Sven Barth
On 14.12.2016 13:09, Maciej Izak wrote: > > 2016-12-14 11:17 GMT+01:00 Sven Barth >: > > It should be a Pointer of course, not a PPointer... I will correct > that later on (I shouldn't commit code that late -.- ). > > So

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-14 Thread Sven Barth
Am 14.12.2016 13:09 schrieb "Maciej Izak" : > > > 2016-12-14 11:17 GMT+01:00 Sven Barth : >> >> It should be a Pointer of course, not a PPointer... I will correct that later on (I shouldn't commit code that late -.- ). > > So I will wait again ^^

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-14 Thread Maciej Izak
2016-12-14 11:17 GMT+01:00 Sven Barth : > It should be a Pointer of course, not a PPointer... I will correct that > later on (I shouldn't commit code that late -.- ). > > So I will wait again ^^ > PPU version is only increased if the structure of the PPU file is

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-14 Thread Sven Barth
Am 14.12.2016 10:00 schrieb "Maciej Izak" : > > 2016-12-14 0:16 GMT+01:00 Sven Barth : >> >> At least the patch as is (with PPointer) didn't trigger anything on Win64... > > Will it stay as PPointer (PPRecInitTable)? I am wondering why we have bug

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-14 Thread Maciej Izak
2016-12-14 0:16 GMT+01:00 Sven Barth : > At least the patch as is (with PPointer) didn't trigger anything on > Win64... > > Will it stay as PPointer (PPRecInitTable)? I am wondering why we have bug (or expected behavior?) for this. > Committed with a few

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-13 Thread Sven Barth
Am 13.12.2016 14:43 schrieb "Maciej Izak" : > > > 2016-12-13 14:31 GMT+01:00 Sven Barth : >> >> No idea. But I have a couple of platforms to test this on myself :) (x86_64-win64, i386-win32, powerpc-darwin, i386-linux, x86_64-linux, arm-linux,

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-13 Thread Maciej Izak
2016-12-13 14:31 GMT+01:00 Sven Barth : > No idea. But I have a couple of platforms to test this on myself :) > (x86_64-win64, i386-win32, powerpc-darwin, i386-linux, x86_64-linux, > arm-linux, m68k-linux > It is easy to reproduce with PRecInitTable. You can play with

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-13 Thread Sven Barth
Am 13.12.2016 11:34 schrieb "Maciej Izak" : >> Okay, I think we can indeed go with this aside from one small remark: the double indirection for Pointers is only needed if data resides in different units as those might be in different dynamic packages. Since the INIT and FULL

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-13 Thread Maciej Izak
2016-12-13 11:09 GMT+01:00 Sven Barth : > Comment regarding your previous mail: right, I forgot that due to > InitializeArray() and FinalizeArray() being publicly available version of > the internal helpers we either need to keep INIT and FULL RTTI in sync or a > way

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-13 Thread Sven Barth
Am 13.12.2016 09:22 schrieb "Maciej Izak" : > > > 2016-12-12 23:14 GMT+01:00 Maciej Izak : >> >> With second iteration we could add your modifications, I have no other objections. > Comment regarding your previous mail: right, I forgot that due to

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-13 Thread Maciej Izak
2016-12-12 23:14 GMT+01:00 Maciej Izak : > With second iteration we could add your modifications, I have no other > objections. New day new ideas :) With my patch we don't really need ManagedFieldCount, ManagedFields, ManagedFieldTable in TTypeData (each of Managed* can

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-12 Thread Maciej Izak
2016-12-12 20:41 GMT+01:00 Sven Barth : > So, my own idea for this. First insight looks good (kudos for union with "deprecated field" ^^) and we don't have redundant info, but sorry it can't work in presented form. With your changes INIT RTTI is incompatible with

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-12 Thread Sven Barth
On 09.12.2016 22:57, Maciej Izak wrote: > Hi, > > thanks Sven, finally we have initial RTTI.pas version on trunk. Let me > start with first serious issue and eventually patch: > > function IsManaged(TypeInfo: PTypeInfo): boolean; > > IsManaged can't work with records because we need know

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-12 Thread Maciej Izak
2016-12-12 15:53 GMT+01:00 Maciej Izak : > Field: TManagedField; // :\ a little redundant info (we have this info > also in TotalFields, but we need to deal with $RTTI EXPLICIT) To save memory I think we can use FieldIndex: Integer (instead of Field: TManagedField).

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-12 Thread Maciej Izak
2016-12-12 13:32 GMT+01:00 Maciej Izak : > Status of #31102 is unclear. I need clear response about ManagedFldCount > to decide how to do it - as part of FPC or NewPascal or some mixed way to > keep compatibility as much as possible (in NewPascal for sure I will > correct

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-12 Thread Maciej Izak
2016-12-12 13:07 GMT+01:00 silvioprog : > Could you do that please? :-) Status of #31102 is unclear. I need clear response about ManagedFldCount to decide how to do it - as part of FPC or NewPascal or some mixed way to keep compatibility as much as possible (in NewPascal

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-12 Thread silvioprog
On Mon, Dec 12, 2016 at 4:52 AM, Maciej Izak wrote: > > 2016-12-11 13:18 GMT+01:00 Maciej Izak : > >> http://bugs.freepascal.org/view.php?id=31102 > > > I can provide proper patch for #31102 and for #31108 (for fields part). > Could you do that please?

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-11 Thread Maciej Izak
2016-12-11 13:18 GMT+01:00 Maciej Izak : > http://bugs.freepascal.org/view.php?id=31102 I can provide proper patch for #31102 and for #31108 (for fields part). TotalFieldCount seems redundant (finally we have in conception RecFldCnt), we could point deprecated

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-11 Thread Maciej Izak
2016-12-10 0:54 GMT+01:00 Sven Barth : > We rename ManagedFldCount to TotalFieldCount, add a field > ManagedFieldCount and a property ManagedFldCount that returns > TotalFieldCount for backwards compatibility (and maybe marked as > deprecated). > I've created new bug

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-10 Thread Maciej Izak
10.12.2016 00:54 "Sven Barth": We rename ManagedFldCount to TotalFieldCount, add a field ManagedFieldCount and a property ManagedFldCount that returns TotalFieldCount for backwards compatibility (and maybe marked as deprecated). Looks almost like point 4. We need also to adjust ManagedFields.

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-09 Thread Sven Barth
On 09.12.2016 22:57, Maciej Izak wrote: > Hi, > > thanks Sven, finally we have initial RTTI.pas version on trunk. Let me > start with first serious issue and eventually patch: > > function IsManaged(TypeInfo: PTypeInfo): boolean; > > IsManaged can't work with records because we need know

Re: [fpc-devel] RTTI module and "IsManaged" critical problem

2016-12-09 Thread Maciej Izak
5. Super slowly checking for each field in ManagedFields, and eventually new checking for each record in ManagedFields... I am so sad that I need to post this point :\ -- Best regards, Maciej Izak ___ fpc-devel maillist -