Commit Graph

173 Commits

Author SHA1 Message Date
Karoly Balogh
4a1db1dc79 m68k: initial compiler changes for Human68k (Sharp X68000) support 2023-11-30 23:43:27 +00:00
Pierre Muller
6f5c6ac410 Add Exception backtrace when compiled with -dDUMP_EXCEPTION_BACKTRACE 2023-11-20 01:05:11 +03:00
Karoly Balogh
88959bdda7 * m68k-sinclairql: fix the inclusion of the target proper 2022-01-25 12:04:49 +01:00
florian
ff3acfb8cd * cleanup of 2.7.0 defines 2021-10-31 13:20:28 +01:00
Károly Balogh
84e36cce0f * fix morphos info unit name after r44454
git-svn-id: trunk@44456 -
2020-03-31 05:12:59 +00:00
Károly Balogh
69fb20784a * fix source info for darwin (and some other systems), this fixes darwin hosted cross builds after r44407
git-svn-id: trunk@44454 -
2020-03-31 04:53:38 +00:00
svenbarth
576a50f690 * print used unit scopes
git-svn-id: trunk@38944 -
2018-05-07 19:48:26 +00:00
svenbarth
295ca4de4b * adjust WritePathList() to work with TCmdStrList instead of TSearchPathList (and rename it accordingly)
git-svn-id: trunk@38943 -
2018-05-07 19:48:23 +00:00
florian
c671683e80 + patch by Denis Kozlov to add date/time tokens: %DATEYEAR%, %DATEMONTH%, %DATEDAY%, %TIMEHOUR%, %TIMEMINUTE%, %TIMESECOND%
+ test

