Commit Graph

29580 Commits

Author SHA1 Message Date
Jonas Maebe
060d81b8fa Merged revisions 11878,11881-11882,11889,11891-11893,11895,11899-11902,11935,11938,12212,12304,12308-12310,12316,12330-12332,12334,12339-12340 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/branches/wpo

........
r11878 | jonas | 2008-10-11 02:25:18 +0200 (Sat, 11 Oct 2008) | 19 lines

  + initial implementation of whole-program optimisation framework
  + implementation of whole-program devirtualisation
  o use:
     a) generate whole-program optimisation information (no need
        to completely compile the program and all of its units
        with -OW/-FW, only the main program is sufficient)
      fpc -OWdevirtcalls -FWmyprog.wpo myprog
     b) use it to optimise the program
      fpc -B -Owdevirtcalls -Fwmyprog.wpo myprog
     (the -B is not required, but only sources recompiled during
      the second pass will actually be optimised -- if you want,
      you can even rebuild the rtl devirtualised for a particular 
      program; and these options can obviously also be used         
      together with regular optimisation switches)
  o warning:
    - there are no checks yet to ensure that you do not use 
      units optimised for a particular program with another
      program (or with a changed version of the same program)

........
r11881 | jonas | 2008-10-11 19:35:52 +0200 (Sat, 11 Oct 2008) | 13 lines

  * extracted code to detect constructed class/object types from
    tcallnode.gen_vmt_tree into its own method to avoid clutter
  * detect x.classtype.create constructs (with classtype = the
    system.tobject.classtype method), and treat them as if a
    "class of x" has been instantiated rather than a
    "class of tobject". this required storing the instantiated
    classrefs in their own array though, because at such a
    point we don't have a "class of x" tdef available (so
    now "x", and all other defs instantiated via a classref,
    are now stored as tobjectdefs in a separate array)
  + support for devirtualising class methods (including
    constructors)

........
r11882 | jonas | 2008-10-11 20:44:02 +0200 (Sat, 11 Oct 2008) | 7 lines

  + -Owoptvmts whole program optimisation which replaces vmt entries
    with method names of child classes in case the current class'
    method can never be called (e.g., because this class is never
    instantiated). As a result, such methods can then be removed
    by dead code removal/smart linking (not much effect for either
    the compiler, lazarus or a trivial lazarus app though).

........
r11889 | jonas | 2008-10-12 14:29:54 +0200 (Sun, 12 Oct 2008) | 2 lines

  * some comment fixes

........
r11891 | jonas | 2008-10-12 18:49:13 +0200 (Sun, 12 Oct 2008) | 4 lines

  * fixed twpofilereader.getnextnoncommentline() when reusing a previously
    read line
  * fixed skipping of unnecessary wpo feedback file sections

........
r11892 | jonas | 2008-10-12 23:42:43 +0200 (Sun, 12 Oct 2008) | 31 lines

  + symbol liveness wpo information extracted from smartlinked programs
    (-OW/-Owsymbolliveness)
  + use symbol liveness information to improve devirtualisation (don't
    consider classes created in code that has been dead code stripped).
    This requires at least two passes of using wpo (first uses dead code
    info to locate classes that are constructed only in dead code,
    second pass uses this info to potentially further devirtualise).
    I.e.:
     1) generate initial liveness and devirtualisation feedback
       fpc -FWtt.wpo -OWall tt.pp -Xs- -CX -XX
     2) use previously generated feedback, and regenerate new feedback
        based on this (i.e., disregard classes created in dead code)
       fpc -FWtt-1.wpo -OWall -Fwtt.wo -Owall tt.pp -Xs- -CX -XX
     3) use the newly generated feedback (in theory, it is possible
        that even more opportunities pop up afterwards; you can
        continue until the program does not get smaller anymore)
       fpc -Fwtt-1.wpo -Owall tt.pp -CX -XX
  * changed all message() to cgmessage() calls so the set codegenerror
  * changed static fsectionhandlers field to a regular field called
    fwpocomponents
  * changed registration of wpocomponents: no longer happens in the
    initialization section of their unit, but in the InitWpo routine
    (which has been moved from the woinfo to the wpo unit). This way
    you can register different classes based on the target/parameters.
  + added static method to twpocomponentbase for checking whether
    the command line parameters don't conflict with the requested
    optimisations (e.g. generating liveness info requires that
    smartlinking is turned on)
  + added static method to twpocomponentbase to request the
    section name

