Re: [fpc-devel] Status report for class helpers

2013-05-17 Thread Sven Barth
Am 29.01.2011 21:30, schrieb Florian Klämpfl: Am 29.01.2011 19:04, schrieb Paul Ishenin: 30.01.2011 0:50, Sven Barth wrote: Should I add the flag set to TSymtable or tstoredsymtable? (only the latter can write/save itself to ppu) I would add it to TSymTable. I really wonder that symtables

Re: [fpc-devel] Status report for class helpers

2011-01-31 Thread Sven Barth
Am 31.01.2011 00:57, schrieb Paul Ishenin: 31.01.2011 0:26, Sven Barth wrote: Timings without that change: Run 1: real 1m3.461s user 0m45.957s sys 0m4.590s Timings with that change: Run 1: real 1m8.919s user 0m46.597s sys 0m4.166s But previously you gave 2 minutes values. Yes, I found

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Hans-Peter Diettrich
Paul Ishenin schrieb: For some reason the visibility is completely ignored here. I can add a class helper to the strict private or even move it to another unit - it is always visible. IMO class helper methods always should become visible as part of the class, regardless of where they are

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Sven Barth
On 30.01.2011 09:03, Hans-Peter Diettrich wrote: Paul Ishenin schrieb: For some reason the visibility is completely ignored here. I can add a class helper to the strict private or even move it to another unit - it is always visible. IMO class helper methods always should become visible as

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Sven Barth
On 30.01.2011 04:30, Paul Ishenin wrote: 30.01.2011 5:22, Sven Barth wrote: Ok, I have now implemented a set of flags in TSymtable of which one is set when the (global-,static-)symtable contains a class helper (I haven't refactored b_needs_init_final yet). Here are the new results with the

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Paul Ishenin
30.01.2011 15:45, Sven Barth wrote: Imo it works much better now. Only one minute slower in the complete run instead of four. I let you guys decide whether this is good enough ^^ 2m22.980s - 2m15.362s = 0m7.xxxs - were is a minute? How often is the compiler compiled completly during a make

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Sven Barth
On 30.01.2011 09:55, Paul Ishenin wrote: 30.01.2011 15:45, Sven Barth wrote: Imo it works much better now. Only one minute slower in the complete run instead of four. I let you guys decide whether this is good enough ^^ 2m22.980s - 2m15.362s = 0m7.xxxs - were is a minute? That was two runs

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Sven Barth
On 29.01.2011 23:22, Sven Barth wrote: Ok, I have now implemented a set of flags in TSymtable of which one is set when the (global-,static-)symtable contains a class helper (I haven't refactored b_needs_init_final yet). I have commited the changes now as well (I was too tired yesterday), so

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Paul Ishenin
30.01.2011 16:22, Sven Barth wrote: I have commited the changes now as well (I was too tired yesterday), so please fell free to critize them (especially the ones in ppudump) as I need to build on on these changes regarding b_needs_init_final (or should this wait until everything is merged back

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Paul Ishenin
30.01.2011 16:22, Sven Barth wrote: I have commited the changes now as well (I was too tired yesterday), so please fell free to critize them (especially the ones in ppudump). Why do you need ibsymtableoptions ? Best regards, Paul Ishenin ___

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Sven Barth
On 30.01.2011 11:30, Paul Ishenin wrote: 30.01.2011 16:22, Sven Barth wrote: I have commited the changes now as well (I was too tired yesterday), so please fell free to critize them (especially the ones in ppudump). Why do you need ibsymtableoptions ? tstoredsymtable stores only definitions

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Jonas Maebe
On 30 Jan 2011, at 09:45, Sven Barth wrote: Only one minute slower in the complete run instead of four. I let you guys decide whether this is good enough ^^ It's still a lot of overhead. An alternative solution could be to add a hashtable (tfphaslist) to tmodule whose entries are hashed on

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Florian Klämpfl
Am 29.01.2011 23:22, schrieb Sven Barth: Here are the new results with the search for class helpers enabled (only two runs this time): Run 1: real2m22.980s user0m47.140s sys0m4.333s Run 2: real2m15.362s user0m47.274s sys0m4.140s With which times are those

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Sven Barth
On 30.01.2011 12:13, Florian Klämpfl wrote: Am 30.01.2011 09:45, schrieb Sven Barth: On 30.01.2011 04:30, Paul Ishenin wrote: 30.01.2011 5:22, Sven Barth wrote: Ok, I have now implemented a set of flags in TSymtable of which one is set when the (global-,static-)symtable contains a class

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Sven Barth
On 30.01.2011 12:06, Jonas Maebe wrote: On 30 Jan 2011, at 09:45, Sven Barth wrote: Only one minute slower in the complete run instead of four. I let you guys decide whether this is good enough ^^ It's still a lot of overhead. Yes and that's why I'm thankful for every suggestion I can

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Paul Ishenin
30.01.2011 15:45, Sven Barth wrote: Only one minute slower in the complete run instead of four. I let you guys decide whether this is good enough ^^ How often is the compiler compiled completly during a make cycle? I still see an ability to optimize your implementation. procedure

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Martin Schreiber
On Sunday, 30. January 2011 12.13:21 Florian Klämpfl wrote: Actually I think anything about a ten percent slower compiler will people make cry ... And as far as I understand, for projects with a lot of units it will be even worse, right? I cry if FPC doesn't compile at least ten percent

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Florian Klämpfl
Am 30.01.2011 12:37, schrieb Martin Schreiber: On Sunday, 30. January 2011 12.13:21 Florian Klämpfl wrote: Actually I think anything about a ten percent slower compiler will people make cry ... And as far as I understand, for projects with a lot of units it will be even worse, right? I cry

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Jonas Maebe
On 30 Jan 2011, at 12:37, Martin Schreiber wrote: I cry if FPC doesn't compile at least ten percent *faster* than the previous release... At least on Mac OS X/i386, we are pretty close to that currently as far as compiling the compiler with itself is concerned: * Compiling it with 2.4.2:

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Sven Barth
On 30.01.2011 12:36, Paul Ishenin wrote: 30.01.2011 15:45, Sven Barth wrote: Only one minute slower in the complete run instead of four. I let you guys decide whether this is good enough ^^ How often is the compiler compiled completly during a make cycle? I still see an ability to optimize

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Marco van de Voort
In our previous episode, Sven Barth said: Actually I think anything about a ten percent slower compiler will people make cry ... And as far as I understand, for projects with a lot of units it will be even worse, right? I cry if FPC doesn't compile at least ten percent *faster* than

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Paul Ishenin
30.01.2011 19:41, Sven Barth wrote: procedure update_unit_symtable_options; var st: tsymtable; begin st:=owner; while not(st.symtabletype in [globalsymtable,staticsymtable]) do st:=st.defowner.owner; if objecttype in [odt_classhelper,odt_objccategory] then

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Hans-Peter Diettrich
Sven Barth schrieb: Sorry, I don't understand what you want to tell here. Sorry2, I'll retry. I personally expect a class helper that is defined inside a private section of a class not to be available in another unit like I can't access a field or another type defined in there as well.

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Hans-Peter Diettrich
Jonas Maebe schrieb: An alternative solution could be to add a hashtable (tfphaslist) to tmodule whose entries are hashed on the qualified class names (unit$classname, since different units can contain classes with the same name). The value of such an entry would a tfpobjectlist of class

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Thaddy
On 31-1-2011 2:06, Hans-Peter Diettrich wrote: Jonas Maebe schrieb: Is the hashtable *really* rebuilt with every push and pop of another symtable? It would be much easier to have a hashtable per symtable, that deserves no further modifications. When all hashtables use the same hash

Re: [fpc-devel] Status report for class helpers

2011-01-30 Thread Burkhard Carstens
Am Montag, 31. Januar 2011 00:57 schrieb Paul Ishenin: 31.01.2011 0:26, Sven Barth wrote: Timings without that change: Run 1: real1m3.461s user0m45.957s sys0m4.590s Timings with that change: Run 1: real1m8.919s user0m46.597s sys0m4.166s But

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Florian Klaempfl
Am 29.01.2011 13:25, schrieb Sven Barth: Do you (especially @Devs) think that this is a sufficient approach or should this be done another way? (Note: I have not yet profiled compiling the compiler once with that search enabled and once without) Profile compiler compilation first, then we can

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 16:08, Florian Klaempfl wrote: Am 29.01.2011 13:25, schrieb Sven Barth: Do you (especially @Devs) think that this is a sufficient approach or should this be done another way? (Note: I have not yet profiled compiling the compiler once with that search enabled and once without)

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Paul Ishenin
29.01.2011 19:25, Sven Barth wrote: Does someone know a good place to link this page from? Maybe something where other language/compiler features are referenced from or can be linked to in the future. http://wiki.freepascal.org/delphi_language_features_which_fpc_does_not_have

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Paul Ishenin
29.01.2011 23:31, Sven Barth wrote: Done. Differences are dramatic (at least on my Linux PC) Try to add a set of flags to the symtable class. Store/Load it from/to ppu. When you add a def into check it if it is a class helper and add a flag if so. In you search algorithm test the flag first

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Paul Ishenin
29.01.2011 23:41, Paul Ishenin wrote: I also noticed that you check only unit symtables. I don't know what if you add a class helper into a record/class/object type section? This code works in delphi: program Project42; {$APPTYPE CONSOLE} type TFoo = class class procedure DoSomething;

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 17:35, Paul Ishenin wrote: 29.01.2011 19:25, Sven Barth wrote: Does someone know a good place to link this page from? Maybe something where other language/compiler features are referenced from or can be linked to in the future.

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 17:41, Paul Ishenin wrote: 29.01.2011 23:31, Sven Barth wrote: Done. Differences are dramatic (at least on my Linux PC) Try to add a set of flags to the symtable class. Store/Load it from/to ppu. When you add a def into check it if it is a class helper and add a flag if so. In

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 17:45, Paul Ishenin wrote: 29.01.2011 23:41, Paul Ishenin wrote: I also noticed that you check only unit symtables. I don't know what if you add a class helper into a record/class/object type section? This code works in delphi: program Project42; {$APPTYPE CONSOLE} type TFoo

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Paul Ishenin
29.01.2011 23:58, Sven Barth wrote: This is one of those moments where I need to restrain myself to not swear for the whole world to hear... *sigh* I had the same feeling when I found that generics are stored as TFoo, in the delphy symtable and therefore it is possible to have TFoo, TFooT,

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 18:08, Paul Ishenin wrote: 29.01.2011 23:58, Sven Barth wrote: This is one of those moments where I need to restrain myself to not swear for the whole world to hear... *sigh* I had the same feeling when I found that generics are stored as TFoo, in the delphy symtable and

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 17:35, Paul Ishenin wrote: 29.01.2011 19:25, Sven Barth wrote: Does someone know a good place to link this page from? Maybe something where other language/compiler features are referenced from or can be linked to in the future.

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 17:41, Paul Ishenin wrote: 29.01.2011 23:31, Sven Barth wrote: Done. Differences are dramatic (at least on my Linux PC) Try to add a set of flags to the symtable class. Store/Load it from/to ppu. When you add a def into check it if it is a class helper and add a flag if so. In

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Paul Ishenin
30.01.2011 0:50, Sven Barth wrote: Should I add the flag set to TSymtable or tstoredsymtable? (only the latter can write/save itself to ppu) I would add it to TSymTable. Best regards, Paul Ishenin ___ fpc-devel maillist -

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Florian Klämpfl
Am 29.01.2011 19:04, schrieb Paul Ishenin: 30.01.2011 0:50, Sven Barth wrote: Should I add the flag set to TSymtable or tstoredsymtable? (only the latter can write/save itself to ppu) I would add it to TSymTable. I really wonder that symtables have no flag set yet. Please move

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Florian Klämpfl
Am 29.01.2011 17:58, schrieb Sven Barth: This is one of those moments where I need to restrain myself to not swear for the whole world to hear... Ok, you'll really swear as soon as people test their code with your implementation :) ___ fpc-devel

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 21:30, Florian Klämpfl wrote: Am 29.01.2011 19:04, schrieb Paul Ishenin: 30.01.2011 0:50, Sven Barth wrote: Should I add the flag set to TSymtable or tstoredsymtable? (only the latter can write/save itself to ppu) I would add it to TSymTable. I really wonder that symtables

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 21:34, Florian Klämpfl wrote: Am 29.01.2011 17:58, schrieb Sven Barth: This is one of those moments where I need to restrain myself to not swear for the whole world to hear... Ok, you'll really swear as soon as people test their code with your implementation :) I have

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Jonas Maebe
On 29 Jan 2011, at 21:46, Sven Barth wrote: I have normally no problems with restraining myself, but seeing what Borland/CodeGear/Embarcadero allows in its language dialect... I would suggest to file bug reports with Embarcadero about this. Then you can also find out whether this is

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Sven Barth
On 29.01.2011 17:31, Sven Barth wrote: On 29.01.2011 16:08, Florian Klaempfl wrote: Am 29.01.2011 13:25, schrieb Sven Barth: Do you (especially @Devs) think that this is a sufficient approach or should this be done another way? (Note: I have not yet profiled compiling the compiler once with

Re: [fpc-devel] Status report for class helpers

2011-01-29 Thread Paul Ishenin
30.01.2011 5:22, Sven Barth wrote: Ok, I have now implemented a set of flags in TSymtable of which one is set when the (global-,static-)symtable contains a class helper (I haven't refactored b_needs_init_final yet). Here are the new results with the search for class helpers enabled (only two