Re: [fpc-devel] Need advice for refactoring

2010-07-19 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: On 18 July 2010 22:35, Florian Klämpfl wrote: is: what happens if branch and trunk/another branch change the same line/tokens of code and then those branches are merged. A good vcs comes up with a conflict, a vcs trying to be too clever merges maybe both lines

Re: [fpc-devel] Need advice for refactoring

2010-07-19 Thread Micha Nelissen
Florian Klaempfl wrote: Anyways, why do you want to do the same change twice? Just make it once and merge. In a distributed environment this is more common, like: person B partially pulls (some commits) from person A, and person C pulls from both A and B. Or a diamond where B and C pull

Re: [fpc-devel] Need advice for refactoring

2010-07-19 Thread Florian Klaempfl
Micha Nelissen schrieb: Florian Klaempfl wrote: Anyways, why do you want to do the same change twice? Just make it once and merge. In a distributed environment this is more common, like: person B partially pulls (some commits) from person A, and person C pulls from both A and B. Or a

Re: [fpc-devel] Need advice for refactoring

2010-07-19 Thread Micha Nelissen
Florian Klaempfl wrote: Micha Nelissen schrieb: In a distributed environment this is more common, like: person B partially pulls (some commits) from person A, and person C pulls from both A and B. Or a diamond where B and C pull from A, and D pulls from B and C. Yes, but those are merges of

Re: [fpc-devel] Need advice for refactoring

2010-07-19 Thread Florian Klaempfl
Micha Nelissen schrieb: Florian Klaempfl wrote: Micha Nelissen schrieb: In a distributed environment this is more common, like: person B partially pulls (some commits) from person A, and person C pulls from both A and B. Or a diamond where B and C pull from A, and D pulls from B and C.

[fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Hans-Peter Diettrich
One requirement in a transformation into OOP is the replacement of all affected procedures by methods, and of many (currently global) reference variables by class members. When e.g. later multiple parser instances are created, one for every unit to compile, the current compiler directive

Re: [fpc-devel] Need advice for refactoring

2010-07-19 Thread Jonas Maebe
On 19 Jul 2010, at 01:41, Graeme Geldenhuys wrote: This was told to me by Vincent and Jonas a little while back, where I wanted to change the code in cpstrnew branch to match that of Trunk - but without using svnmerge. Even though the code would end up being identical, subversion raises a

Re: [fpc-devel] Purpose of uses ... in?

2010-07-19 Thread Zaher Dirkey
On Sun, Jul 11, 2010 at 11:21 PM, Jonas Maebe jonas.ma...@elis.ugent.bewrote: On 11 Jul 2010, at 15:47, Hans-Peter Diettrich wrote: I know that the in filespec is part of the Delphi syntax, but what is it really good for? AFAIK it's not allowed to rename units this way, and since

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Michael Schnell
On 07/19/2010 11:40 AM, Hans-Peter Diettrich wrote: One requirement in a transformation into OOP is the replacement of all affected procedures by methods, and of many (currently global) reference variables by class members. When e.g. later multiple parser instances are created, one for every

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Hans-Peter Diettrich
Michael Schnell schrieb: On 07/19/2010 11:40 AM, Hans-Peter Diettrich wrote: One requirement in a transformation into OOP is the replacement of all affected procedures by methods, and of many (currently global) reference variables by class members. When e.g. later multiple parser instances

Re: [fpc-devel] Need advice for refactoring

2010-07-19 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: I never encountered this and doubt it :) because svn recognizes also Then some core team members should retrain themselves with SubVersion so they know what it can and cannot do. This will reduced them spreading incorrect information to

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Aleksa Todorovic
On Mon, Jul 19, 2010 at 12:29, Hans-Peter Diettrich drdiettri...@aol.com wrote: The directive list contains records with the name and other attributes of every directive, and with a reference to the directive handler procedure. These handler procedures need further information, that currently

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Mattias Gärtner
Zitat von Hans-Peter Diettrich drdiettri...@aol.com: [...] These handler procedures need further information, that currently resides in global variables. In an OO approach these variables become class members, so that an additional reference to a concrete object is required in the

Re: [fpc-devel] Need advice for refactoring

