Commit Graph

169 Commits

Author SHA1 Message Date
Sven/Sarah Barth
9d95e6159e * fix typo in comment 2022-01-09 13:30:46 +01:00
pierre
7721995c71 Make sure nf_usercode_entry get transferred inside firstpass procedure
git-svn-id: trunk@49279 -
2021-04-27 14:20:09 +00:00
nickysn
6f6598712f * synchronized with trunk
git-svn-id: branches/z80@45131 -
2020-04-26 22:33:58 +00:00
svenbarth
60345366f2 * fix for Mantis #35140: apply patch by Ryan Joseph together with some further changes by me to add support for constant parameters in generics
+ added tests

git-svn-id: trunk@45080 -
2020-04-25 22:12:35 +00:00
nickysn
ac3eda1360 * fixed spurious "Expectloc is not set in firstpass" when compiler is compiled with EXTDEBUG, and
there's a node that's converted to another node in pass 1

git-svn-id: branches/z80@45058 -
2020-04-24 21:37:13 +00:00
Jonas Maebe
9e7cf37cd6 * changed resulttype and firstpass processing from recursion into loop, based
on patch/idea by J. Gareth Moreton (as part of his patch in #35857)

git-svn-id: trunk@43004 -
2019-09-15 16:18:14 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
florian
9fdd64e94c * indention and new line fixes
git-svn-id: trunk@25963 -
2013-11-06 21:10:28 +00:00
Jonas Maebe
94d976bc87 * when simplifying ordinal expressions during inlining, keep the resultdef
that was set during the typecheck pass because typeconversion nodes
    may have been optimised away previously and sometimes the resultdef is
    important (e.g. for the value of callparanodes) (mantis #17458)

git-svn-id: trunk@16101 -
2010-10-07 15:08:52 +00:00
florian
39c1c4c199 * improved code generation by reducing the usage of unneeded temps due to incorrect
node processing, patch by Sergei Gorelkin

git-svn-id: trunk@13756 -
2009-09-22 19:24:25 +00:00
Jonas Maebe
a64c5a7b23 * fixed bug that sporadically caused the column of certain nodes to
change, resulting in slightly different DWARF debug information
    (mantis #13508)

    The cause was saving a node pointer in a local variable, processing
    it further, and later on checking whether it changed by comparing
    the stored and the current instance pointer. The problem was that
    the node could have been freed and reallocated at the same address
    (but with different contents), so this check sometimes resulted
    in (hard to reproduce) false negatives.

git-svn-id: trunk@13580 -
2009-08-22 22:15: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
Jonas Maebe
168e652d42 + support for simplifying simple inline functions down to a single
constant node (rather than to just a blocknode with a statement
    assigning a constant to a temp)

git-svn-id: trunk@6832 -
2007-03-13 22:27:55 +00:00
florian
ef7bd58c54 * germanism removed (aktfilepos -> current_filepos)
git-svn-id: trunk@5099 -
2006-10-30 22:37:31 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
3078a1927f * remove ttype
* rename old ttype variables *type to *def
  * rename resulttypepass to pass_typecheck
  * rename pass_2 to pass_generate_code

git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
florian
0907a1ef80 * fixed compilerwidestring concatenation
git-svn-id: trunk@1876 -
2005-12-04 18:29:07 +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
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
peter
72365ec95b * implicit_finally flag must be set in pass1
* add check whether the implicit frame is generated when expected
2004-05-23 15:06:20 +00:00
peter
70fe77ca7c * procinfo unit contains tprocinfo
* cginfo renamed to cgbase
  * moved cgmessage to verbose
  * fixed ppc and sparc compiles
2003-10-01 20:34:48 +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
peter
47489f2376 * firstpass uses expectloc
* checks if there are differences between the expectloc and
    location.loc from secondpass in EXTDEBUG
2003-04-22 23:50:22 +00:00
peter
46ed8eb932 * fixed pushing of records>8 bytes with stdcall
* simplified hightree loading
2002-12-17 22:19:33 +00:00
peter
8b5e92cb3c * removed repetitive pass counting
* display heapsize also for extdebug
2002-09-05 19:28:29 +00:00
daniel
7d66658fd4 * Further developed state tracking in whilerepeatn 2002-07-19 12:55:27 +00:00
daniel
399036f1c2 * State tracker work
* The whilen and repeatn are now completely unified into whilerepeatn. This
  allows the state tracker to change while nodes automatically into
  repeat nodes.
* Resulttypepass improvements to the notn. 'not not a' is optimized away and
  'not(a>b)' is optimized into 'a<=b'.
* Resulttypepass improvements to the whilerepeatn. 'while not a' is optimized
  by removing the notn and later switchting the true and falselabels. The
  same is done with 'repeat until not a'.
2002-07-19 11:41:34 +00:00
daniel
eeae0e4c00 + Added the beginning of a state tracker. This will track the values of
variables through procedures and optimize things away.
2002-07-14 18:00:43 +00:00
carl
cdd558c3b7 * commented out uncompilable debug code 2002-06-16 08:15:54 +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
peter
7edaf1332f * fixed firstpass when det_resulttype returns an error 2001-10-20 17:23:43 +00:00
peter
915b5cd7a9 * split constsym.value in valueord,valueordptr,valueptr. The valueordptr
is used for holding target platform pointer values. As those can be
    bigger than the source platform.
2001-09-02 21:18:28 +00:00
florian
9746f4c2d6 * some cg reorganisation
* some PPC updates
2001-08-26 13:35:06 +00:00
peter
f4ca079850 * fixed EXTDEBUG 2001-07-06 15:29:39 +00:00
peter
5677fbe1b4 * fixed crash in labelnode
* easier detection of goto and label in try blocks
2001-04-15 09:48:29 +00:00
peter
a7cf57524e * symtable change to classes
* range check generation and errors fixed, make cycle DEBUG=1 works
  * memory leaks fixed
2001-04-13 01:22:06 +00:00
peter
4e2655cdc5 * resulttype rewrite 2001-04-02 21:20:29 +00:00
peter
2c2b7bbf1e * extdebug fixes 2000-12-18 21:56:52 +00:00
florian
b9796f6a7f * unused units removed from uses clause
* some changes for widestrings
2000-11-29 00:30:30 +00:00
peter
e171f341a0 * moehrendorf oct 2000 rewrite 2000-10-14 10:14:45 +00:00
peter
38951f5ce1 * lot of compile updates for cg11 2000-10-01 19:48:23 +00:00
peter
27749c067e * more cg11 updates 2000-09-30 16:08:45 +00:00
florian
57a566e53d *** empty log message *** 2000-09-28 19:49:51 +00:00
florian
426905c464 * some errors fix to get more stuff compilable 2000-09-24 21:15:34 +00:00