Commit Graph

177 Commits

Author SHA1 Message Date
yury
8b7c5666a2 * Renamed fc_block_with_exit to fc_no_direct_exit to expand its usage.
* Set fc_no_direct_exit in case when a routine has an additional implicit exit code, such as calling FreeInstance in the destructor.

git-svn-id: trunk@47749 -
2020-12-10 17:38:37 +00:00
yury
d72566169e * The code generator of the exit statement must set the fc_gotolabel flag in flowcontrol for inlined routines/code blocks. It fixes the incorrect assumption that such exit statements terminate the main routine.
git-svn-id: trunk@47683 -
2020-12-04 12:33:47 +00:00
Jonas Maebe
170ec00348 - removed withnode (was no longer used since a very long time)
git-svn-id: trunk@40777 -
2019-01-05 22:28:37 +00:00
Jonas Maebe
3b9f5a5e96 * moved finalization of code generator temps to a node, so it can be getcopy'd
(needed for LLVM, where we need two copies of the finally code: one in case
     an exception occurs, and one in case none is raised)
   o also first finalize parameters and only then code generator temps, since
     in theory the former could create more of the latter

git-svn-id: trunk@40345 -
2018-11-17 22:38:36 +00:00
pierre
04fd1a6397 Complement commit 40104, by changing type of executionweight in toptinfo record and adapt pass_2 code
git-svn-id: trunk@40111 -
2018-10-31 15:47:53 +00:00
yury
bf4eda478d * SetExecutionWeight(): Set execution weight also for nodes with special handling. Minor code cleanup/improvements.
* Restore previous execution weight before exiting secondpass().
* It all improves register allocation for variables inside loops in some cases.

git-svn-id: trunk@40059 -
2018-10-27 18:13:33 +00:00
pierre
5ccced201a Downgrade some warnings to notes for EXTDEBUG
git-svn-id: trunk@39924 -
2018-10-13 11:35:34 +00:00
florian
ea32ddd5b2 * avoid overflows of execution weight
git-svn-id: trunk@39623 -
2018-08-16 20:45:36 +00:00
florian
f08d3fdf8f * moved execution weight calculation into a separate pass, so the info is available already available before the code generation pass if needed
git-svn-id: trunk@38717 -
2018-04-08 20:51:27 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
Jonas Maebe
7911cc8437 - removed some dataconstn remenants
git-svn-id: trunk@35314 -
2017-01-16 21:27:20 +00:00
Jonas Maebe
b14c037533 * record in the flowcontrol flags whether we are currently in a block whose
exceptions are caught in the current routine (fc_catching_exceptions),
    so that for LLVM we will be able to use "invoke" instead of "call" in that
    case

git-svn-id: trunk@35158 -
2016-12-18 13:57:33 +00:00
Jonas Maebe
b75a07b713 * clarified comment for fc_unwind_*
git-svn-id: trunk@35142 -
2016-12-16 22:41:24 +00:00
nickysn
1181eb0ddb * fixed compilation of the compiler with -dEXTDEBUG after r31588
git-svn-id: trunk@31615 -
2015-09-12 11:55:54 +00:00
sergei
e542800ea9 * Win64 SEH: Track control flow out of unwind-protected regions in a more precise way and don't generate expensive calls to __fpc_local_unwind when not necessary.
git-svn-id: trunk@31582 -
2015-09-09 18:43:46 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
sergei
8c9ad67682 + tcgexitnode,tcgbreaknode,tcgcontinuenode: added possibility to generate specialized code for leaving unwind-protected regions.
git-svn-id: trunk@19636 -
2011-11-14 22:47:37 +00:00
Jonas Maebe
b52dcd4a56 * changed var-parameter of secondpass() into a value parameter: secondpass
should never change any nodes, and this allows passing properties to
    secondpass

git-svn-id: branches/jvmbackend@18673 -
2011-08-20 08:23:22 +00:00
paul
ee6fe6c4f5 compiler: add unary plus node, search for unary plus operator if a type cannot be handled by compiler, increase ppu version because of node types change
git-svn-id: trunk@16640 -
2010-12-26 12:19:28 +00:00
florian
f54ea1e9f9 * fix compilation with -dEXTDEBUG
git-svn-id: trunk@14190 -
2009-11-15 18:26:50 +00:00
florian
80c0f33c0e * patch by Sergei Gorelkin: fixes compilation with -dEXTDEBUG
git-svn-id: trunk@13043 -
2009-04-25 20:02:08 +00:00
florian
4e7e0f620a * first try to fix #10863 (don't do SSL in case left is already handled in an assignment node)
git-svn-id: trunk@10710 -
2008-04-19 09:23:45 +00:00
florian
7ef191021f + check for location.loc<>expectloc in extdebug mode
* set expectloc properly for add nodes on arm

git-svn-id: trunk@10536 -
2008-03-23 10:18:33 +00:00
peter
db98f1eecb * indenting of node names
git-svn-id: trunk@8418 -
2007-09-09 14:03:31 +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
9a75d308a8 * fixed missing lineinfo after removing inlining_procedure (missed a "not" in
a condition)

git-svn-id: trunk@6270 -
2007-01-30 15:30:47 +00:00
Jonas Maebe
246f75c43a - removed inlining_procedure global var (artefact from pass_2 inlining)
git-svn-id: trunk@6266 -
2007-01-29 15:33:56 +00:00
peter
e17b424e28 * refactor procsym procdef list
git-svn-id: trunk@5210 -
2006-11-03 18:44:46 +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
Jonas Maebe
e531c4f125 + very limited SSA support (only outside control flow
constructs for now)

git-svn-id: trunk@3671 -
2006-05-25 11:45:08 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
a0b9dd48c9 * remove check for expectloc<>location.loc, it doesn't work anymore for
temprefn,blockn causing too much warnings in extdebug

git-svn-id: trunk@1542 -
2005-10-20 06:51:40 +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
1b41aad3a0 remove multiple pass2 calls. It is not supported anymore by all nodes (ttempcreatenode) 2005-04-08 15:18:08 +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
f663d2488f * cross unit inlining fixed 2003-11-10 22:02:52 +00:00
peter
9e66b09843 * call firstpass before allocation and codegeneration is started
* move leftover code from pass_2.generatecode() to psub
2003-10-30 16:22:40 +00:00
florian
05fcae577a * some ppc stuff fixed
* memory leak fixed
2003-10-19 01:34:30 +00:00
peter
9f54e1b7c5 * made worklists dynamic in size 2003-10-18 15:41:26 +00:00
peter
0939085ab1 * commented out more obsolete constants 2003-10-17 15:08:34 +00:00
peter
fb81b7ebbb * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
* tregisteralloctor renamed to trgobj
  * removed rgobj from a lot of units
  * moved location_* and reference_* to cgobj
  * first things for mmx register allocation
2003-10-10 17:48:13 +00:00
daniel
b2343f4b16 * Register allocator splitted, ans abstract now 2003-10-09 21:31:37 +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
75cb52213f * fix register leak in with debug 2003-09-28 21:45:52 +00:00
peter
99bb20747e * parent framepointer changed to hidden parameter
* tloadparentfpnode added
2003-09-28 17:55:03 +00:00