2010-07-19 Thread Graeme Geldenhuys
On 19 July 2010 11:46, Jonas Maebe jonas.ma...@elis.ugent.be wrote: That's incorrect. The problem was that while your changes were functionally identical to the changes in trunk, they were not syntactically identical. See my reply to Florian. My idea was to add another commit to make it

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Michael Schnell
On 07/19/2010 12:52 PM, Mattias Gärtner wrote: About converting global variables for threads: What are the advantages/disadvantages of using ThreadVar versus member variables? I don't see what you are trying to compare here. Threadvars are addressed by a dedicated register (I suppose a

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Mattias Gärtner
Zitat von Michael Schnell mschn...@lumino.de: On 07/19/2010 12:52 PM, Mattias Gärtner wrote: About converting global variables for threads: What are the advantages/disadvantages of using ThreadVar versus member variables? I don't see what you are trying to compare here. If I

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Jonas Maebe
On 19 Jul 2010, at 15:02, Mattias Gärtner wrote: After a quick glance on the rtl sources it seems ThreadVar works under some platforms internally pretty much the same as an object instance: it allocates some memory on the heap. That's correct. FPC has largely platform-independent support

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Michael Schnell
On 07/19/2010 03:11 PM, Jonas Maebe wrote: That's correct. FPC has largely platform-independent support for threadvars, which is much more heavy-weight than simply using a segment register (indirect procedure call depending on the thread manager, get thread local storage pointer, index local

[fpc-devel] fixes branch r15611 doesn't build

2010-07-19 Thread Graeme Geldenhuys
Hi, I just updated my local fixes branch to the latest revision. r15611 and when I try and build it with my usual build scripts, it fails to build. Trying to compile under Linux (Ubuntu 9.04) 32-bit. Here is the compiler output. --- ... make[7]: Entering

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Daniël Mantione
Op Mon, 19 Jul 2010, schreef Michael Schnell: On 07/19/2010 03:11 PM, Jonas Maebe wrote: That's correct. FPC has largely platform-independent support for threadvars, which is much more heavy-weight than simply using a segment register (indirect procedure call depending on the thread

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Florian Klaempfl
Jonas Maebe schrieb: There have been attempts to get the segment register approach to work on Windows, but afaik it always crashed on at least one Windows version. The segment register approach is not officially documented and requires anyways an additional code so the gain isn't that big.

Re: [fpc-devel] fixes branch r15611 doesn't build

2010-07-19 Thread Graeme Geldenhuys
On 19 July 2010 17:22, Jonas Maebe jonas.ma...@elis.ugent.be wrote: Building svn versions is only supported when starting with the latest release (i.e., 2.4.0 at this time). The above suggests you are starting with 2.4.1. Ah. I assumed that because 2.4.1 is a fixes only branch, it should

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Sven Barth
Hi! Yes, though I am still puzzled how it works on x86_64; it seems regvars there are also accessed using fs, but x86_64 prevents you from writing to segment registers. As mentioned here http://en.wikipedia.org/wiki/X86_64#Windows in the 10th point Windows uses the GS segment register to

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Daniël Mantione
Op Mon, 19 Jul 2010, schreef Sven Barth: Hi! Yes, though I am still puzzled how it works on x86_64; it seems regvars there are also accessed using fs, but x86_64 prevents you from writing to segment registers. As mentioned here http://en.wikipedia.org/wiki/X86_64#Windows in the 10th

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Sven Barth
Hi! On 19.07.2010 18:50, Daniël Mantione wrote: Well, the following works on i386 but doesn't on x86_64, even though modify_ldt succeeds: (...) If you know how to make it work, I keep myself recommended :) Well... according to this thread

[fpc-devel] fpc-image crashes on loading jpeg

2010-07-19 Thread Felipe Monteiro de Carvalho
Hello, Regarding this bug: http://bugs.freepascal.org/view.php?id=16983 Does anyone have any ideas about what I should be looking for to fix it? I got stuck in the stack frame between #2 and #3: 002 0x00121d20 in JERROR_ERREXIT1$J_COMMON_PTR$J_MESSAGE_CODE$LONGWORD () 003 0x000fe9b0 in

Re: [fpc-devel] fpc-image crashes on loading jpeg

2010-07-19 Thread Marco van de Voort
In our previous episode, Felipe Monteiro de Carvalho said: [ Charset ISO-8859-1 unsupported, converting... ] Hello, Regarding this bug: http://bugs.freepascal.org/view.php?id=16983 Does anyone have any ideas about what I should be looking for to fix it? I got stuck in the stack frame

Re: [fpc-devel] OO rewrite - technical questions

2010-07-19 Thread Daniël Mantione
Op Mon, 19 Jul 2010, schreef Hans-Peter Diettrich: Michael Schnell schrieb: I do know that gcc in Linux on X86 uses a segment register. I don't know how gcc works in Windows, but I suppose even Windows is assumed to restore all register values of a thread after a preemption. Windows

[fpc-devel] sub byte arrays

2010-07-19 Thread theo
This is probably a stupid question, but I'll ask anyway ;-) Is there any support from the compiler to create arrays of, say type ttest=(one,two,three,four); Afair, these states could be represented with 2 bits. 00,01,10,11 So four of these items could be represented in a byte (in an array of