........
r11893 | jonas | 2008-10-12 23:53:57 +0200 (Sun, 12 Oct 2008) | 3 lines

  * fixed comment error (twpodeadcodeinfo keeps a list of live,
    not dead symbols)

........
r11895 | jonas | 2008-10-13 00:13:59 +0200 (Mon, 13 Oct 2008) | 2 lines

  + documented -OW<x>, -Ow<x>, -FW<x> and -Fw<x> wpo parameters

........
r11899 | jonas | 2008-10-14 22:14:56 +0200 (Tue, 14 Oct 2008) | 2 lines

  * replaced hardcoded string with objdumpsearchstr constant

........
r11900 | jonas | 2008-10-14 22:15:25 +0200 (Tue, 14 Oct 2008) | 2 lines

  * reset wpofeedbackinput and wpofeedbackoutput in wpodone

........
r11901 | jonas | 2008-10-14 22:16:07 +0200 (Tue, 14 Oct 2008) | 2 lines

  * various additional comments and comment fixes

........
r11902 | jonas | 2008-10-15 18:09:42 +0200 (Wed, 15 Oct 2008) | 5 lines

  * store vmt procdefs in the ppu files so we don't have to use a hack to
    regenerate them for whole-program optimisation
  * fixed crash when performing devirtualisation optimisation on programs
    that do not construct any classes/objects with optimisable vmts

........
r11935 | jonas | 2008-10-19 12:24:26 +0200 (Sun, 19 Oct 2008) | 4 lines

  * set the vmt entries of non-class virtual methods of not instantiated
    objects/classes to FPC_ABSTRACTERROR so the code they refer to can
    be thrown away if it is not referred to in any other way either

........
r11938 | jonas | 2008-10-19 20:55:02 +0200 (Sun, 19 Oct 2008) | 7 lines

  * record all classrefdefs/objdefs for which a loadvmtaddrnode is generated,
    and instead of marking all classes that derive from instantiated
    classrefdefs as instantiated, only mark those classes from the above
    collection that derive from instantiated classrefdefs as
    instantiated (since to instantiate a class, you have to load its vmt
    somehow -- this may be broken by using assembler code though)

........
r12212 | jonas | 2008-11-23 12:26:34 +0100 (Sun, 23 Nov 2008) | 3 lines

  * fixed to work with the new vmtentries that are always available and
    removed previously added code to save/load vmtentries to ppu files

........
r12304 | jonas | 2008-12-05 22:23:30 +0100 (Fri, 05 Dec 2008) | 4 lines

  * check whether the correct wpo feedback file is used in the current
    compilation when using units that were compiled using wpo information
    during a previous compilation run

........
r12308 | jonas | 2008-12-06 18:03:39 +0100 (Sat, 06 Dec 2008) | 2 lines

  * abort compilation if an error occurred during wpo initialisation

........
r12309 | jonas | 2008-12-06 18:04:28 +0100 (Sat, 06 Dec 2008) | 3 lines

  * give an error message instead of crashing with an io exception if the
    compiler is unable to create the wpo feedback file specified using -FW

........
r12310 | jonas | 2008-12-06 18:12:43 +0100 (Sat, 06 Dec 2008) | 3 lines

  * don't let the used wpo feedback file influence the interface crc (there's
    a separate check for such changes)

........
r12316 | jonas | 2008-12-08 19:08:25 +0100 (Mon, 08 Dec 2008) | 3 lines

  * document the format of the sections of the wpo feedback file inside the
    feedback file itself

........
r12330 | jonas | 2008-12-10 22:26:47 +0100 (Wed, 10 Dec 2008) | 2 lines

  * use sysutils instead of dos to avoid command line length limits

