Commit Graph

148 Commits

Author SHA1 Message Date
peter
60978ba89c * aktprocdef renamed to current_procdef
* procinfo renamed to current_procinfo
  * procinfo will now be stored in current_module so it can be
    cleaned up properly
  * gen_main_procsym changed to create_main_proc and release_main_proc
    to also generate a tprocinfo structure
  * fixed unit implicit initfinal
2003-04-27 11:21:32 +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
Jonas Maebe
5ed5d2897f * fixed ttemprefnode.compare and .getcopy to take offset field into
account
2003-04-23 08:41:34 +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
Jonas Maebe
934974e234 * fixed tstatementnode.det_resulttype and tststatementnode.pass_1
* fixed some getcopy issues with ttemp*nodes
2003-04-21 15:00:22 +00:00
daniel
a32926e2fc * Some work on interference graph construction 2003-04-17 07:50:24 +00:00
Jonas Maebe
bd90c192c5 * ttempdeletenode.create now sets the nodetype to tempdeleten instead of
temprefn
2003-04-12 14:53:59 +00:00
peter
e25ef86b0a * errornode.mark_write added 2003-03-17 20:30:46 +00:00
daniel
5041b70618 * Removed ifdefs around notifications
ifdefs around for loop optimizations remain
2003-01-03 12:15:55 +00:00
peter
34e8266af4 * case statement inlining added
* fixed inlining of write()
  * switched statementnode left and right parts so the statements are
    processed in the correct order when getcopy is used. This is
    required for tempnodes
2002-11-27 02:37:12 +00:00
peter
f3fc72095f * splitted defbase in defutil,symutil,defcmp
* merged isconvertable and is_equal into compare_defs(_ext)
  * made operator search faster by walking the list only once
2002-11-25 17:43:16 +00:00
peter
d8495ac883 * don't complain in X- mode for internal generated function calls
with funcretrefnode set
  * give statement error at the correct line position instead of the
    block begin
2002-10-05 15:15:19 +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
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
peter
8082f79ea6 * first things tai,tnode storing in ppu 2002-08-15 19:10:35 +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
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
Jonas Maebe
09de3f8d5b * fixed errors found with new -CR code from Peter when cycling with -O2p3r 2002-06-24 12:43:00 +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
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
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
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
d2e1952377 * procsym definition rewrite 2001-11-02 22:58:00 +00:00
peter
43dea5a35f * move class of definitions into type section for delphi 2001-09-02 21:12:06 +00:00
florian
9746f4c2d6 * some cg reorganisation
* some PPC updates
2001-08-26 13:35:06 +00:00
Jonas Maebe
fc1b58c22c * moved "reverseparameters" from ninl.pas to ncal.pas
+ support for non-persistent temps in ttempcreatenode.create, for use
    with typeconversion nodes
2001-08-24 13:47:26 +00:00
Jonas Maebe
a6cfe4083a + tempcreate/ref/delete nodes (allows the use of temps in the
resulttype and first pass)
  * made handling of read(ln)/write(ln) processor independent
  * moved processor independent handling for str and reset/rewrite-typed
    from firstpass to resulttype pass
  * changed names of helpers in text.inc to be generic for use as
    compilerprocs + added "iocheck" directive for most of them
  * reading of ordinals is done by procedures instead of functions
    because otherwise FPC_IOCHECK overwrote the result before it could
    be stored elsewhere (range checking still works)
  * compilerprocs can now be used in the system unit before they are
    implemented
  * added note to errore.msg that booleans can't be read using read/readln
2001-08-23 14:28:35 +00:00
peter
81200dc9ef * funcret moved from tprocinfo to tprocdef 2001-08-06 21:40:46 +00:00
Jonas Maebe
f855dff46d * fixed web bug #1501 in conjunction with -Or 2001-06-11 17:41:12 +00:00
peter
767062cb3b * tasmnode.pass_2 is independent of cpu, moved to ncgbas
* include ncgbas for independent nodes
2001-05-18 22:31:06 +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
2531d36bff * fixed buf 1364 2001-02-05 20:45:49 +00:00
Jonas Maebe
4c8ca9774f + implemented/fixed docompare() mathods for all nodes (not tested)
+ nopt.pas, nadd.pas, i386/n386opt.pas: optimized nodes for adding strings
    and constant strings/chars together
  * n386add.pas: don't copy temp strings (of size 256) to another temp string
    when adding
2000-12-31 11:14:10 +00:00
peter
32b9cdb7cf + new tlinkedlist class (merge of old tstringqueue,tcontainer and
tlinkedlist objects)
2000-12-25 00:07:25 +00:00
florian
b9796f6a7f * unused units removed from uses clause
* some changes for widestrings
2000-11-29 00:30:30 +00:00
peter
451723647e * symtable splitted, no real code changes 2000-10-31 22:02:46 +00:00
Jonas Maebe
c3025eb50b + implementation for tasmnode.getcopy 2000-10-27 14:57:16 +00:00
peter
4b17f6f0ff * fixed memory leaks 2000-10-14 21:52:54 +00:00
peter
e171f341a0 * moehrendorf oct 2000 rewrite 2000-10-14 10:14:45 +00:00