Commit Graph

60 Commits

Author SHA1 Message Date
carl
f3d9f997cd * low-highval always checked if limit ober 2GB is reached (to avoid overflow) 2002-09-27 21:13:28 +00:00
florian
457e32728d + support of passing variants to "array of const" 2002-09-26 15:02:05 +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
peter
a28f75ed03 * sym.insert_in_data removed
* symtable.insertvardata/insertconstdata added
  * removed insert_in_data call from symtable.insert, it needs to be
    called separatly. This allows to deref the address calculation
  * procedures now calculate the parast addresses after the procedure
    directives are parsed. This fixes the cdecl parast problem
  * push_addr_param has an extra argument that specifies if cdecl is used
    or not
2002-08-25 19:25:18 +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
florian
e313bab4ff * first part of procinfo rewrite 2002-08-17 09:23:33 +00:00
florian
59abf2555b * types.pas renamed to defbase.pas because D6 contains a types
unit so this would conflicts if D6 programms are compiled
  + Willamette/SSE2 instructions to assembler added
2002-07-20 11:57:52 +00:00
daniel
62e4063229 * Forgot to add a {$ifdef extdebug} 2002-07-20 07:44:37 +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
florian
c3f4220f3b * readded removed changes 2002-07-15 18:03:14 +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
florian
336808f6c3 * start of the new generic parameter handling 2002-07-11 14:41:27 +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
4dcd96747e * moved entry and exitcode to ncgutil and cgobj
* foreach gets extra argument for passing local data to the
    iterator function
  * -CR checks also class typecasts at runtime by changing them
    into as
  * fixed compiler to cycle with the -CR option
  * fixed stabs with elf writer, finally the global variables can
    be watched
  * removed a lot of routines from cga unit and replaced them by
    calls to cgobj
  * u32bit-s32bit updates for and,or,xor nodes. When one element is
    u32bit then the other is typecasted also to u32bit without giving
    a rangecheck warning/error.
  * fixed pascal calling method with reversing also the high tree in
    the parast, detected by tcalcst3 test
2002-05-12 16:53:04 +00:00
peter
cc8c4d7093 * moved more routines from cga/n386util 2002-04-25 20:16:38 +00:00
peter
67ede1276b * add pinline unit that inserts compiler supported functions using
one or more statements
  * moved finalize and setlength from ninl to pinline
2002-04-23 19:16:34 +00:00
peter
624e5bd699 * fixed @methodpointer 2002-04-22 16:30:05 +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
peter
5b242f7741 * tlocation,treference update
* LOC_CONSTANT added for better constant handling
  * secondadd splitted in multiple routines
  * location_force_reg added for loading a location to a register
    of a specified size
  * secondassignment parses now first the right and then the left node
    (this is compatible with Kylix). This saves a lot of push/pop especially
    with string operations
  * adapted some routines to use the new cg methods
2002-04-02 17:11:27 +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
02f4482788 * dynarr:=nil support added 2002-01-19 11:52:32 +00:00
Jonas Maebe
599a68f8c9 * fixed web bug #1684 (it already didn't crash anymore, but it also didn't
generate an error) ("merged")
2001-12-28 15:02:00 +00:00
Jonas Maebe
c9f75e434f * only save/restore nf_forcevaria flag when reversing order of
arrayconstructor elements, since the other flags are element specific
2001-11-07 13:52:52 +00:00
peter
d2e1952377 * procsym definition rewrite 2001-11-02 22:58:00 +00:00
Jonas Maebe
0660d20448 * fixed web bug #1651 2001-10-31 17:34:20 +00:00
peter
ac400051bd * allow assignment of overloaded procedures to procvars when we know
which procedure to take
2001-10-28 17:22:25 +00:00
Jonas Maebe
8a2c142e46 * fixed internalerror(10) due to previous fpu overflow fixes ("merged")
* fixed bug in n386add (introduced after compilerproc changes for string
    operations) where calcregisters wasn't called for shortstring addnodes
  * NOTE: from now on, the location of a binary node must now always be set
     before you call calcregisters() for it
2001-10-12 13:51:51 +00:00
peter
43dea5a35f * move class of definitions into type section for delphi 2001-09-02 21:12:06 +00:00
Jonas Maebe
eec2c98371 * fix from Peter for getting correct symtableentry for funcret loads 2001-08-30 15:48:34 +00:00
florian
9746f4c2d6 * some cg reorganisation
* some PPC updates
2001-08-26 13:35:06 +00:00
peter
f4bae3b050 * errordef.typesym is not updated anymore 2001-08-12 22:11:52 +00:00
peter
81200dc9ef * funcret moved from tprocinfo to tprocdef 2001-08-06 21:40:46 +00:00
peter
27c78aa247 * fixed array constructor passing with type conversions 2001-07-30 20:52:25 +00:00
peter
cf9bf38818 * remove unused typenode for procvar load. Don't know what happened why
this code was not there already with revision 1.17.
2001-06-04 18:07:47 +00:00
peter
55eb369653 * better const to var checking 2001-06-04 11:48:01 +00:00
peter
50faa8433f * remove unused typenode for procvars to prevent error
* typenode.allowed flag to allow a typenode
2001-05-19 21:19:57 +00:00
peter
b45dde5c74 * typenode doesn't generate code, give error in pass_1 instead of
getting an abstract methode runtime error
2001-05-09 19:57:51 +00:00
peter
539adaafde * move more code from loadnode.pass_1 to det_resulttype 2001-04-14 14:06:31 +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
bdb7e3b875 * array constructor fix 2001-04-05 21:03:08 +00:00
peter
759f678192 * move constant folding into det_resulttype 2001-04-04 22:42:39 +00:00
peter
4e2655cdc5 * resulttype rewrite 2001-04-02 21:20:29 +00:00