........
r12331 | jonas | 2008-12-10 22:31:11 +0100 (Wed, 10 Dec 2008) | 3 lines

  + support for testing whole program optimisation tests (multiple
    compilations using successively generated feedback files)

........
r12332 | jonas | 2008-12-10 22:31:40 +0100 (Wed, 10 Dec 2008) | 2 lines

  + whole program optimisation tests

........
r12334 | jonas | 2008-12-10 22:38:07 +0100 (Wed, 10 Dec 2008) | 2 lines

  - removed unused local variable

........
r12339 | jonas | 2008-12-11 18:06:36 +0100 (Thu, 11 Dec 2008) | 2 lines

  + comments for newly added fields to tobjectdef for devirtualisation

........
r12340 | jonas | 2008-12-11 18:10:01 +0100 (Thu, 11 Dec 2008) | 2 lines

  * increase ppu version (was no longer different from trunk due to merging)

........

git-svn-id: trunk@12341 -
2008-12-11 17:40:18 +00:00
Jonas Maebe
afafe33266 + readded FPC_WRITE_TEXT_ANSISTR alias removed in r12322, because it's
required by the variant code

git-svn-id: trunk@12337 -
2008-12-11 12:31:23 +00:00
michael
b0eee3cb7d * More testcases (and they will fail)
git-svn-id: trunk@12336 -
2008-12-11 10:37:17 +00:00
michael
a469e84820 * And yet another extra test plus fix
git-svn-id: trunk@12335 -
2008-12-11 09:04:48 +00:00
Jonas Maebe
b25b406b56 Merged revisions 11894,12317 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/branches/wpo

........
r11894 | jonas | 2008-10-13 00:13:19 +0200 (Mon, 13 Oct 2008) | 3 lines

  * fixed error that only really caused progblems if the total size
    of the messages text is a multiple of 240