git-svn-id: trunk@38329 -
2018-02-24 12:50:55 +00:00
svenbarth
2095cca98f * ensure that source info is set correctly on Win64 by including i_win for all Windows targets (this is especially important when cross compiling (e.g. Java) as otherwise the utilities won't be found correctly)
git-svn-id: trunk@36871 -
2017-08-11 20:27:43 +00:00
nickysn
15e8757768 + use fpwidestring in the compiler once again on unix-like hosts. The
regressions, mentioned previously are now fixed after r36461

git-svn-id: trunk@36462 -
2017-06-08 23:53:08 +00:00
nickysn
684d9ebb2e - partially reverted r36451 (effectively disabling code page aware messages
under unix-likes), because it turned out that pulling in unit fpwidestring
  into the compiler sources causes testsuite regressions under linux. This
  needs to be resolved somehow.

git-svn-id: trunk@36452 -
2017-06-08 19:23:31 +00:00
nickysn
408b7a8807 + enable the code page aware compiler messages for all unices
git-svn-id: trunk@36451 -
2017-06-08 18:39:09 +00:00
nickysn
a34f531661 + implemented support for codepage aware compiler messages. It can be enabled
per platform (currently only enabled for win32 and win64). Enabling it forces
  code page conversion from the codepage of the .msg file to CP_ACP, before
  writing the message to the console. Not enabling it keeps the previous
  behaviour of not doing any kind of code page conversion for messages. This
  feature should be tested and enabled per platform, because it requires code
  page conversion support in the rtl (so it may require adding the appropriate
  extra units, such as fpwidestring). When this feature is enabled for all
  platforms, we can start keeping only one .msg file per language, because
  having extra .msg files for different encodings for the same language becomes
  redundant, since the compiler can do code page conversion to whatever code
  page the console uses.

git-svn-id: trunk@36450 -
2017-06-08 16:11:33 +00:00
nickysn
9e2133c1b1 - disable SHOWUSEDMEM when EXTDEBUG is defined, because it breaks building a
snapshot with EXTDEBUG, due to the following fpmake error:
    The installer encountered the following error:
    Compiler returns invalid information, check if fpc -iV works

git-svn-id: trunk@36250 -
2017-05-19 13:35:38 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
pierre
7e348a40a3 Use general_e_exception_raised if Compiler generates an uncaught exception
git-svn-id: trunk@31801 -
2015-09-23 16:49:24 +00:00
Jonas Maebe
b18ba8e85b * syncrhonised with trunk up till r28471
git-svn-id: branches/hlcgllvm@28495 -
2014-08-19 20:23:11 +00:00
Károly Balogh
4431ba2c08 merged/updated AROS/i386 target to trunk from AROS branch, to support Marcus Sackrow's work on AROS support which will hopefully benefit all Amiga-like targets (classic, MorphOS) on the long run. Compiler only, RTL comes in the next run.
git-svn-id: trunk@28432 -
2014-08-17 18:18:07 +00:00
Jonas Maebe
5409d4321e + basic llvm bitcode (textual format) writer:
o no support yet for many ait_* types, although eventually most of them
     shouldn't be generated at all for the llvm target
   o no support yet for calling "opt" (which optimises llvm bitcode) before
     calling llc (which translates llvm bitcode into native code) -- compile
     with -s and manually call "opt" with -std-compile-opts, -O1, -O2 or -O3
     if you want to experiment
   o override the assembler writer with the llvm one when compiling an llvm-
     targeting compiler
   o override the assembler file extension with .ll when compiling an llvm-
     targeting compiler

git-svn-id: branches/hlcgllvm@26054 -
2013-11-11 11:16:25 +00:00
svenbarth
364a874623 Addendum to 23746: use FPC_FULLVERSION instead of FPC_VERSION/FPC_RELEASE
git-svn-id: trunk@23747 -
2013-03-09 15:45:24 +00:00
svenbarth
b298483bb8 Allow compilation of the compiler with 2.6.x again on Unix systems.
compiler.pas:
	check for "FPC_VERSION>2 or FPC_RELEASE>6" before using unixcp

git-svn-id: trunk@23746 -
2013-03-09 15:33:13 +00:00
yury
268b2d56d7 * Fixed displaying of compilation time in some cases. For example, if the compilation time is 0.99 seconds, it has been displayed as 0.10. Now it is correctly displayed as 1.0.
git-svn-id: trunk@23689 -
2013-03-04 16:02:51 +00:00
yury
ee0a338127 * Use the unixcp unit to set a default code page for ansistrings on unix-like systems.
git-svn-id: trunk@23671 -
2013-02-28 18:24:29 +00:00
tom_at_work
acbc94e0fd - initial support for the android/arm target in the compiler; resulting .so's can be used for Android/ARM app development.
- basic rtl support using system calls
- fp(c)make/fppkg/makefile support

todo:
- revisit systems/t_android.pas: mostly duplicate with t_linux.pas, containing
lots of unnecessary code
- revisit rtl changes
- android ndk header translation import
- better app build/packaging support
- android/x86 support

git-svn-id: branches/targetandroid@21061 -
2012-04-26 09:36:42 +00:00
Jonas Maebe
462de0f5fd + AIX target definition and info for the compiler and ppudump
git-svn-id: trunk@20790 -
2012-04-11 18:00:29 +00:00
florian
562961fd42 * catch EOSError, EIOError and IOutOfMemory exceptions inside the compiler
so a proper error message is written (resolves ), 
  EOutOfMemory is not handle perfectly because it could be that the exception
  handling requires again a memory allocation

git-svn-id: trunk@18132 -
2011-08-07 09:18:07 +00:00
florian
13285ab264 o several strings changed into ansistrings, resolves , no compilation speed degrations measurable
* TCmdStr changed into an ansistring
 * command line parameter handling uses now ansistrings
 * message handling parameters are now ansistrings

git-svn-id: trunk@17469 -
2011-05-15 14:53:31 +00:00
Legolas
527dd56b28 + Initial Wii support
git-svn-id: trunk@16888 -
2011-02-07 16:56:45 +00:00
florian
34227e811d + patch by Sven Barth to add native NT rtl support to the compiler, resolves
git-svn-id: trunk@14565 -
2010-01-07 17:42:11 +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
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
florian
e9543b90d0 + introduced default_settings record to enable compiler unit users to turn off default switches
git-svn-id: trunk@10995 -
2008-05-18 09:39:17 +00:00
peter
a724d80e81 * debuginfo initialized per unit
git-svn-id: trunk@8918 -
2007-10-23 18:19:17 +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
peter
e2db0a3982 * cleanup current module status
* new set_current_module function that sets the current_module and
    all related variables. Also closes scanner files if required, but
    that might still need some optimization to prevent closing/opening
    files too often

git-svn-id: trunk@7428 -
2007-05-23 13:33:53 +00:00
florian
7b39b54951 * set starttime earlier so time stamps don't get messed up
git-svn-id: trunk@6228 -
2007-01-27 13:45:49 +00:00
tom_at_work
106fe68ce6 * renamed TStringList to TCmdStrList, in general use TCmdStr instead of shortstrings to fix bug
git-svn-id: trunk@6215 -
2007-01-26 22:29:39 +00:00
florian
dac9896a6d + added -vs for time stamping
git-svn-id: trunk@6176 -
2007-01-24 20:32:06 +00:00
peter
78499f85dd * symbian support from Felipe
git-svn-id: trunk@6051 -
2007-01-18 20:24:10 +00:00
pierre
fa2a66c48d + Reintroduce SymbolInfo functions
git-svn-id: trunk@6017 -
2007-01-17 05:45:07 +00:00
florian
fa493c7898 * move exception mask initialization to procedure compile
* reset exception mask at compiler exit
* use math routines for exception masking

git-svn-id: trunk@5841 -
2007-01-07 12:24:39 +00:00
Legolas
96e1c482bc * compiler part of first Nintendo DS port
git-svn-id: trunk@5592 -
2006-12-14 17:32:16 +00:00
peter
5cd8775d38 * show only totals for memdebug
git-svn-id: trunk@5196 -
2006-11-03 11:24:02 +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
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
peter
d07f470b71 * remove ifdef fpc
git-svn-id: trunk@4819 -
2006-10-07 13:43:34 +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
Tomas Hajny
c17b57db07 + Statistics of warnings, hints and notes - (modified/fixed) patch from Naj Kejah, part of wishlist item 4897, plus hardcoded text moved to message file
git-svn-id: trunk@3181 -
2006-04-09 11:54:09 +00:00
peter
66c41ee7cc * fix memory leak with normal exit
git-svn-id: trunk@3137 -
2006-04-03 16:04:55 +00:00