Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Alexander Klenin
On Sun, Jul 10, 2011 at 04:45, Martin wrote: > On 09/07/2011 17:12, Chad Berchek wrote: >> >> Wow, thanks for the insults guys. I didn't realize I was so stupid. >> >> You missed my point too, BTW. According to the link given: >> >> "A constant argument is passed by reference if its size is larger

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Flávio Etrusco
On Sat, Jul 9, 2011 at 6:55 PM, Hans-Peter Diettrich wrote: > Flávio Etrusco schrieb: > >> Isn't this unfortunately encumbered by patents? >> http://wiki.winehq.org/CompilerExceptionSupport >> >> http://yro.slashdot.org/story/05/05/12/1947213/Winelib-Hobbled-by-Exception-Handling-Patent > > Softwa

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Hans-Peter Diettrich
Flávio Etrusco schrieb: Isn't this unfortunately encumbered by patents? http://wiki.winehq.org/CompilerExceptionSupport http://yro.slashdot.org/story/05/05/12/1947213/Winelib-Hobbled-by-Exception-Handling-Patent Software patents should not be a problem outside the USA. A nice try, but unimpor

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Daniël Mantione
Op Sat, 9 Jul 2011, schreef Flávio Etrusco: Isn't this unfortunately encumbered by patents? http://wiki.winehq.org/CompilerExceptionSupport http://yro.slashdot.org/story/05/05/12/1947213/Winelib-Hobbled-by-Exception-Handling-Patent That is a problem. However: * It's a US patent, so irrelevan

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Martin
On 09/07/2011 17:12, Chad Berchek wrote: Wow, thanks for the insults guys. I didn't realize I was so stupid. You missed my point too, BTW. According to the link given: "A constant argument is passed by reference if its size is larger than a pointer." So you always know what the size of a poi

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Flávio Etrusco
On Fri, Jul 8, 2011 at 7:05 AM, Jonas Maebe wrote: (...) > The main problem here is that FPC's exception handling is based on > setjump/longjump. This technique has a relatively high overhead for "try", > but low overhead when an exception actually occurs (of course, since > exceptions are suppose

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Aleksa Todorovic
On Sat, Jul 9, 2011 at 18:12, Chad Berchek wrote: > Wow, thanks for the insults guys. I didn't realize I was so stupid. > > You missed my point too, BTW. According to the link given: > > "A constant argument is passed by reference if its size is larger than a > pointer." > > So you always know wha

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Hans-Peter Diettrich
Chad Berchek schrieb: Wow, thanks for the insults guys. I didn't realize I was so stupid. Waking up? ;-) You missed my point too, BTW. According to the link given: "A constant argument is passed by reference if its size is larger than a pointer." People like you should not read such deta

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Jonas Maebe
On 09 Jul 2011, at 18:41, Jonas Maebe wrote: > That part of the manual is wrong. What const does is by design completely > implementation-dependent (except for cdecl/cppdecl routines, where it behaves > the same as in C/C++, and for mwpascal routines, where it behaves the same as > in MetroWer

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Jonas Maebe
On 09 Jul 2011, at 03:29, Martin wrote: > We do know: > http://www.freepascal.org/docs-html/ref/refsu58.html#x135-14500011.4.4 >> A constant argument is passed by reference if its size is larger than a >> pointer. It is passed by value if the size is equal or is less then the size >> of a nativ

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Chad Berchek
Wow, thanks for the insults guys. I didn't realize I was so stupid. You missed my point too, BTW. According to the link given: "A constant argument is passed by reference if its size is larger than a pointer." So you always know what the size of a pointer is? If I have this record: TMyRec =

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Marcos Douglas
On Sat, Jul 9, 2011 at 12:40 PM, Thaddy wrote: > Isn't it time to cut this discussion short? const means do not modify! full > stop! whatever by reference or value. The rest is bovine extrement. Not so fast. As Hans-Peter Diettrich said: "Pascal "const" parameters are optimization hints in the fi

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Thaddy
On 9-7-2011 3:29, Martin wrote: On 09/07/2011 02:14, Chad Berchek wrote: Specifically, the way const is now "defined" (or not...) is disturbing because it leaves out important details. In C++, you can pass by value or reference, or by pointer which is a value but is used to make references. Bu

Re: RE : [fpc-devel] Sparc < v9

2011-07-09 Thread Mark Morgan Lloyd
Ludo Brands wrote: For completeness and playing Devil's Advocate, I do have to ask whether pre-v9 (i.e. pre-UltraSPARC) systems are relevant any more. QEMU emulates V8. That's why I had to "downgrade". That seems an entirely adequate reason, since I believe a lot of developers use Qemu.

Re: [fpc-devel] Const optimization is a serious bug

2011-07-09 Thread Max Vlasov
On Sat, Jul 9, 2011 at 4:13 AM, Martin wrote: > On 09/07/2011 00:59, Max Vlasov wrote: >> >> On Sat, Jul 9, 2011 at 3:14 AM, Martin  wrote: >>> >>> function CRCConstString(constref Str: string): integer; >>> does what you describ >> >> Hmm, it's interesting.. Some observations: >> - constref is im