Commit Graph

135 Commits

Author SHA1 Message Date
florian
111d05c68f o patch by Alexander Shishkin, resolves #20409
* eliminate warnings in compiler (i386 & i368->x86_64) and minor refactorings
    - comment out unused vars and types
    - comment out unneeded comparisons (Longword <=> 0)
    - suppress some "comparison always true|false" warnings
    - tweak visiblity sections

git-svn-id: trunk@19385 -
2011-10-05 20:11:09 +00:00
Jonas Maebe
cb1da8de85 * fixed getcopy order for ttempcreatenode in case it has tempinitcode
(this tempinitcode contains a reference to the tempcreatenode itself
     -> hookoncopy must be set before copying the tempinitnode)

git-svn-id: trunk@18016 -
2011-07-18 00:38:47 +00:00
florian
ecb04d1620 * use tcgint instead of aint in ttempcreatenode
git-svn-id: trunk@18011 -
2011-07-17 20:10:05 +00:00
florian
2005f6869b * cycling with $R+ fixed
git-svn-id: trunk@17600 -
2011-05-28 21:18:35 +00:00
Jonas Maebe
769eb3f604 * moved the initialisation of the nodetree and tai class reference constants
from the unit initialisation sections to the variable declaration sections
    to prevent the base units from overriding derived classes (based on patch
    by Hans-Peter Dietrich, mantis #17516)

git-svn-id: trunk@16118 -
2010-10-09 18:52:22 +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
24fea58b92 + initial implementation of iso style gotos in iso mode
* made setjmp/longjmp accessible to the compiler by compiler proc, they are used by the iso goto code

git-svn-id: trunk@15711 -
2010-08-05 19:20:46 +00:00
Jonas Maebe
40705a085f * renamed is_refcounted_type() into is_managed_type(), because it also
returns true for variants and those aren't refcounted
  * also allow tempnodes for pointers to managed types to be put in
    registers (not sure why it was disabled, and there are no
    testsuite regressions by enabling it)

git-svn-id: trunk@15319 -
2010-05-22 20:51:50 +00:00
Jonas Maebe
a055ed873d * set correct expectloc for vectorfpu temps
git-svn-id: trunk@15217 -
2010-05-03 15:42:40 +00:00
Jonas Maebe
a48a37d38b * fixed extended syntax checking {$x-} by moving it from the typecheck pass
to the parser, so that it only looks at what the programmer wrote rather
    than at all statements that the compiler may generate internally
    (mantis #11619)
  + several tests for {$x-} mode
  * modified tenumerators1 so it compiles without extended syntax enabled
    (to check for..in with {$x-})

git-svn-id: trunk@15075 -
2010-03-27 12:51:27 +00:00
Jonas Maebe
1f4d7d6057 * add type symbol names to -vp output (patch by Adriaan van Os, mantis
#15737)

git-svn-id: trunk@14903 -
2010-02-13 16:47:37 +00:00
florian
7707e6a030 + tempcreate nodes can now take an init. value, this allows to initilialize temp. ref nodes on the fly
git-svn-id: trunk@14595 -
2010-01-10 13:19:16 +00:00
peter
060bdbcb47 * fix writing of goto node to ppu
* replace derefnode with resolveppuidx method that only needs to be
    implemented for nodes referencing other nodes
  * fix IE when a label is not defined in inline function

git-svn-id: trunk@11697 -
2008-09-03 20:46:04 +00:00
yury
491f0fa1d8 * Replaced all user defined warnings by TODO comments to reduce compiler noise.
git-svn-id: trunk@11443 -
2008-07-23 11:00:03 +00:00
Jonas Maebe
ed7511de58 * safeguard the nf_block_with_exit flag when simplifying blockn and
statementn + test

git-svn-id: trunk@9134 -
2007-11-04 18:33:07 +00:00
peter
6b8aed593f * remove registers{int/mmx/fpu} from firstpass
* small cleanups of unused variables in firstpass
  * node_resources_fpu() created to get an approximation of the
    required fpu registers
  * for the moment use node_complexity in the CG until the
    node_resource_int() is created

git-svn-id: trunk@8655 -
2007-09-26 21:12:01 +00:00
peter
4525df9ea0 * nf_is_funcret node flag added
* remove ti_is_funcret, use new node flag instead
  * check for funcret node in doreplace instead of funcretsym

git-svn-id: trunk@8578 -
2007-09-20 20:24:30 +00:00
peter
e0cf015159 * refactor function result handling
* rename methodpointerinit/done to callinitblock/callcleanupblock
  * moved checks in callnode to separate functions
  * funcretnode is now always a simple node instead of a block of
    statements
  * funcret and methodpointer are generated/optimized only in pass_1 so
    a conversion from calln to loadn is much easier
  * function result assignments are much more often optimized to use the
    assignment destination location instead of using a temp

git-svn-id: trunk@8558 -
2007-09-18 22:12:07 +00:00
peter
5f4b89903c * use callnodeflag to check if the result of a function is used
git-svn-id: trunk@8425 -
2007-09-10 16:40:40 +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
e4487e628d * fixed overload choosing error on 64 bit
git-svn-id: trunk@8327 -
2007-08-29 06:30:38 +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
yury
cf19c0993a * fixed bug #8919.
+ test.

git-svn-id: trunk@7448 -
2007-05-24 08:15:28 +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
pierre
d5e4828f6f * avoid memory leak for copy of withnode in tempnodes
git-svn-id: trunk@6067 -
2007-01-19 05:12:08 +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
florian
7781e842fc * varset support fixed
git-svn-id: trunk@5294 -
2006-11-08 22:48:44 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
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
peter
2f0ce31751 * string concat changed from function to procedure to
allow runtime optimization if the destination is the
    same as a source parameter
  * tassignmentnode now sets aktassignmentnode global that can be used
    to use the left node as a destination parameter and
    skip the assignment
  * disabled all cpu specific shortstr concat/append

git-svn-id: trunk@4770 -
2006-10-02 20:00:06 +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
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
e4451558c4 * optimized register allocation for tempnodes
git-svn-id: trunk@2221 -
2006-01-08 12:53:43 +00:00
Jonas Maebe
255855b5d9 * more informative printnode* output for temp-related nodes
git-svn-id: trunk@702 -
2005-07-19 14:59:04 +00:00
florian
7cd67ea3f0 * node optimizer branch merged
* gotonode and gotolabel refactored
  * -Nu added to enable for loop unrolling

git-svn-id: trunk@446 -
2005-06-19 17:42:10 +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
florian
252fa84c62 + compiler support for reading/writing of vararrays 2005-03-27 20:19:21 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
be1808953c * fix laststatement() 2005-01-31 16:15:17 +00:00
peter
5ee4b9ad24 * use tlocation for tempnodes 2004-12-03 16:04:47 +00:00
Jonas Maebe
21c7a9db2f * fixed check for regvar-ability of tempnodes 2004-11-28 19:16:53 +00:00
peter
89b1b583c9 * ttempcreatenode.create_reg merged into .create with parameter
whether a register is allowed
  * funcret_paraloc renamed to funcretloc
2004-11-21 17:54:59 +00:00
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
peter
560a790a57 * gen high tree makes copy in temp when there is a calln 2004-10-12 14:36:38 +00:00
peter
8fb3536f6e * simple regvar support, not yet finished 2004-09-26 17:45:29 +00:00
Jonas Maebe
ddf175f171 + temps can now also hold fpu values in registers (take care with use,
bacause of the x86 fpu stack)
  * fpu parameters to node-inlined procedures can now also be put in
    a register
2004-07-16 19:45:15 +00:00