........
r12317 | jonas | 2008-12-08 20:03:53 +0100 (Mon, 08 Dec 2008) | 3 lines

  * fixed error in fix committed r11894 (we don't write out the last new
    line, but we have to reserve memory for the terminating #0)

........

git-svn-id: trunk@12333 -
2008-12-10 21:33:53 +00:00
Jonas Maebe
9f38c589e1 * initialised merge tracking for wpo branch
git-svn-id: trunk@12329 -
2008-12-10 21:21:47 +00:00
michael
8be887e018 * Patch from Graeme Geldenhuys to improve layout of generated report
git-svn-id: trunk@12328 -
2008-12-10 21:17:02 +00:00
Jonas Maebe
d9c5cd76cd * some more darwin/arm stuff I forgot to commit earlier:
o softfloat support for bsd/system.pp (enabled when compiling for ARM)
    o include darwin/arm sigaction structs in darwin/signal.inc when
      compiling for ARM (can't commit the file itself that contains
      those structs due to licensing issues though)

git-svn-id: trunk@12327 -
2008-12-10 21:10:59 +00:00
michael
977e033932 * Do not raise an error when an attempt is made to delete a non-existing key
git-svn-id: trunk@12326 -
2008-12-10 21:01:56 +00:00
michael
e357cd02ac * Added more testcases for more digits and positive versus negative tests. FPC matches Delphi now
git-svn-id: trunk@12325 -
2008-12-10 20:45:56 +00:00
michael
6d93a762fd * And once more fixed formatfloat. All results consistent with Delphi now
git-svn-id: trunk@12323 -
2008-12-10 20:39:16 +00:00
Jonas Maebe
53a638ad9f - removed no longer needed alias names
git-svn-id: trunk@12322 -
2008-12-10 19:24:01 +00:00
michael
73c40daa30 * Better TeX escape character checking
git-svn-id: trunk@12321 -
2008-12-10 19:03:36 +00:00
marco
a82cb6d899 * updated "pending" to longint, as a possible solution for bug #12514
git-svn-id: trunk@12319 -
2008-12-09 13:36:35 +00:00
michael
7666920852 * Patch from Sergei Gorelkin:
xmlread.pp:
  * Remove TXMLReader.FCurChar, by replacing it by FSource.FBuf^.
  * Aiming to support any input encoding, the parser has been refactored
    to consume UTF-16 produced by 'xml-unaware' decoder (i.e. with line
    endings unadjusted and possibly containing chars that are invalid for
    XML). The majority of parsing is now done in SkipUntil methods of
    TXMLCharSource and TXMLDecodingSource. This design also considerably
    increases performance because it processed chars in batches instead of
    one-by-one (the decoders still process chars one-by-one, but they are
    subject for soon replacement).
  * Signature of BufAppendChunk changed to take starting and ending
    addresses of the buffer instead of starting address and length.
  * More sophisticated parsing of end-tags, avoids calls to StoreLocation
    if possible (despite its trvial look, StoreLocation is quite expensive
    in CPU cycles).


  dom.pp:
  * Some progress with DOM level 2. Implemented namespaceURI, prefix,
    localName properties for Elements and Attributes. The namespace
    information occupies only 32 bits per node.
  * Implemented storing names of elements and attributes in a hash table.
    This considerably reduces amount of used memory because each unique
    string is stored only once. Reducing memory allocation count also
    improves parsing speed.
  * Using the hash table also allows to link DTD declarations directly to
    the element nodes, avoiding any lookup at all.

  dom_htmp.pp:
  * Merely fixes compilation after changes to the DOM.

git-svn-id: trunk@12318 -
2008-12-08 19:51:46 +00:00
joost
18d7882659 * Removed some invalid debug-code
git-svn-id: trunk@12315 -
2008-12-08 12:59:54 +00:00
joost
853b5e83fd * The size=-1 case it not necessary anymore after r12313
git-svn-id: trunk@12314 -
2008-12-07 23:02:06 +00:00
joost
b3ebc67be2 * Only the lowest 16 bits of pqfmod gives the scale
git-svn-id: trunk@12313 -
2008-12-07 22:19:07 +00:00
florian
ee1961fdf0 * merged ColorSel implementations of Marco van de Voort and Andreas Jakobsche
git-svn-id: trunk@12311 -
2008-12-07 12:21:05 +00:00
marco
899809777c * a local buffer for pchar based filename handling was still at TP sizes
(80), and did not follow the libraries abstraction (array [tfsize]) for
   length of paths. (Reporter Lichtwicht, lazarusforum.de)

git-svn-id: trunk@12306 -
2008-12-06 12:22:10 +00:00
marco
cba8503e2b * added skeleton for colorsel I still had lying around, derived from IDE src. Should be possible to expand them based on PD C++ TV code?
git-svn-id: trunk@12305 -
2008-12-06 11:37:56 +00:00
michael
87a6193f4f * Hopefully fixed formatfloat negative value bugs once and for all
git-svn-id: trunk@12303 -
2008-12-05 10:54:22 +00:00
michael
bcc1287bbc * Patch from Graeme Geldenhuys to improve DUnit compatibility
git-svn-id: trunk@12302 -
2008-12-05 09:46:42 +00:00
joost
f70cc85509 * Reverted accidentally committed files in r12300
git-svn-id: trunk@12301 -
2008-12-04 21:22:07 +00:00
joost
0a7b499443 * Added sqlite3-test configuration example
git-svn-id: trunk@12300 -
2008-12-04 21:20:25 +00:00
joost
51d5320fdb * Call mysql_library_init and mysql_library_end automatically when loading the mysqlclient dynamically. Fixes bug #9751
* Initializes refcount

git-svn-id: trunk@12297 -
2008-12-04 20:22:16 +00:00
sekelsenmat
557fd1e1c6 Moves gettext test to correct position
git-svn-id: trunk@12291 -
2008-12-02 16:35:29 +00:00
sekelsenmat
15e597682e Fixes gettext crash under Windows CE and adds test case for it.
git-svn-id: trunk@12290 -
2008-12-02 16:01:25 +00:00
joost
19a73853bd * Use DynLibs.Sharedsuffix for postgres,sqlite and odbc
git-svn-id: trunk@12289 -
2008-12-02 13:30:33 +00:00
joost
332fcd325d * Improved error-handling
git-svn-id: trunk@12288 -
2008-12-02 12:57:17 +00:00
joost
a41ccd5a70 * Fixed oracle-cursor leak
git-svn-id: trunk@12287 -
2008-12-02 12:33:27 +00:00
joost
1099eabc87 Patch from Luiz Americo
* Publish FieldDefs property

git-svn-id: trunk@12286 -
2008-12-01 20:55:47 +00:00
joost
ae73acefcf * Made EODBCExcetion derrive from EDatabaseError instead of Exception directly
git-svn-id: trunk@12285 -
2008-12-01 13:29:37 +00:00
joost
a7086e7164 * Allow parameter-names between double-quotes
* Place parameter-names between double-quotes in TBufDataset.ApplyUpdates +tests (bug 12275)

git-svn-id: trunk@12284 -
2008-12-01 13:13:48 +00:00
michael
e9976b6ced * Some fixes for the case of inexact matches
git-svn-id: trunk@12283 -
2008-11-30 22:32:54 +00:00
joost
c8467353ea * Fix for two columns with the same name
git-svn-id: trunk@12280 -
2008-11-29 22:43:54 +00:00
joost
c3112bd7cb * Reverted accidently committed files in r12278
git-svn-id: trunk@12279 -
2008-11-29 22:41:53 +00:00
joost
27e3bc5240 * Ignore TestParametersAndDates for sqlite since it uses a semicolon as a cast, which is not supported by sqlite
git-svn-id: trunk@12278 -
2008-11-29 22:39:39 +00:00
joost
41af4c76ac * Fixed TestStringParamQuery
git-svn-id: trunk@12277 -
2008-11-29 19:44:54 +00:00
joost
55c866f9d3 * Added missing brackets in r12266
git-svn-id: trunk@12276 -
2008-11-29 19:02:37 +00:00
micha
aa38b10011 * attempt to fix powerpc64-linux sync_file_range compilation
git-svn-id: trunk@12274 -
2008-11-29 15:43:09 +00:00
michael
feb9549f85 * Patch from Mattias Gaertner to reduce memory usage for interpolations
git-svn-id: trunk@12272 -
2008-11-29 15:32:33 +00:00
florian
dbd037afcc * link against libc when profiling
git-svn-id: trunk@12269 -
2008-11-29 12:28:43 +00:00
joost
3bc585684b * Changed TFieldDef.Size, TField.Size and TField.DataSize from word to integer. Delphi compatible, reported by Paul Ishenin
git-svn-id: trunk@12268 -
2008-11-29 12:18:46 +00:00
joost
af7b064157 * Because of some logic-error, only deletes were handled by ApplyUpdates
git-svn-id: trunk@12266 -
2008-11-29 10:45:37 +00:00
joost
b0cf2a2dc6 * Use TField.Assignvalue to set the fieldvalues in DoInsertAppend
git-svn-id: trunk@12262 -
2008-11-29 09:13:10 +00:00
michael
bd36bdc577 * Patch from Mattias Gaertner to fix memory leak, improve speed and compute correcter
git-svn-id: trunk@12261 -
2008-11-28 19:08:45 +00:00
michael
5ef7b7fd04 * Patch from Mattias Gaertner to fix compilation
git-svn-id: trunk@12260 -
2008-11-28 19:06:40 +00:00
michael
fc9405b822 * Patch from Mattias Gaertner:
- extends the tiff writer with some default values to write
  tiffs out of the box like the other fpimage writers.
  - progress events
  - basic CMYK support
  - allow reading non standard planarconfiguration attributes as created
  by some scanners
  - allow to create the image after reading the header - needed for big
  tiffs
  - removed TGA dependency
  - LZW-decompression was started. There is a bug I didn't found yet.

git-svn-id: trunk@12258 -
2008-11-28 07:31:14 +00:00
joost
5059d9220d * Added TTestFieldTypes.TestBCDParamQuery
git-svn-id: trunk@12257 -
2008-11-27 21:18:07 +00:00