Re: [fpc-pascal] Documentation bug
Hello, Am 22.08.2008 um 10:31 schrieb leledumbo: Thomas Schatzl wrote: Use fpc -i to query the available optimization options. I know that, but what I need is an explanation about what each optimization does. Plus, what are the defaults? From the programmer's manual about the $OPTIMIZATION switch (you need very recent docs for this) and the "Optimization" chapter: Default is no optimization at all, i.e. all of the below disabled. REGVAR - Try to keep local values in registers, avoiding memory traffic. UNCERTAIN - Use uncertain optimizations, i.e. make some assumptions about pointer aliasing which give more opportunities in the other optimizations but may result in incorrect code otherwise; see the documentation for the rules. SIZE - Try to generate smaller code; note that this counters some other optimizations. STACKFRAME - Do not generate stackframes if possible (e.g. for leaf procedures). PEEPHOLE - Peephole optimizations. Try to find code patterns that either do nothing (and remove them) or replace them with more efficient ones. See e.g. http://en.wikipedia.org/wiki/ Peephole_optimization for more information. ASMCSE - Use common subexpression elimination at the assembler level. LOOPUNROLL - Unroll loops: small loops are unrolled, i.e. loop bodies inlined multiple times into the code (plus some setup code) - note that specifying the target processor has great influence on what is considered "small" (e.g. -Op) TAILREC - Automatically try to convert tail recursions into iterations. CSE - Use common subexpression elimination, for more information see e.g. http://en.wikipedia.org/wiki/Common_subexpression_elimination DFA - Use data flow analysis, i.e. gathering more information about the data flow in the program in order to make other optimizations more effective. See e.g. http://en.wikipedia.org/wiki/ Data_flow_analysis for more information. There are also LEVEL<1-3> "optimizations" that are shortcuts for some of the above. Regards, Thomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Widestrings manager ?
Op zondag 24-08-2008 om 03:34 uur [tijdzone -0300], schreef Steve Howe: > Hello Graeme, > > On 8/23/08, Steve Howe <[EMAIL PROTECTED]> wrote: > > > "This binary has no widestrings support compiled in. > > > Recompile the application with a widestrings-manager in the program uses > > > clause." > > > > You need to add the "cwstring" unit to your project's uses clause as > > one of the first units. > It worked fine. I guess that should be pointed somewhere in docs... anyway, > it > should be searchable on Google by now. This behavour in new in fpc 2.2.2, earlier versions gave an unhandled exception, iirc. You could make a documentation-bug report. ;) Joost ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Strange Floating Point Exception problem
On Sat, Aug 23, 2008 at 12:20:48AM +0200, Tom Verhoeff wrote: > I have an application (for optimizing decisions in the dice game Yahtzee) > that uses Real and runs well with FPC on Mac OS X (PPC), but that > fails with a Floating Point Exception (FPE) under Windows (FPC 2.2.0). I "played" around some more to resolve this problem. It now _seems_ to work, after suppressing all FPU exceptions through SetExceptionMask in unit Math. This is hardly satisfactory, since the place where the program got interrupted (viz. if x < 0) cannot cause an exception, as far as I can tell, since x is confirmed to equal -1 at that point. So, the program now runs (but might misbehave). I'll keep you posted. Tom -- E-MAIL: T.Verhoeff @ TUE.NL | Dept. of Math. & Comp. Science PHONE: +31 40 247 41 25| Technische Universiteit Eindhoven FAX:+31 40 247 54 04| PO Box 513, NL-5600 MB Eindhoven http://www.win.tue.nl/~wstomv/ | The Netherlands ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Question on exceptions
When you enable things like range checking. How do you identify when an exception has occurred and what it means? I see messages like "Unhandled exception occurred at $hex address" then a bunch more $hex address' I don't know what to do with these numbers. JY ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal