Commit Graph

172 Commits

Author SHA1 Message Date
florian
c947295cb8 + ttertiarynode
* traise node refactored using tertiarynode
* more dipatch stuff

git-svn-id: trunk@5215 -
2006-11-03 23:03:31 +00:00
florian
a7b317aa96 + tdataconstnode, implemented for usage in dispatch stuff
git-svn-id: trunk@5208 -
2006-11-03 17:56:47 +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
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
3d85bfbf7b * fixed coping of goto/label nodes
git-svn-id: trunk@5053 -
2006-10-29 09:50:39 +00:00
florian
ea69e22044 * fixed tail recursion optimization for code using methodpointerinit/done
git-svn-id: trunk@4896 -
2006-10-14 07:57:25 +00:00
micha
8678d52aeb * avoid warning when pointer points to size 1 data
* fix variantmanager for {$T+}

git-svn-id: trunk@4861 -
2006-10-11 16:40:40 +00:00
florian
02d0ac4c3e + only procedures doing recursive calls are checked for tail recursivity
+ parameters are tested if they are usable with tail recursion removal

git-svn-id: trunk@4853 -
2006-10-10 20:29:48 +00:00
micha
5f353d6fef add warning for arithmetic on untyped pointers
git-svn-id: trunk@4823 -
2006-10-07 19:34:16 +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
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
Jonas Maebe
b5fe67351e * fixed warning
git-svn-id: trunk@4193 -
2006-07-14 19:37:35 +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
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
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
b967ae8307 * support @inherited <method> to get the methodpointer
of <method> in a parent class

git-svn-id: trunk@2526 -
2006-02-11 22:49:00 +00:00
florian
dac1050c11 + mmx support revived, fixes bug #4106
git-svn-id: trunk@555 -
2005-07-02 11:53:51 +00:00
peter
408bba521a * support constset in $if
git-svn-id: trunk@538 -
2005-06-30 08:19:01 +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
florian
21038de78d + started with refactoring det_resulttype
+ dosimplify
* inlinenig makes use of dosimplify

git-svn-id: trunk@140 -
2005-05-29 15:15:38 +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
6578fb25bb - removed unused variables 2005-03-25 23:03:04 +00:00
Jonas Maebe
38f57c30fe * fixed printnodelist indentation 2005-03-05 16:17:30 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
717e3c76c2 * set nf_is_self node flag when self is loaded 2005-01-04 16:39:46 +00:00
florian
80af47489d + first batch of patches to support tdef.getcopy fully 2005-01-03 17:55:57 +00:00
peter
ced6bf20cd * fix lineinfo for with blocks 2004-12-26 16:22:01 +00:00
peter
2b6456fe16 * procvar handling for tp procvar mode fixed
* proc to procvar moved from addrnode to typeconvnode
  * inlininginfo is now allocated only for inline routines that
    can be inlined, introduced a new flag po_has_inlining_info
2004-12-05 12:28:10 +00:00
peter
959bdccc49 * disable pass2inline 2004-12-02 19:26:14 +00:00
peter
2e161c5e9e * nf_internal flag for internal inserted typeconvs. This will
supress the generation of warning/hints
2004-11-02 12:55:16 +00:00
peter
2aceb6f856 * no checkpointer code for dynarr to openarr 2004-11-01 17:15:47 +00:00
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +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
florian
c809441611 * stricter handling of formal const parameters and IE fixed 2004-05-24 20:39:41 +00:00
peter
b86f2c6a25 * methodpointer is loaded into a temp when it was a calln 2004-05-23 18:28:40 +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
florian
b5bf8cefad + <pointer> - <pointer> result is divided by the pointer element size now
this is delphi compatible as well as resulting in the expected result for p1+(p2-p1)
2004-05-20 21:54:33 +00:00
peter
ecfbbeffc3 * renamed xNNbittype to xNNinttype
* renamed registers32 to registersint
  * replace some s32bit,u32bit with torddef([su]inttype).def.typ
2004-02-03 22:32:53 +00:00
daniel
97e87aaebc * reginfo now also only allocated during register allocation
* third round of gdb cleanups: kick out most of concatstabto
2004-01-26 16:12:27 +00:00
florian
3d8e1ab1fb + fpu<->mm register conversion 2003-12-26 00:32:21 +00:00
peter
9aba5c8c7a * fixed some crashes
* fixed varargs and register calling probs
2003-12-01 18:44:15 +00:00
peter
353219a928 * typed address only used for @ and addr() that are parsed 2003-11-29 14:33:13 +00:00
peter
d765fe0c40 * mark nodes that are copies 2003-11-23 17:38:48 +00:00
peter
7bf41f8dff * fix set_varstate in for loops
* fix set_varstate from case statements
2003-11-12 15:48:27 +00:00
peter
f663d2488f * cross unit inlining fixed 2003-11-10 22:02:52 +00:00
peter
4a1ecb07d1 * splitted buildderef and buildderefimpl to fix interface crc
calculation
2003-10-23 14:44:07 +00:00
peter
6878c55c80 * write derefdata in a separate ppu entry 2003-10-22 20:39:59 +00:00
peter
9f54e1b7c5 * made worklists dynamic in size 2003-10-18 15:41:26 +00:00
florian
6a01a7b4a6 * compilation of the powerpc compiler fixed 2003-10-17 01:22:08 +00:00
peter
95f132db3d * set_varstate cleanup 2003-10-08 19:19:45 +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
99bb20747e * parent framepointer changed to hidden parameter
* tloadparentfpnode added
2003-09-28 17:55:03 +00:00
florian
f3e9e7a24f * fixed web bug #2669
* cosmetic fix in printnode
  * tobjectdef.gettypename implemented
2003-09-06 22:27:08 +00:00
peter
6a8d5eb25d * NEWRA branch merged 2003-09-03 15:55:00 +00:00
florian
220e05dd5e * fixed arm concatcopy
+ arm support in the common compiler sources added
  * moved some generic cg code around
  + tfputype added
  * ...
2003-09-03 11:18:36 +00:00
peter
6731abb0db * fixed some reported bugs 2003-08-10 17:25:23 +00:00
peter
047a066711 * procinlinenode removed
* aktexit2label removed, fast exit removed
  + tcallnode.inlined_pass_2 added
2003-05-26 21:17:17 +00:00
peter
05c05f2555 * failn removed
* inherited result code check moven to pexpr
2003-05-13 19:14:41 +00:00
peter
26d78ff5c9 * moved implicit exception frame from ncgutil to psub
* constructor/destructor helpers moved from cobj/ncgutil to psub
2003-05-11 21:37:03 +00:00
peter
1a2eedd767 * self moved to hidden parameter
* removed hdisposen,hnewn,selfn
2003-05-09 17:47:02 +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
41da381f1a * fixed a lot of PowerPC related stuff 2003-04-24 22:29:57 +00:00
peter
e258c7bf84 * allow multi pass2 changed to global boolean instead of node flag 2003-04-23 10:12:14 +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
0cb3160a63 * mark_write implemented for default with a warning in EXTDEBUG, this
is required for error recovery where the left node can be also a non
    writable node
2003-04-22 09:52:00 +00:00
peter
8da3f59d32 * vs_hidden released 2003-04-10 17:57:52 +00:00
peter
c4ddcc78a8 * generic constructor working for i386
* remove fixed self register
  * esi added as address register for i386
2003-03-28 19:16:56 +00:00
peter
830ea4e876 * support DefaultHandler and anonymous inheritance fixed
for message methods
2003-03-17 16:54:41 +00:00
daniel
25af993b76 * Fixed mark_write for @ operator
(can happen when compiling @procvar:=nil (Delphi mode construction))
2003-01-04 15:54:03 +00:00
peter
4167e7ea10 * made mark_write dummy instead of abstract 2003-01-03 21:03:02 +00:00
daniel
5041b70618 * Removed ifdefs around notifications
ifdefs around for loop optimizations remain
2003-01-03 12:15:55 +00:00
Jonas Maebe
ed5a4a6977 * fixed check for whether or not a high parameter was already generated
* no type checking/conversions for invisible parameters
2002-12-26 18:24:33 +00:00
florian
e8bb7d10c3 * loop node flags from node flags splitted 2002-11-28 11:17:01 +00:00
peter
9d0437f8aa * support inherited; support for overload as it is handled by
delphi. This is only for delphi mode as it is working is
    undocumented and hard to predict what is done
2002-10-05 00:48:57 +00:00
peter
dcd9e0107c * old logs removed and tabs fixed 2002-09-07 15:25:00 +00:00
daniel
b0364566d1 * Make Tprocdef.defs protected 2002-09-03 16:26:26 +00:00
daniel
f4c6d762fd - write_access fields removed in favor of a flag 2002-09-01 13:28:37 +00:00
daniel
4b82d30953 * Removed sets from Tcallnode.det_resulttype
+ Added read/write notifications of variables. These will be usefull
   for providing information for several optimizations. For example
   the value of the loop variable of a for loop does matter is the
   variable is read after the for loop, but if it's no longer used
   or written, it doesn't matter and this can be used to optimize
   the loop code generation.
2002-09-01 08:01:16 +00:00
florian
ac29d65fc4 + register32 is now written by tnode.dowrite
* fixed write of value of tconstnode
2002-08-22 11:21:44 +00:00
peter
91b49914f6 * More fixes for cross unit inlining, all tnodes are now implemented
* Moved pocall_internconst to po_internconst because it is not a
    calling type at all and it conflicted when inlining of these small
    functions was requested
2002-08-19 19:36:42 +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
florian
4144773f01 * result type handling in tcgcal.pass_2 overhauled
* better tnode.dowrite
  * some ppc stuff fixed
2002-08-17 22:09:43 +00:00
peter
8082f79ea6 * first things tai,tnode storing in ppu 2002-08-15 19:10:35 +00:00
carl
1ef442f4bf - removed newcg define 2002-08-09 19:15:41 +00:00
daniel
1130395e7e * Readded old set code. To use it define 'oldset'. Activated by default
for ppc.
2002-07-23 12:34:29 +00:00
daniel
3a134c6e07 * Sets are now internally sets. 2002-07-22 11:48:04 +00:00
daniel
0af1f3883c * Changed booleans into flags 2002-07-21 06:58:49 +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
peter
4285e99853 * internal linker
* reorganized aasm layer
2002-07-01 18:46:20 +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
florian
6bbaa14daf * block nodes within expressions shouldn't release the used registers,
fixed using a flag till the new rg is ready
2002-04-25 20:15:39 +00:00
peter
6320530bdd * removed newn and disposen nodes, the code is now directly
inlined from pexpr
  * -an option that will write the secondpass nodes to the .s file, this
    requires EXTDEBUG define to actually write the info
  * fixed various internal errors and crashes due recent code changes
2002-04-21 19:02:03 +00:00
Jonas Maebe
71a52a4aeb * several powerpc-related additions and fixes 2002-04-06 18:10:42 +00:00