Commit Graph

408 Commits

Author SHA1 Message Date
florian
fc5e5d9258 * talignmentinfo must be packed, it is written to the ppu during streaming, further it is member of tsettings which packed too
* reordered fields of tsetting to avoid unaligned fields
* fixed compilation of arm after disableddircache was added
* increased ppu version

git-svn-id: trunk@13327 -
2009-06-27 11:14:19 +00:00
florian
2574851942 * ppu format change, ppu version increased
git-svn-id: trunk@13316 -
2009-06-22 21:49:39 +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
yury
9c9462cd5a * Insert DW_AT_low_pc and DW_AT_high_pc attributes for modules on Windows also. It solves debugging problems on Windows with dwarf debug info.
git-svn-id: trunk@13098 -
2009-05-04 18:36:08 +00:00
Jonas Maebe
79c70c52a7 * store/restore taddnode.resultrealdef to/from the ppufiles, and also
copy/compare it when copying/comparing taddnodes (necessary for inlined
    procedures, mantis #13596)

git-svn-id: trunk@13054 -
2009-04-27 21:03:11 +00:00
Jonas Maebe
7d459cf12a * the compiler now explicitly keeps track of the minimally guaranteed
alignment for each memory reference (mantis #12137, and
    test/packages/fcl-registry/tregistry1.pp on sparc). This also
    enables better code generation for packed records in many cases.
  o several changes were made to the compiler to minimise the chances
    of accidentally forgetting to set the alignment of memory references
    in the future:
    - reference_reset*() now has an extra alignment parameter
    - location_reset() can now only be used for non LOC_(C)REFERENCE,
      use location_reset_ref() for those (split the tloc enum so the
      compiler can catch errors using range checking)

git-svn-id: trunk@12719 -
2009-02-08 13:00:24 +00:00
florian
6e700b38a4 + changed absolute offset variable to aword to avoid range check errors when using addresses > $7fffffff
git-svn-id: trunk@12585 -
2009-01-23 13:28:35 +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
peter
2a952c89a5 * store vmt entries in ppu
* give a note if the visibility of a vmt entry is lower than
    the previous (parent) entry
  * refactor vmt method collection using the new always available
    vmt entries

git-svn-id: trunk@12159 -
2008-11-18 18:49:27 +00:00
Jonas Maebe
e5920bc2b8 * delay verbosity changes just like localswitches changes
* store a node's verbosity in the node so that e.g. disabling warnings
    also disables warnings for this node in pass_1
   (the above together fix mantis #12076)
  * save/restore verbosity with {$push}/{$pop} (mantis #12075)
  * if warnings/notes/hints are turned off, also do not count encountered
    ones for the totals (otherwise -Sew cannot be used properly in
    combination with {$warnings off}, because disabled warnings will still
    trigger a compiler error) -- this required adding -vw/-vn/-vh to all
    tests using -Sew/-Sen/-Seh
  - removed some superfluous state saving/restoring from firstpass()

git-svn-id: trunk@12025 -
2008-11-03 21:18:27 +00:00
florian
b178b08ba7 Merged revisions 11665-11738 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/unicodestring

........
  r11665 | florian | 2008-08-30 13:30:17 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * continued to work on unicodestring type support
........
  r11666 | florian | 2008-08-30 19:02:26 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * expectloc for wide/ansi/unicode strings is LOC_CONSTANT or LOC_REGISTER now
........
  r11667 | florian | 2008-08-30 20:42:37 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * more unicodestring stuff fixed, test results on win32 are already good
........
  r11670 | florian | 2008-08-30 23:21:48 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * first fixes for unix bootstrapping
........
  r11683 | ivost | 2008-09-01 12:46:39 +0200 (Mon, 01 Sep 2008) | 2 lines
  
      * fixed 64bit bug in iconvenc.pas
........
  r11689 | florian | 2008-09-01 23:12:34 +0200 (Mon, 01 Sep 2008) | 1 line
  
  * fixed several errors when building on unix
........
  r11694 | florian | 2008-09-03 20:32:43 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * fixed unix compilation
........
  r11695 | florian | 2008-09-03 21:01:04 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * bootstrapping fix
........
  r11696 | florian | 2008-09-03 21:07:18 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * more bootstrapping fixed
........
  r11698 | florian | 2008-09-03 22:47:54 +0200 (Wed, 03 Sep 2008) | 1 line
  
  + two missing compiler procs exported
........
  r11701 | florian | 2008-09-04 16:42:34 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + lazarus project for the linux rtl
........
  r11702 | florian | 2008-09-04 16:43:27 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + set unicode string procedures
........
  r11707 | florian | 2008-09-04 23:23:02 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  * fixed several type casting stuff
........
  r11712 | florian | 2008-09-05 22:46:03 +0200 (Fri, 05 Sep 2008) | 1 line
  
  * fixed unicodestring compilation on windows after recent unix changes
........
  r11713 | florian | 2008-09-05 23:35:12 +0200 (Fri, 05 Sep 2008) | 1 line
  
  + UnicodeString support for Variants
........
  r11715 | florian | 2008-09-06 20:59:54 +0200 (Sat, 06 Sep 2008) | 1 line
  
  * patch by Martin Schreiber for UnicodeString streaming
........
  r11716 | florian | 2008-09-06 22:22:55 +0200 (Sat, 06 Sep 2008) | 2 lines
  
  * fixed test
........
  r11717 | florian | 2008-09-07 10:25:51 +0200 (Sun, 07 Sep 2008) | 1 line
  
  * fixed typo when converting tunicodestring to punicodechar
........
  r11718 | florian | 2008-09-07 11:29:52 +0200 (Sun, 07 Sep 2008) | 3 lines
  
  * fixed writing of UnicodeString properties
  * moved some helper routines to unicode headers
........
  r11734 | florian | 2008-09-09 22:38:55 +0200 (Tue, 09 Sep 2008) | 1 line
  
  * fixed bootstrapping
........
  r11735 | florian | 2008-09-10 11:25:28 +0200 (Wed, 10 Sep 2008) | 2 lines
  
  * first fixes for persisten unicodestrings
........
  r11736 | florian | 2008-09-10 14:31:00 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-11663" from 
  http://svn.freepascal.org/svn/fpc/trunk
........
  r11737 | florian | 2008-09-10 21:06:57 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  * fixed unicodestring <-> variant handling
  * fixed unicodestring property reading
........

git-svn-id: trunk@11739 -
2008-09-10 20:14:31 +00:00
yury
fcceb9cfa1 * Removed/ifdefed/commented unused local variables.
git-svn-id: trunk@11430 -
2008-07-20 23:00:31 +00:00
florian
fca8883f27 * moved oo_copied into defoptions
* record symtables are now handled properly as well if a record is copied, resolves #9144
* fixed a memory leak when copying classes
* increased PPU version to 91

git-svn-id: trunk@11273 -
2008-06-24 20:23:45 +00:00
Jonas Maebe
dcbd0a3ea2 * changed ppureal from extended into bestreal -> units cross-compiled
from architectures with a larger maximum floating point precision
    for an architecture with a smaller maximum fp precision can also be
    used by native compilers on the target architectures (final fix for
    mantis #9165)

git-svn-id: trunk@11076 -
2008-05-24 12:11:06 +00:00
Jonas Maebe
0fb87b67b6 * changed string argument of tppufile.putstring into a constant
git-svn-id: trunk@10852 -
2008-05-01 12:34:47 +00:00
Jonas Maebe
86f90d8ac1 + support for setting the name of "main" (-XM command line parameter) in
the code using {$pascalmainname x} + storing it in the ppu file
    (and give a warning if it's overridden multiple times + test)

git-svn-id: trunk@10406 -
2008-03-01 13:05:01 +00:00
Jonas Maebe
f36e5411af * split cpu64bit compiler define into
a) cpu64bitaddr, which means that we are generating a compiler which
       will generate code for targets with a 64 bit address space/abi
    b) cpu64bitalu, which means that we are generating a compiler which
       will generate code for a cpu with support for 64 bit integer
       operations (possibly running in a 32 bit address space, depending
       on the cpu64bitaddr define)
   All cpus which had cpu64bit set now have both the above defines set,
   and none of the 32 bit cpus have cpu64bitalu set (and none will
   compile with it currently)
  + pint and puint types, similar to aint/aword (not pword because that
    that conflicts with pword=^word)
  * several changes from aint/aword to pint/pword
  * some changes of tcgsize2size[OS_INT] to sizeof(pint)

git-svn-id: trunk@10320 -
2008-02-13 20:44:00 +00:00
Jonas Maebe
8349cde7db * changed byte/word/longbool to be Delphi-compatible (+ similar changes
for qwordbool) + test:
    o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
    o these types are now all signed
    o converting an integer type to a byte/word/long/qwordbool using an
      explicit type cast keeps the integer's original value stored in the
      bool, instead of forcing it to ord(true)/ord(false)
    (mantis #10233 and #10613, implemented for all architectures, testsuite
     tested for ppc32, sparc and x86)
  * fixed some places where the rtl depended on longbool(true) having the
    value 1
  * extended several boolean tests (and adapted some to no longer assume
    that byte/word/long/qwordbool(true)=1)
  + support for converting to qwordbool in second_int_to_bool for x86, ppc
    and sparc

git-svn-id: trunk@9898 -
2008-01-24 21:30:55 +00:00
peter
793fd8fc09 * Add -Xg to help pages
* -Xg now produces a .dbg file with debuginfo
    that can be used by gdb. The main executable gets
    a debuglink section that references the .dbg file.

git-svn-id: trunk@9778 -
2008-01-17 01:20:37 +00:00
Jonas Maebe
cf295c8e88 * increased ppu version number because the ansi/widestring result patch
makes the generated code ABI-incompatible with code compiled with
    older compilers

git-svn-id: trunk@9719 -
2008-01-11 22:50:07 +00:00
Jonas Maebe
ada2c3ca35 * increased ppu version since the darwin name mangling change
breaks compatibility with previously compiled units

git-svn-id: trunk@9474 -
2007-12-16 11:46:57 +00:00
florian
5c96c4a671 + first part of support for an unicodestring type
git-svn-id: trunk@9382 -
2007-12-02 16:39:13 +00:00
Jonas Maebe
80b8494b5c * fixed wrong unaligned() changes
git-svn-id: trunk@9303 -
2007-11-20 12:15:47 +00:00
Jonas Maebe
3b4eba9f86 * fixed handling of unaligned in assignments
git-svn-id: trunk@9302 -
2007-11-20 11:59:15 +00:00
peter
cc77ccb52e * don't use readdata for getbyte/getword/getlongint
git-svn-id: trunk@9300 -
2007-11-19 22:52:58 +00:00
florian
4fed8c4ab5 + write aliasnames to ppu as well
+ ppudump updated
* ppu version increased

git-svn-id: trunk@9064 -
2007-11-02 20:50:01 +00:00
peter
273bfffe5b * store defstates in ppu, this field keeps the info what
is generated for a def so it can be reused, e.g. dwarf debuginfo

git-svn-id: trunk@8920 -
2007-10-23 21:50:10 +00:00
Jonas Maebe
df84ca49b4 * fixed tests/cg/opt/tretopt, and also in more cases
perform the transformation of x:=f(hiddencomplexresult, ..)
    -> f(x, ...) (the compiler now performs some very
    conservative escape analysis for such types)

git-svn-id: trunk@8361 -
2007-09-02 21:27:37 +00:00
Jonas Maebe
c5b3180f5f * save/load LinkOtherFrameworks to/from ppu files
git-svn-id: trunk@8344 -
2007-08-31 17:03:33 +00:00
Jonas Maebe
fc70aa545c * changed boolean fields in ttempinfo to a set for easier
extensibility without increasing the size of the record

git-svn-id: trunk@8199 -
2007-07-29 19:37:06 +00:00
Jonas Maebe
49a2084ea0 * fixed calling inline functions (with exit statements) from inside
finally blocks
  * fixed the handling of function results of inlined functions with
    exit statements
  + test for the above two issues and for bug fixed in r8091
  * copy may_be_in_reg field inside ttempcreatenode.dogetcopy (allows
    some more temps which were needlessly forced into memory to be in
    registers)

git-svn-id: trunk@8108 -
2007-07-20 16:49:35 +00:00
Jonas Maebe
28bab3fb4f - removed some unused variables
* fixed some (harmless) ptrint warnings
  - removed some commented code in agppcmpw
  * added one missing field in a typed constant in cp1251

git-svn-id: trunk@8081 -
2007-07-17 13:57:15 +00:00
daniel
b64558620f * Fix set endian handling.
git-svn-id: trunk@7918 -
2007-07-01 22:30:43 +00:00
daniel
52458b965f * ... and when writing too.
git-svn-id: trunk@7875 -
2007-06-30 20:43:15 +00:00
daniel
a90fe1dc41 * Add endian swapping for deflistsize and symlistsize.
git-svn-id: trunk@7874 -
2007-06-30 20:38:59 +00:00
daniel
935902de35 * Reals can need endian conversions too.
git-svn-id: trunk@7873 -
2007-06-30 19:48:27 +00:00
daniel
9b50dc572b * Change rest of compiler to system unit swapendian routines.
- Remove endian swapping routines from cutils.

git-svn-id: trunk@7859 -
2007-06-30 08:13:46 +00:00
daniel
b7b45919d0 * Convert to system unit endian swap routines.
* Endian conversion should be done while reading only, not while writing.

git-svn-id: trunk@7858 -
2007-06-30 07:54:50 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
yury
2b84a4643a * Fixed bug #6501: multiple resource files are correctly linked to executable.
It is done in the following way:

When unit is compiled, .rc file are compiled to .res and list of unit's resource files is stored in .ppu
Before final linking all program's .res files are collected into global .res file (.res files are easily concatenated). 
Then this global .res files is compiled to single .or file, which is linked to executable. 
As a result global resource index is created and the problem is fixed.

Old resource processing behavior still supported when tresinfo.rcbin is not set for target.
New resource processing is activated for windows and linux. Cross compiled windres can be used to compile .rc files on linux.

git-svn-id: trunk@7515 -
2007-05-29 15:51:02 +00:00
Jonas Maebe
a0b57eddb5 * new internal set format for big endian systems. Advantages:
* varsets ({$packset x}) are now supported on big endian targets
    * gdb now displays sets properly on big endian systems
    * cleanup of generic set code (in, include/exclude, helpers), all
      based on "bitpacked array[] of 0..1" now
  * there are no helpers available yet to convert sets from the old to
    the new format, because the set format will change again slightly
    in the near future (so that e.g. a set of 24..31 will be stored in
    1 byte), and creating two classes of set conversion helpers would
    confuse things (i.e., it's not recommended to use trunk currently for
    programs  which load sets stored to disk by big endian programs compiled
    by previous FPC versions)
  * cross-endian compiling has been tested and still works, but one case
    is not supported: compiling a compiler for a different endianess
    using a starting compiler from before the current revision (so first
    cycle natively, and then use the newly created compiler to create a
    cross-compiler)

git-svn-id: trunk@7395 -
2007-05-19 17:15:15 +00:00
peter
aa72495049 * fix resourcestring assignment in typedconst
git-svn-id: trunk@7339 -
2007-05-15 06:52:36 +00:00
Jonas Maebe
76b190b723 - removed caretn and related code
git-svn-id: trunk@7257 -
2007-05-04 10:53:25 +00:00
Jonas Maebe
3e5f64e16f * increased ppu version for setdef patch
git-svn-id: trunk@6366 -
2007-02-07 20:33:10 +00:00
Jonas Maebe
d614eab0fb * don't call afterconstruction/beforedestruction in case an exception
is raised in a constructor (mantis 8222)

git-svn-id: trunk@6202 -
2007-01-26 17:38:53 +00:00
florian
1d3a9cd87a * fixing writing of setdefs
* fixed copying of setdefs
* increased ppu version

git-svn-id: trunk@6189 -
2007-01-25 19:29:54 +00:00
Jonas Maebe
e1c994a3be * don't call blockwrite if there's nothing to write
git-svn-id: trunk@6166 -
2007-01-24 16:05:39 +00:00
Jonas Maebe
f2b07704b5 * proper initialised/used warnings for variables used
in complex with-statements + tests

git-svn-id: trunk@6024 -
2007-01-17 12:04:53 +00:00
yury
bcd86ef782 * added support for very big/small currency constants for non x86 CPUs.
git-svn-id: trunk@5937 -
2007-01-13 12:12:20 +00:00
peter
56379c37a9 * write vmt always according to the order of definitions
* remove obsolete lastvtableindex

git-svn-id: trunk@5811 -
2007-01-04 22:39:12 +00:00
Jonas Maebe
e4a2fb7f35 * fixed mantis 7975 and 7107 (ie 200311075 when working using somewhat
complex method calls in inlined procedures)

git-svn-id: trunk@5666 -
2006-12-21 21:03:47 +00:00
Jonas Maebe
26f81bfe08 * fixed arithmetic overflow when loading the recorddef of large
(> high(aint)/8 bytes) records from ppu files

git-svn-id: trunk@5595 -
2006-12-14 20:24:20 +00:00
peter
0557ddc342 * removed typed const, it is now handled by staticvarsym
* globalvarsym renamed to staticvarsym
  * fixed invalid regvar use in init when the finalize also uses the var

git-svn-id: trunk@5290 -
2006-11-08 21:04:22 +00:00
peter
3cae449fda * moved rtti to ncgrtti
git-svn-id: trunk@5219 -
2006-11-04 10:43:27 +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
d4d4309e44 * use unique symid and defid per module
git-svn-id: trunk@5061 -
2006-10-29 13:00:22 +00:00
florian
a0b1fbfa0e + write varstate for parameter symbols, enables constant folding for
inlined procedures loaded from ppu files

git-svn-id: trunk@5055 -
2006-10-29 10:46:47 +00:00
peter
0f6355e805 * fix property overriding
git-svn-id: trunk@5045 -
2006-10-28 20:35:53 +00:00
Jonas Maebe
3bb41dcf9a * fixed writing "packed" status of bitpacked records to ppu files.
Not sure how it ever worked, nor how exactly symtable ppu entries
    work -- but it's now stored with the recorddef (which also means
    that bitpacking is disabled currently for objects and classes,
    since they are based on tabstractrecorddef rather than trecorddef)

git-svn-id: trunk@4679 -
2006-09-21 20:39:36 +00:00
florian
d7fe89c63d * Real is now defined in the system unit being an unique type, fixes #7425
git-svn-id: trunk@4628 -
2006-09-17 08:58:20 +00:00
Jonas Maebe
733f559267 * also perform C varargs type conversions for cdecl procedures declared
as "varargs" instead of using an array of const parameter

git-svn-id: trunk@4572 -
2006-09-08 16:04:15 +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
Jonas Maebe
1f42ee201b + support for bitpacked records, except for:
* rtti
    * typed constants

git-svn-id: trunk@4489 -
2006-08-23 15:44:13 +00:00
Jonas Maebe
eccbc78e04 + support for bitpacked arrays:
+ use {$bitpacking on/+} to change the meaning of "packed"
      into "bitpacked" for arrays. This is the default for MacPas.
      You can also define individual arrays as "bitpacked", but
      this is not encouraged since this keyword is not known by
      other compilers and therefore makes your code unportable.
    + pack(unpackedarray,index,packedarray) to pack
      length(packedarray) elements starting at
      unpackedarray[index] into packedarray.
    + unpack(packedarray,unpackedarray,index) to unpack
      packedarray into unpackedarray, with the first
      element being stored at unpackedarray[index]
  * todo:
    * "open packed arrays" and rtti for packed arrays are not
      yet supported
    * gdb does not properly support bitpacked arrays

git-svn-id: trunk@4449 -
2006-08-19 12:54:12 +00:00
peter
eb829ea21b * store procdef messageinf in the ppu
git-svn-id: trunk@4386 -
2006-08-07 19:39:32 +00:00
Jonas Maebe
03302dc7c4 * fixed support for macpas & and | operators: they only work on booleans
now, and always perform short circuit boolean evaluation (also in {$b+})

git-svn-id: trunk@3745 -
2006-05-30 13:02:36 +00:00
florian
b98c2b4617 * made win64 ppus usable for win32 and win64 compilers
git-svn-id: trunk@3400 -
2006-05-01 16:18:48 +00:00
peter
ce58e15393 * fix coff section names to fix resourcestrings with
the external linker
  * create import libraries for dll imports, this uses
    the new objdata framework to generate the binary
    object files directly without needing an assembler pass
  * store import_dll and import_name in ppu
  * external linker uses import libraries
  * internal linker uses import info from symtables,
    no dlls are needed anymore

git-svn-id: trunk@3255 -
2006-04-17 20:48:22 +00:00
peter
95be416b9d * don't allow stringconst+integer
* change booleans in arraydef to set
  * set option in arraydef to indicate a constant string so
    a nicer type can be shown instead of array[0..x] of char

git-svn-id: trunk@3051 -
2006-03-27 07:22:02 +00:00
peter
37c81492ad Merged revisions 2827,2831,2837,2932-2980 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

r2827 (peter)
  * smartlinking of resourcestrings


r2831 (peter)
  * process_ea 64bit fixes


r2837 (peter)
  * linker script

git-svn-id: trunk@2981 -
2006-03-19 22:12:52 +00:00
Jonas Maebe
4db6e1ddb8 * moved type conversion of C varargs from tcallnode to
tarrayconstructornode.inset_typeconvs() and fixed them:
    * integers < 32 bit are converted to 32 bit (this was previously
      done in the code generator for some targets, and not for others)
    * currency is also converted to double for targets where currency = int64
    * single is converted to double, except for x86_64 (is at least
      necessary on darwin/ppc, darwin/i386 and linux/i386)
    * enums are converted to 32 bit ints
    * procvars are converted to pointers
    * proper errors are given for various unsupported types
   NOTE: in C, floating point constants are by default double, while in
    FPC they are of type extended. On platforms where extended <> double,
    such constants when passed to C varargs are automatically converted
    to double by default (gives warning). If you want to pass them as
    single or extended or get rid of the warning, use an explicit typecast
  * increased ppu version because of introduction of new node flag
    (nf_cvarargs for tarrayconstructornode)
  * fixed tests/test/cg/tprintf
  * changed tests/test/cg/cdecl/taoc5 to use explicit typecasts for
    floating point constants passed to C varargs functions.

git-svn-id: trunk@2949 -
2006-03-17 22:26:48 +00:00
peter
17bc033747 Merged revisions 2791-2793,2798-2800,2806-2825,2829-2830,2833,2839,2898 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2791 | peter | 2006-03-06 14:57:20 +0100 (Mon, 06 Mar 2006) | 3 lines

  * disable internal linker if -s is used
  * enable section smartlink by default for internal linker

........
r2792 | peter | 2006-03-06 14:58:23 +0100 (Mon, 06 Mar 2006) | 2 lines

  * support long sectionnames

........
r2793 | peter | 2006-03-06 15:04:12 +0100 (Mon, 06 Mar 2006) | 2 lines

  * register symbols in section also when reading .o files

........
r2798 | peter | 2006-03-07 10:08:07 +0100 (Tue, 07 Mar 2006) | 2 lines

  * symbolrefs need to be loaded from relocations when loading a .o

........
r2799 | peter | 2006-03-07 16:17:52 +0100 (Tue, 07 Mar 2006) | 3 lines

  * remove unreferenced sections
  * set stacksize in peopthaeder

........
r2800 | peter | 2006-03-07 17:02:46 +0100 (Tue, 07 Mar 2006) | 2 lines

  * objsection.fullname added

........
........
r2807 | peter | 2006-03-08 08:18:04 +0100 (Wed, 08 Mar 2006) | 2 lines

  * powerpc64 fixes

........
r2808 | peter | 2006-03-08 08:35:53 +0100 (Wed, 08 Mar 2006) | 2 lines

  * register x86_64_pecoff

........
r2809 | peter | 2006-03-08 11:26:38 +0100 (Wed, 08 Mar 2006) | 2 lines

  * optimize and cleanup matches()

........
r2810 | peter | 2006-03-08 12:25:28 +0100 (Wed, 08 Mar 2006) | 2 lines

  * small tweak to readdata to copy values direct without calling move()

........
r2811 | peter | 2006-03-08 15:55:21 +0100 (Wed, 08 Mar 2006) | 2 lines

  * compile fix

........
........
........
........
........
........
r2817 | peter | 2006-03-09 14:20:52 +0100 (Thu, 09 Mar 2006) | 2 lines

  * more readable with long secnames

........
........
........
........
........
........
........
........
r2825 | peter | 2006-03-10 09:52:05 +0100 (Fri, 10 Mar 2006) | 2 lines

  * don't initialize/finalize external variables

........
r2829 | peter | 2006-03-10 10:58:08 +0100 (Fri, 10 Mar 2006) | 2 lines

  * merge 64bit assembler

........
r2830 | peter | 2006-03-10 12:25:08 +0100 (Fri, 10 Mar 2006) | 2 lines

  * TElfAssembler rename

........
r2833 | peter | 2006-03-10 15:22:27 +0100 (Fri, 10 Mar 2006) | 3 lines

  * support & prefix to force identifier parsing, used to access fields that
    have the names of a register

........
r2839 | peter | 2006-03-10 19:37:11 +0100 (Fri, 10 Mar 2006) | 2 lines

  * merge stabs section flags

........
r2898 | peter | 2006-03-12 23:18:18 +0100 (Sun, 12 Mar 2006) | 2 lines

  * reorder instructions for better first match

........

git-svn-id: trunk@2902 -
2006-03-13 09:29:57 +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
Jonas Maebe
69671a1a5c * increased ppu version because the ppu files are different since the
previous commit

git-svn-id: trunk@2760 -
2006-03-05 13:37:10 +00:00
florian
b06643a1eb * tai_const refactored
git-svn-id: trunk@2323 -
2006-01-22 12:58:38 +00:00
peter
66f8276445 * refactor booleans in systeminfo structure, they are now flags
* support for case aware filesystems (Windows), they do now only
    one lookup if a file exists
  * add -WI option to generate import section for DLL imports or
    let the linker handle it. Default is still import section until
    the Makefiles are fixed, then the generation can be left to the
    linker

git-svn-id: trunk@2274 -
2006-01-13 15:13:26 +00:00
peter
95879fe8a7 * basic support for generic classes
git-svn-id: trunk@2020 -
2005-12-21 10:11:15 +00:00
florian
a1189a9d64 * exports info handling refactored, -E will be passed to ld if necessary
git-svn-id: trunk@1922 -
2005-12-10 22:00:33 +00:00
daniel
c0b4678873 * Rename unit crc to fpccrc to avoid name conflict in packages
git-svn-id: trunk@1856 -
2005-12-01 16:45:44 +00:00
peter
ec4d287fd8 * aktoutputformat removed, add new paraXX vars for target
assembler and debuginfo and use these vars to override
    the defaults for the target after the parameters are read
  * remove not-maintained and tested gdb code

git-svn-id: trunk@1201 -
2005-09-25 21:17:37 +00:00
michael
3392189fb0 + Implemented resources for ELF
git-svn-id: trunk@956 -
2005-08-28 09:35:35 +00:00
peter
9cda65c4b0 * support for widestrings in tconstsym
* fix widestring writing for stringconstn

git-svn-id: trunk@646 -
2005-07-18 12:54:15 +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
Jonas Maebe
bfa2301575 * const record parameters > 8 bytes are now passed by reference for non
cdecl/cppdecl procedures on Mac OS/Mac OS X to fix compatibility with
    GPC (slightly more efficient than Metrowerks behaviour below, but
    less efficient in most cases than our previous scheme)
  + "mwpascal" procedure directive to support the const record parameter
    behaviour of Metrowerks Pascal, which passes all const records by
    reference
2005-03-27 14:10:52 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
olle
469d1cc5cf + ppu files now has FPas as creator code on MacOS 2005-01-24 17:46:18 +00:00
peter
8d251e8506 * unit mapping rewrite
* new derefmap added
2005-01-19 22:19:41 +00:00
olle
7572f3a539 * rework of macro subsystem
+ exportable macros for mode macpas
2005-01-09 20:24:43 +00:00
peter
9c0be16488 implicit load of variants unit 2004-12-06 19:23:05 +00:00
peter
e740a66636 * tparaitem removed, use tparavarsym instead
* parameter order is now calculated from paranr value in tparavarsym
2004-11-15 23:35:30 +00:00
peter
6458bd0ce1 * tvarsym splitted 2004-11-08 22:09:58 +00:00
peter
33a834821f * paraloc branch merged 2004-09-21 17:25:12 +00:00
peter
d763f9e142 browser disabled
uf_local_symtable ppu flag when a localsymtable is stored
2004-08-27 21:59:26 +00:00
florian
4b3ed28d07 * morphos now takes any pointer var. as libbase
* alignment for sparc fixed
  * int -> double conversion on sparc fixed
2004-08-22 20:11:38 +00:00
Jonas Maebe
c7544e69de + padalgingment field for recordsymtables (saved by recorddefs)
+ support for Macintosh PowerPC alignment (if the first field of a record
    or union has an alignment > 4, then the record or union size must be
    padded to a multiple of this size)
2004-08-17 16:29:21 +00:00
Jonas Maebe
1563d986c5 * inline procedures at the node tree level, but only under some very
limited circumstances for now (only procedures, and only if they have
    no or only vs_out/vs_var parameters).
  * fixed ppudump for inline procedures
  * fixed ppudump for ppc
2004-07-12 09:14:04 +00:00
peter
077197e5c4 * new format 2004-07-09 23:11:05 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
peter
c553f6b320 * add DEBUGINFO symbol to reference the .o file that includes the
stabs info for types and global/static variables
  * debuginfo flag added to ppu to indicate whether debuginfo is
    generated or not
2004-05-19 21:16:12 +00:00
daniel
b721e5872c * Prepare compiler infrastructure for multiple ansistring types 2004-04-29 19:56:36 +00:00
peter
e46cdcea48 * constants ordinals now always have a type assigned
* integer constants have the smallest type, unsigned prefered over
    signed
2004-03-23 22:34:49 +00:00
florian
fabb9c33ac * top_symbol killed
+ refaddr to treference added
  + refsymbol to treference added
  * top_local stuff moved to an extra record to save memory
  + aint introduced
  * tppufile.get/putint64/aint implemented
2004-02-27 10:21:04 +00:00
florian
35b8e93073 * fixed more alignment issues 2004-01-30 13:42:03 +00:00
peter
f663d2488f * cross unit inlining fixed 2003-11-10 22:02:52 +00:00
peter
6878c55c80 * write derefdata in a separate ppu entry 2003-10-22 20:39:59 +00:00
peter
8af51ea6d3 * locals and paras are allocated in the code generation
* tvarsym.localloc contains the location of para/local when
    generating code for the current procedure
2003-09-23 17:56:05 +00:00
Jonas Maebe
024590b0fa * fixed some range check errors that occurred on big endian systems
* slightly optimized the swap*() functions
2003-07-05 20:06:28 +00:00
Jonas Maebe
404d344d92 * lots of newra fixes (need getfuncretparaloc implementation for i386)!
* renamed all_intregisters to volatile_intregisters and made it
    processor dependent
2003-06-17 16:34:44 +00:00
peter
e7975c7592 * re-resolving added instead of reloading from ppu
* tderef object added to store deref info for resolving
2003-06-07 20:26:32 +00:00
peter
7054a48b4d * removed systems unit 2003-05-26 19:39:51 +00:00
Jonas Maebe
035ad566f9 * endian fix is now done using a define instead of with source_info 2003-05-26 15:49:54 +00:00
Jonas Maebe
f85bec0291 * endian fixes 2003-05-24 13:37:10 +00:00
peter
895e03b854 * write header for crc_only 2003-05-23 17:03:51 +00:00
peter
f4b818fc1d * removed funcretn,funcretsym, function result is now in varsym
and aliases for result and function name are added using absolutesym
  * vs_hidden parameter for funcret passed in parameter
  * vs_hidden fixes
  * writenode changed to printnode and released from extdebug
  * -vp option added to generate a tree.log with the nodetree
  * nicer printnode for statements, callnode
2003-04-25 20:59:33 +00:00
florian
47a3437dba * comp is now written with its bit pattern to the ppu instead as an extended 2003-04-24 13:03:01 +00:00
daniel
9e2084b8d5 * Further register allocator work. Compiler now smaller with new
allocator than without.
  * Somebody forgot to adjust ppu version number
2003-04-23 14:42:07 +00:00
peter
8da3f59d32 * vs_hidden released 2003-04-10 17:57:52 +00:00
peter
ec66760702 * store symoptions also for procdef
* check symoptions (private,public) when calculating possible
    overload candidates
2003-03-17 15:54:22 +00:00
daniel
55a161bbbf * Tregister changed into a record 2003-01-08 18:43:56 +00:00
peter
bfd72ad5d5 * merged changes from 1.0.7 up to 04-11
- -V option for generating bug report tracing
    - more tracing for option parsing
    - errors for cdecl and high()
    - win32 import stabs
    - win32 records<=8 are returned in eax:edx (turned off by default)
    - heaptrc update
    - more info for temp management in .s file with EXTDEBUG
2002-11-15 01:58:45 +00:00
peter
798289b1f3 * only use init tables for threadvars 2002-10-14 19:42:33 +00:00
peter
98dd65b0f3 * inlining is now also allowed in interface
* renamed write/load to ppuwrite/ppuload
  * tnode storing in ppu
  * nld,ncon,nbas are already updated for storing in ppu
2002-08-18 20:06:23 +00:00
peter
8082f79ea6 * first things tai,tnode storing in ppu 2002-08-15 19:10:35 +00:00
carl
9d4f336f74 + fpu emulation helpers (ppu checking also) 2002-08-15 15:09:41 +00:00
florian
af4302bc67 * more fixes for ppc calling conventions 2002-08-13 21:40:55 +00:00
peter
ac71268ce6 * saving of asmsymbols in ppu supported
* asmsymbollist global is removed and moved into a new class
    tasmlibrarydata that will hold the info of a .a file which
    corresponds with a single module. Added librarydata to tmodule
    to keep the library info stored for the module. In the future the
    objectfiles will also be stored to the tasmlibrarydata class
  * all getlabel/newasmsymbol and friends are moved to the new class
2002-08-11 13:24:10 +00:00
florian
030eae46de * a couple of interface related fixes 2002-08-09 07:33:01 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
5e7a1e3729 * removed unused units
* use tlocation.size in cg.a_*loc*() routines
2002-04-04 19:05:54 +00:00
Jonas Maebe
7fb55bf4e4 + a_loadfpu_* and a_loadmm_* methods in tcg
* register allocation is now handled by a class and is mostly processor
    independent (+rgobj.pas and i386/rgcpu.pas)
  * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  * some small improvements and fixes to the optimizer
  * some register allocation fixes
  * some fpuvaroffset fixes in the unary minus node
  * push/popusedregisters is now called rg.save/restoreusedregisters and
    (for i386) uses temps instead of push/pop's when using -Op3 (that code is
    also better optimizable)
  * fixed and optimized register saving/restoring for new/dispose nodes
  * LOC_FPU locations now also require their "register" field to be set to
    R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  - list field removed of the tnode class because it's not used currently
    and can cause hard-to-find bugs
2002-03-31 20:26:33 +00:00
armin
ed209a3961 + initialize threadvars defined local in units 2002-03-28 16:07:52 +00:00
florian
b60666ae1f + parasym to tparaitem added 2001-12-06 17:57:33 +00:00
carl
8393b73e58 * updated record size 2001-09-22 04:51:58 +00:00
peter
f88f6eb571 * rtti/init table updates
* rttisym for reusable global rtti/init info
  * support published for interfaces
2001-08-30 20:13:52 +00:00
peter
49481a0c63 * v10 merges 2001-06-27 21:37:36 +00:00
peter
e24474d9ac * -Ur switch (merged)
* masm fixes (merged)
  * quoted filenames for go32v2 and win32
2001-06-18 20:36:23 +00:00
peter
25e006b364 * endian define 2001-05-18 22:28:59 +00:00
peter
6c7708c1e0 * ppu object to class rewrite
* move ppu read and write stuff to fppu
2001-05-06 14:49:16 +00:00
florian
82a6a7ed95 + basic variant type support in the compiler 2001-03-22 00:10:58 +00:00
Jonas Maebe
c91a23c27d * new constant handling: from now on, hex constants >$7fffffff are
parsed as unsigned constants (otherwise, $80000000 got sign extended
    and became $ffffffff80000000), all constants in the longint range
    become longints, all constants >$7fffffff and <=cardinal($ffffffff)
    are cardinals and the rest are int64's.
  * added lots of longint typecast to prevent range check errors in the
    compiler and rtl
  * type casts of symbolic ordinal constants are now preserved
  * fixed bug where the original resulttype wasn't restored correctly
    after doing a 64bit rangecheck
2000-12-07 17:19:42 +00:00
peter
451723647e * symtable splitted, no real code changes 2000-10-31 22:02:46 +00:00
peter
a71e44ac49 * use defines.inc 2000-09-24 15:06:10 +00:00
peter
0d881bb510 * new ppu version 2000-08-13 13:04:38 +00:00
michael
650fbb86aa + removed logs 2000-07-13 11:32:24 +00:00
michael
e7aca136a1 + Initial import 2000-07-13 06:29:38 +00:00
pierre
f63815853e CRC stuff moved to CRC unit 2000-05-15 13:19:04 +00:00
pierre
7c324b13b2 * adapted to Delphi 3 2000-05-12 08:58:51 +00:00
florian
889e43db8a * fixed some vmt problems, especially related to overloaded methods
in objects/classes
2000-05-11 06:53:48 +00:00
pierre
97417dcf26 * ORDERSOURCES released 2000-02-29 21:58:31 +00:00
peter
4a4a24b6e8 * log truncated 2000-02-09 13:22:42 +00:00
peter
e525797c51 * updated copyright to 2000 2000-01-07 01:14:18 +00:00
peter
11b8f997c7 * INFTPPU define to write the ppu of the interface to .ppu.intf 1999-12-02 11:29:07 +00:00
peter
0512ba80fb + ttype, tsymlist 1999-11-30 10:40:42 +00:00
peter
312ca8700f * makefile updates to work with new fpcmake 1999-11-23 09:42:38 +00:00
pierre
e4bfedf924 * Nextoverloading ordering fix 1999-11-21 01:42:37 +00:00
pierre
b528749138 * Notes/Hints for local syms changed to
Set_varstate function
1999-11-18 15:34:44 +00:00
pierre
62da9bd4c0 * Notes/hints changes 1999-11-17 17:04:58 +00:00
peter
0887060ff2 * truncated log to 20 revs 1999-11-06 14:34:16 +00:00
peter
5db2ac22e5 * ppu header writting now uses currentppuversion 1999-09-17 09:14:56 +00:00
pierre
fc0d67a752 + error if PPU modulename is different from what is searched
(8+3 limitations!)
  + cond ORDERSOURCES to allow recompilation of FP
    if symppu.inc is changed (need PPUversion change!)
1999-09-16 13:27:08 +00:00
pierre
910372616a * typo correction 1999-09-16 11:34:44 +00:00
florian
a9d8bfa1f7 * some bug fixes (e.g. must_be_valid and procinfo.funcret_is_valid)
* most things for stored properties fixed
1999-09-10 18:48:00 +00:00
pierre
5536344e9f + startup conditionnals stored in PPU file for debug info 1999-08-31 15:47:56 +00:00
pierre
c2abde1296 * tempclosing of ppufiles under dos was wrong 1999-08-30 16:21:40 +00:00
pierre
3d12f8119a + tppufile.tempclose and tempopen added
* some changes so that nothing is writtedn to disk while
    calculating CRC only
1999-08-27 10:48:40 +00:00
michael
85ff3e15db + changes for resourcestrings 1999-08-24 12:01:32 +00:00
peter
926a6c2d3e + normalset,smallset writing 1999-08-15 10:47:48 +00:00
florian
cb114f1453 * more changes to compile for the Alpha 1999-08-02 23:13:19 +00:00
peter
07bb58295b * alignment is now saved in the symtable
* C alignment added for records
  * PPU version increased to solve .12 <-> .13 probs
1999-07-23 16:05:18 +00:00
peter
0d38c66ff0 * fixed linking for units without linking necessary 1999-07-05 16:21:26 +00:00
peter
58cbc3e795 * new link writing to the ppu, one .ppu is needed for all link types,
static (.o) is now always created also when smartlinking is used
1999-07-03 00:29:45 +00:00
peter
a47afc3857 * removed oldppu code
* warning if objpas is loaded from uses
  * first things for new deref writing
1999-05-13 21:59:19 +00:00
florian
47fd93dfa5 * more fixes to get it with delphi running 1999-05-05 09:19:03 +00:00
florian
78d13ec796 * changes to compile it with Delphi 4.0 1999-05-04 21:44:30 +00:00
peter
49786e5fe5 * farpointerdef moved into pointerdef.is_far 1999-04-26 18:29:54 +00:00
peter
884c517b18 * release storenumber,double_checksum 1999-04-26 13:31:24 +00:00
peter
ee1c52c090 * header extended to 40 bytes so there is room for future 1999-04-26 09:33:07 +00:00
peter
d9e1c47d84 * fixes for storenumber 1999-04-17 13:16:19 +00:00
pierre
ab9465df1b + double_checksum code added 1999-04-07 15:39:29 +00:00
peter
1a4dad3029 * renamed loadunit_int -> loadunit 1999-03-02 13:49:18 +00:00
pierre
0669413251 + -b and -bl options work !
+ cs_local_browser ($L+) is disabled if cs_browser ($Y+)
    is not enabled when quitting global section
  * local vars and procedures are not yet stored into PPU
1999-02-22 13:06:52 +00:00
peter
746f2e1510 * save in the ppu if linked with obj file instead of using the
library flag, so the .inc files are also checked
1999-02-16 00:48:23 +00:00
pierre
9709b802ba + linkofiles splitted inot linkofiles and linkunitfiles
because linkofiles must be stored with directory
    to enabled linking of different objects with same name
    in a different directory
1999-02-05 08:54:24 +00:00
peter
6ee9d913cd + farpointer type
* absolutesym now also stores if its far
1998-12-30 22:15:45 +00:00
pierre
65e4bc90c1 * corrected problems with rangecheck
+ added needed code for no rangecheck  in CRC32 functions in ppu unit
  * enumdef lso need its rangenr reset to zero
    when calling reset_global_defs
1998-11-30 16:34:45 +00:00
peter
752857f403 * tp7 didn't like my ifopt H+ :( 1998-11-16 15:41:39 +00:00
peter
aace149d8c * H+ fixes 1998-11-16 12:17:59 +00:00
pierre
dac2986b7f * ppu problems for m68k fixed (at least in cross compiling)
* one last memory leak for sysamiga fixed
  * the amiga RTL compiles now completely !!
1998-10-14 10:45:05 +00:00
peter
8e85a889de + aktmodeswitches 1998-09-24 23:49:05 +00:00
pierre
9589f619d7 * browser bugfixes
was adding a reference when looking for the symbol
    if -bSYM_NAME was used
1998-09-23 15:38:59 +00:00
peter
d7c4af3627 * store number of defs in ppu file 1998-09-21 10:00:07 +00:00
pierre
d11f7636be + added vmt_offset in tobjectdef.write for fututre use
(first steps to have objects without vmt if no virtual !!)
  + added fpu_used field for tabstractprocdef  :
    sets this level to 2 if the functions return with value in FPU
    (is then set to correct value at parsing of implementation)
    THIS MIGHT refuse some code with FPU expression too complex
    that were accepted before and even in some cases
    that don't overflow in fact
    ( like if f : float; is a forward that finally in implementation
     only uses one fpu register !!)
    Nevertheless I think that it will improve security on
    FPU operations !!
  * most other changes only for UseBrowser code
    (added symtable references for record and objects)
    local switch for refs to args and local of each function
    (static symtable still missing)
    UseBrowser still not stable and probably broken by
    the definition hash array !!
1998-09-21 08:45:05 +00:00
pierre
be29a0b86d + improvement on the usebrowser part
(does not work correctly for now)
1998-09-18 08:01:35 +00:00
peter
85b4b1fde2 * merge fixes 1998-09-11 15:16:47 +00:00
peter
35a8d2e4fd * m68k and palmos updates from surebugfixes 1998-08-31 12:26:20 +00:00
peter
cc64a929aa * static/shared linking updates 1998-08-17 09:17:43 +00:00
peter
befed16714 * write extended to ppu file
* new version 0.99.7
1998-08-11 15:31:35 +00:00
pierre
e64d70d4cd * removed a remaining ifndef NEWPPU
replaced by ifdef OLDPPU
  * added uf_finalize to ppu unit
1998-06-25 10:51:00 +00:00
peter
c2d5abdfed + targetcpu
* cleaner pmodules for newppu
1998-06-16 08:56:17 +00:00
peter
c614d62eaf * working browser and newppu
* some small fixes against crashes which occured in bp7 (but not in
    fpc?!)
1998-06-13 00:10:04 +00:00
pierre
5ad339b3d8 + added procedure directive parsing for procvars
(accepted are popstack cdecl and pascal)
  + added C vars with the following syntax
    var C calias 'true_c_name';(can be followed by external)
    reason is that you must add the Cprefix

    which is target dependent
1998-06-09 16:01:33 +00:00
peter
f4db879aed * fixes for newppu, remake3 works now with it 1998-05-28 14:40:25 +00:00
peter
7b28ebd6ef * symtable.pas splitted into includefiles
* symtable adapted for $ifdef NEWPPU
1998-05-27 19:45:02 +00:00
peter
5e9f2c469f + the ppufile object unit 1998-05-12 10:56:07 +00:00