Commit Graph

29760 Commits

Author SHA1 Message Date
Jonas Maebe
d4d7b695c7 - removed all "islibrary:=false;" assignments from system unit
initialisation code, because that's a typed constant already initialised
    to that value and it interferes with a generic solution to set islibrary
    to true for libraries

git-svn-id: trunk@12376 -
2008-12-17 17:48:04 +00:00
marco
8445fb74bd * fixed path_absolute, somehow it was not implemented for windows. Probably the $IF for windows fell away. Now defined for go32v2. Fixes 12370, and the solution was hinted at in that bugreport.
git-svn-id: trunk@12372 -
2008-12-16 23:05:16 +00:00
florian
e213be26fd + write proper rtti for large sets, resolves #12788
git-svn-id: trunk@12371 -
2008-12-16 17:18:16 +00:00
yury
6dd66f09b9 + Added wap wince api unit by AnarchyMob.
git-svn-id: trunk@12370 -
2008-12-16 11:40:45 +00:00
yury
9e19ef3a2c + Added sip and projects wince api units by Vasil Maximov.
git-svn-id: trunk@12369 -
2008-12-16 11:32:48 +00:00
andrew
26b0b7c0ab * fixed huge memory leak when searching chms
git-svn-id: trunk@12368 -
2008-12-16 03:49:30 +00:00
joost
186c6b6b4f * Adapted IntLoadRecordsFromFile for the new NextBookmarkData field in the update-buffer
git-svn-id: trunk@12367 -
2008-12-15 11:46:32 +00:00
joost
6617fdf305 * When syncing the current record to the activebuffer in ApplyUpdates, perform only the necessary steps
git-svn-id: trunk@12366 -
2008-12-14 21:55:23 +00:00
joost
97ef7c31c7 * The bookmarkdata in a delete-update buffer now points to the old, deleted, record which is not deleted immediately anymore. Because else GetUpdateBuffer can not find the update-buffer from a deleted record
* Delete-update buffers now has an extra bookmark (NextBookmarkData) to store the next record in the dataset
 * Thus re-linking update buffers of records that are going to be deleted, is not necessary anymore
 * GetRecordUpdateBuffer now looks for update-buffers linked to BookmarkData, and for those linked to NextBookmarkdata only when asked
 * The commented-out resync in ApplyUpdates is replaced by a call to GetRecord. The goal is to synchronise the ActiveBuffer of TDataset with the CurrentBuffer of the TBufDataset.

git-svn-id: trunk@12365 -
2008-12-14 21:36:21 +00:00
Jonas Maebe
47ba5b19ec * ignore vmtloadaddrnodes created in dead strip removed code
for wpo

git-svn-id: trunk@12364 -
2008-12-14 18:56:02 +00:00
Jonas Maebe
f104ec1346 * fixed one change too many from {ifdef macos} into {ifdef usedos}
git-svn-id: trunk@12363 -
2008-12-14 18:01:16 +00:00
Jonas Maebe
3a56f2403c * fixed windows compilation (currently uses Dos again instead of sysutils)
git-svn-id: trunk@12362 -
2008-12-14 17:58:01 +00:00
joost
1f1f38e5d3 Path from Alexander S. Klenin
* save cached changes when CacheUpdate is set to false
 * clear FDirty flag when the user calls UpdateFile directly

git-svn-id: trunk@12361 -
2008-12-13 15:05:50 +00:00
florian
a0a1e6aae2 * small indention fix
git-svn-id: trunk@12360 -
2008-12-12 21:47:44 +00:00
florian
a537134603 * set result of ResetDFA, resolves #12757
git-svn-id: trunk@12359 -
2008-12-12 21:47:21 +00:00
Jonas Maebe
c1bc1cd94d + test that already works (mantis #12151)
git-svn-id: trunk@12358 -
2008-12-12 19:45:07 +00:00
Jonas Maebe
57d0d3a3c5 - removed svnmerge-integrated tracking for fpc-wpo branch, since it has
been completely merged

git-svn-id: trunk@12357 -
2008-12-12 19:21:08 +00:00
Jonas Maebe
3216e8c7bc * mark produced object files as "does not require executable stack" by
default for Linux (overridable using -WX switch) (mantis #11563)

git-svn-id: trunk@12356 -
2008-12-12 16:26:25 +00:00
Jonas Maebe
5c1d4b130b * added system_powerpc64_linux to system_linux set
git-svn-id: trunk@12355 -
2008-12-12 16:07:22 +00:00
michael
e39c8631a4 * Patch from Mattias Gaertner to read LZW compressed images and more robust handling of faulty images
git-svn-id: trunk@12354 -
2008-12-12 15:40:03 +00:00
yury
5ffec2d876 * Fixed notes: Virtual method X has a lower visibility (protected) than parent class (public).
git-svn-id: trunk@12353 -
2008-12-12 15:07:05 +00:00
yury
9cc15bd994 * Do not write COFF string table into EXE if COFF symbol table is not present. It fixes loading of stripped DLL on Win9x. Bug #12629.
git-svn-id: trunk@12352 -
2008-12-12 14:54:14 +00:00
yury
aa21ff308e * Added Delphi compatible definition for VerQueryValue for wince. Bug #12716.
git-svn-id: trunk@12351 -
2008-12-12 14:03:07 +00:00
yury
94799dfd60 * Fixed packages compilation and installation for wince.
git-svn-id: trunk@12350 -
2008-12-12 13:39:59 +00:00
Jonas Maebe
1597aac6d2 * first search for gnm and only then for nm
* fixed error message in case the output of (g)nm/objdump can't be parsed

git-svn-id: trunk@12349 -
2008-12-12 13:03:27 +00:00
Jonas Maebe
dcf7412ea4 + also look for 'gnm' (necessary for e.g. solaris)
git-svn-id: trunk@12348 -
2008-12-12 12:43:17 +00:00
Jonas Maebe
dae90242e4 * fixed -OWsymbolliveness for linux/ppc64 (exported function symbol names
start with a '.' there)

git-svn-id: trunk@12347 -
2008-12-12 12:22:38 +00:00
Jonas Maebe
d357fb8936 * write empty section if no info about devirtualisable classes
* don't crash when looking up info about devirtualisable methods in case
    the section was empty

git-svn-id: trunk@12346 -
2008-12-12 12:14:45 +00:00
joost
4b5bc94bff Patch from Alexander S. Klenin
* Implemented TLookupList.FirstKeyByValue and ValuesToStrings

git-svn-id: trunk@12344 -
2008-12-11 20:46:35 +00:00
marco
8056591845 * marked domain field of Linux record with "platform" directive. under IFNDEF 2.2, do not merge
git-svn-id: trunk@12342 -
2008-12-11 17:42:36 +00:00
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