Commit Graph

91 Commits

Author SHA1 Message Date
Jonas Maebe
7173b9dfed * fixed (harmless) range check errors
git-svn-id: trunk@17643 -
2011-06-02 20:07:06 +00:00
paul
d21bbc4548 compiler: reduce amount of hints and warnings
git-svn-id: trunk@17350 -
2011-04-20 02:58:52 +00:00
Jonas Maebe
66258fb0b8 * fixed TCmdStrListItem.GetCopy() (the reference count of the ansistring
field was messed up due to the use of "move()" to copy all field data)

git-svn-id: trunk@17270 -
2011-04-08 08:10:07 +00:00
Jonas Maebe
c072eb5a34 * fixed growing a tbitset when adding an element whose index equals the
datasize (and grow with 16 bytes at a time instead of with only
    exactly as many bytes as required to accomodate the new element)

git-svn-id: trunk@15603 -
2010-07-18 21:58:47 +00:00
Jonas Maebe
434a6f6ee8 * ensure that the power-of-2 size of the hash table is always larger than
the parameter initially passed to TFPHashList.SetCapacity after r15516
    (mantis #16834)

git-svn-id: trunk@15521 -
2010-07-03 18:25:31 +00:00
Jonas Maebe
d432023cf6 * force the size of TFPHashList always to a power of two, and use an "and"
instead of a "div" to truncate the hash to the table size
  * prefetch the string we are looking for
  - removed the optimization whereby the length and the last character are
    checked before the entire string is compared during the hashtable
    searching, because this does not help anymore (our hash funcion is
    better than when this was added, and we also have a special "equals"
    string comparison function nowadays that also first checks the length)

git-svn-id: trunk@15516 -
2010-07-03 13:05:32 +00:00
Jonas Maebe
35bacb55b5 * re-enabled CCLASSESINLINE since it no longer internalerrors the compiler
while compiling the IDE
  - removed "inline" from a lot of methods because they are too large

git-svn-id: trunk@15497 -
2010-06-30 17:41:12 +00:00
paul
c6c15f6533 compiler: revert r14244
git-svn-id: trunk@14257 -
2009-11-23 01:43:42 +00:00
paul
5684e3acc7 compiler: speedup tdynamicarray.read, tdynamicarray.write
git-svn-id: trunk@14244 -
2009-11-21 18:27:37 +00:00
Jonas Maebe
dac2903107 * prefetch next items in TLinkedList.clear, removes most l2 cache misses
git-svn-id: trunk@13706 -
2009-09-13 15:30:53 +00:00
Jonas Maebe
41acad1d11 + keep track of called virtual methods per unit. -Owoptvtms will now replace
vmt entries of virtual methods that can never be called with references
    to FPC_ABSTRACTERROR. Some virtual methods are always considered to be
    reachable: published methods, and methods used as getter/setter for a
    published property.

git-svn-id: trunk@13238 -
2009-06-06 08:24:36 +00:00
Jonas Maebe
9bb0db1a6a * fixed range check error
git-svn-id: trunk@11813 -
2008-09-21 18:52:13 +00:00
peter
e90ce867d9 * fphashlist, update hashcapacity also if capacity is changed
git-svn-id: trunk@11699 -
2008-09-03 21:04:53 +00:00
florian
9955d5b061 o patch from Sergej Gorelkin to improvement code generation for string literals
* Replaces linear search through assembler list by the hash lookup. 
    This considerably improves performance on large projects 
    (one example is winunits-jedi package, in which tcgstringconstnode.pass_generate_code 
     was top #1 in calltree, consuming about 12% IRefs).
  * Enables reusing memory locations for widestring constants 
    (and in general, the same approach may be used for any other type of constants).
  * Saves a sizeof(pointer) bytes per constant, by removing a location 
    which points to the string. This location is necessary for the 
    typed consts which may be modified, but redundant for string literals 
    because the language does not allow to modify string literals in any way. 

git-svn-id: trunk@11657 -
2008-08-27 15:16:45 +00:00
yury
5e11e697b4 * Use unsigned integers for sizes and positions to break 2GB limit in tdynamicarray, object writer, internal linker, coff and PE headers.
git-svn-id: trunk@11480 -
2008-07-28 20:29:25 +00:00
Jonas Maebe
cadcfa76d8 * optimized TLinkedList.clear so it can use regvars for everything in
its loop (helps a lot on ppc)

git-svn-id: trunk@8354 -
2007-09-02 16:16:25 +00:00
florian
a3d906f1ca - removed several ;;
git-svn-id: trunk@7498 -
2007-05-28 15:59:17 +00:00
peter
06698d6e1b * explicitly use shortstring for TFPHashList
git-svn-id: trunk@6303 -
2007-02-02 18:58:29 +00:00
tom_at_work
106fe68ce6 * renamed TStringList to TCmdStrList, in general use TCmdStr instead of shortstrings to fix bug #6351
git-svn-id: trunk@6215 -
2007-01-26 22:29:39 +00:00
peter
a526430509 * add TFPHashList.FindIndexOf
git-svn-id: trunk@5906 -
2007-01-11 21:52:32 +00:00
micha
d9c91a9663 fix TFPList.QuickSort duplicate in compiler cclasses (rtl is also broken)
git-svn-id: trunk@5525 -
2006-12-02 08:03:21 +00:00
peter
129ab85aad * tfphashlist.delete needs to rehash after updating all indexes
git-svn-id: trunk@5362 -
2006-11-13 21:17:59 +00:00
peter
45621c892e * set vs_initialised for typed consts
* delete old symbol when absolute is used

git-svn-id: trunk@5351 -
2006-11-13 07:42:48 +00:00
peter
99662d0bff * fixed insertlistcopy to not reverse the list
git-svn-id: trunk@5288 -
2006-11-08 17:06:26 +00:00
peter
e17b424e28 * refactor procsym procdef list
git-svn-id: trunk@5210 -
2006-11-03 18:44:46 +00:00
peter
47c16e33c1 * disable inline for 2.0.x
git-svn-id: trunk@5206 -
2006-11-03 17:06:57 +00:00
peter
4df4a4f7d1 * dynamic growth of blocks in tdynamicarray
* revert to old expand algorithms for fplist 

git-svn-id: trunk@5204 -
2006-11-03 13:44:44 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
peter
05183ac829 * AsmSymbolDict changed to FPHashObjectList
git-svn-id: trunk@5139 -
2006-11-01 00:22:13 +00:00
peter
ff6c1fa285 * remove tdirectorycache that is now in cfileutils
git-svn-id: trunk@5109 -
2006-10-31 09:07:01 +00:00
peter
cb246eb781 * Remove dos,strings units, use SysUtils instead
* replace split* functions with Extract* functions
  * Add Directory caching

git-svn-id: trunk@5102 -
2006-10-30 23:29:35 +00:00
micha
d704af7216 fix compilation for {$T+} linux/win
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +00:00
olle
05d6f0e94d macos: added a fake sysutils for use by compiler, and fixed some tests
git-svn-id: trunk@4549 -
2006-09-03 22:30:37 +00:00
peter
bf1c390027 * refactor import library generation
* support variable imports in internal linker

git-svn-id: trunk@4544 -
2006-09-03 19:22:31 +00:00
peter
6dd5ee65f5 * FCachedStr added to TFPHashObject for easier debugging
git-svn-id: trunk@3990 -
2006-06-28 20:26:42 +00:00
marco
2a5332e3bd * Link ordering working FreeBSD implementation
git-svn-id: trunk@3894 -
2006-06-19 14:17:45 +00:00
marco
179451dcfd * Initial linkordering subsystem. Not active (need t_* mods which I want in a different revision to ease merging)
git-svn-id: trunk@3788 -
2006-06-04 12:44:48 +00:00
peter
945cb29f24 * TFPHashList.Pack now also packs the items
* Free ObjRelocations

git-svn-id: trunk@3153 -
2006-04-05 12:36:17 +00:00
peter
7923a81cfd * range check error
git-svn-id: trunk@3134 -
2006-04-03 07:51:34 +00:00
peter
1a3cf9650e * prevent overflow in fphash
git-svn-id: trunk@3130 -
2006-04-02 20:48:36 +00:00
peter
fc6e4adf74 Merged revisions 3068,3070,3114 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

r3068 | peter | 2006-03-28 15:02:06 +0100 (Tue, 28 Mar 2006) | 2 lines

  * Add new TFPHashList and TFPHashObjectList

r3070 | peter | 2006-03-29 07:39:04 +0100 (Wed, 29 Mar 2006) | 2 lines

  * fix compile

r3114 | peter | 2006-04-01 23:47:50 +0100 (Sat, 01 Apr 2006) | 3 lines

  * remove debug writelns
  * enable vtable optimizer with -Xv

git-svn-id: trunk@3116 -
2006-04-02 00:13:03 +00:00
peter
38c0ae73da Merged revisions 2775,2788-2789 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2775 | peter | 2006-03-05 22:43:30 +0100 (Sun, 05 Mar 2006) | 2 lines

  * merge ppu changes to keep ppus the same

........
r2788 | peter | 2006-03-06 12:59:14 +0100 (Mon, 06 Mar 2006) | 2 lines

  * Add TFPList and TFPObjectList

........
r2789 | peter | 2006-03-06 13:01:37 +0100 (Mon, 06 Mar 2006) | 2 lines

  * fix powerpc

........

git-svn-id: trunk@2790 -
2006-03-06 12:04:44 +00:00
peter
785550d7e3 Merged revisions 2669,2673,2677,2683,2696,2699-2702,2704,2708,2712-2715,2718,2722-2723,2728-2730,2740,2769 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

........
r2669 | peter | 2006-02-23 09:31:21 +0100 (Thu, 23 Feb 2006) | 2 lines

  * add compiler dir

........
r2673 | peter | 2006-02-23 17:08:56 +0100 (Thu, 23 Feb 2006) | 2 lines

  * enabled more code

........
r2677 | peter | 2006-02-24 17:46:29 +0100 (Fri, 24 Feb 2006) | 2 lines

  * pe stub and headers

........
r2683 | peter | 2006-02-25 23:13:24 +0100 (Sat, 25 Feb 2006) | 2 lines

  * section options cleanup

........
r2696 | peter | 2006-02-26 20:27:41 +0100 (Sun, 26 Feb 2006) | 2 lines

  * fixed typecasts

........
r2699 | peter | 2006-02-26 23:04:32 +0100 (Sun, 26 Feb 2006) | 2 lines

  * simple linking works

........
r2700 | peter | 2006-02-27 09:44:50 +0100 (Mon, 27 Feb 2006) | 2 lines

  * internal linker script

........
r2701 | peter | 2006-02-27 12:05:12 +0100 (Mon, 27 Feb 2006) | 2 lines

  * make elf working again

........
r2702 | peter | 2006-02-27 14:04:43 +0100 (Mon, 27 Feb 2006) | 3 lines

  * disable dwarf for smartlinking with .a
  * fix section start in new .a file

........
r2704 | peter | 2006-02-27 18:30:43 +0100 (Mon, 27 Feb 2006) | 2 lines

  * stab section fixes

........
r2708 | peter | 2006-02-28 19:29:17 +0100 (Tue, 28 Feb 2006) | 2 lines

  * basic work to merge stabs sections

........
r2712 | peter | 2006-02-28 23:17:48 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload tmodules before linking

........
r2713 | peter | 2006-02-28 23:18:51 +0100 (Tue, 28 Feb 2006) | 2 lines

  * fixed stabs linking

........
r2714 | peter | 2006-02-28 23:19:19 +0100 (Tue, 28 Feb 2006) | 2 lines

  * show code and data size

........
r2715 | peter | 2006-02-28 23:25:35 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload .stabs from objdata after it is merged

........
r2718 | peter | 2006-03-01 12:24:38 +0100 (Wed, 01 Mar 2006) | 3 lines

  * memsize/datasize cleanup
  * check for exports/resources when adding module to linker

........
r2722 | peter | 2006-03-03 09:12:20 +0100 (Fri, 03 Mar 2006) | 2 lines

  * new TObjSymbol splitted from TAsmSymbol

........
r2723 | peter | 2006-03-03 14:08:55 +0100 (Fri, 03 Mar 2006) | 2 lines

  * coff fixes after recent objsymbol changes

........
r2728 | peter | 2006-03-03 22:43:04 +0100 (Fri, 03 Mar 2006) | 2 lines

  * fixed coff writer

........
r2729 | peter | 2006-03-04 01:10:32 +0100 (Sat, 04 Mar 2006) | 2 lines

  * fix read-only opening

........
r2730 | peter | 2006-03-04 01:11:16 +0100 (Sat, 04 Mar 2006) | 2 lines

  * Read edata from DLLs, basic work

........
r2740 | peter | 2006-03-04 21:13:43 +0100 (Sat, 04 Mar 2006) | 3 lines

  * deletedef added
  * don't remove defs from index when we are already clearing everything

........
r2769 | peter | 2006-03-05 21:42:33 +0100 (Sun, 05 Mar 2006) | 4 lines

  * moved TObj classes to ogbase
  * ObjSection.SymbolRefs and SymbolDefines list
  * DLL importing

........

git-svn-id: trunk@2771 -
2006-03-05 21:10:37 +00:00
michael
7449f99d5f + Removed all compatibility defines from compiler
git-svn-id: trunk@335 -
2005-06-09 21:14:22 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
Tomas Hajny
5f59b0f6b9 * fix for SIGSEGV due to access to uninitialized pointers in TList 2005-05-12 21:40:42 +00:00
Jonas Maebe
6578fb25bb - removed unused variables 2005-03-25 23:03:04 +00:00
peter
abb3f82ceb * getheapstatus fixes 2005-03-04 16:49:22 +00:00
marco
daf59fbd7e * getFPCheapstatus (no, FPC HEAP, not FP CHEAP!) 2005-02-28 15:38:38 +00:00