Commit Graph

304 Commits

Author SHA1 Message Date
peter
8ff5792776 * remove some unit dependencies
* current_procinfo changes to store more info
2003-05-23 14:27:35 +00:00
peter
1d3a842c07 * fix dup check for hiding the result varsym in localst, the result
sym was already in the localst when adding the locals
2003-05-16 14:32:58 +00:00
peter
92ee1804b6 * removed selfpointer_offset, vmtpointer_offset
* tvarsym.adjusted_address
  * address in localsymtable is now in the real direction
  * removed some obsolete globals
2003-05-15 18:58:53 +00:00
peter
4ba5171726 * fix crash with hiding function result. The function result is now
inserted as last so the symbol that we are going to insert is the
    result and needs to be renamed instead of the already existing
    symbol
2003-05-13 15:17:13 +00:00
peter
15b0132f6f * tloadnode does not support objectsymtable,withsymtable anymore
* withnode cleanup
  * direct with rewritten to use temprefnode
2003-05-11 14:45:12 +00:00
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
7f14891d66 * aktprocdef cleanup, aktprocdef is now always nil when parsing
a new procdef declaration
  * aktprocsym removed
  * lexlevel removed, use symtable.symtablelevel instead
  * implicit init/final code uses the normal genentry/genexit
  * funcret state checking updated for new funcret handling
2003-04-27 07:29:50 +00:00
peter
fe96aad6d6 * vo_is_result flag added for the special RESULT symbol 2003-04-26 00:33:07 +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
06e03ecd23 * calculation of parameter and resultlocation offsets now depends on
tg.direction instead of if(n)def powerpc
2003-04-16 07:53:11 +00:00
Jonas Maebe
ec71805aa8 * several ppc/generic result offset related fixes. The "normal" result
offset seems now to be calculated correctly and a lot of duplicate
    calculations have been removed. Nested functions accessing the parent's
    function result don't work at all though :(
2003-04-05 21:09:31 +00:00
peter
7548e808d9 * ignore hints for default parameter values 2003-03-17 18:56:49 +00:00
peter
830ea4e876 * support DefaultHandler and anonymous inheritance fixed
for message methods
2003-03-17 16:54:41 +00:00
peter
bbf8bddbb4 * unit loading changed to first register units and load them
afterwards. This is needed to support uses xxx in yyy correctly
  * unit dependency check fixed
2002-12-29 14:57:50 +00:00
peter
c466e75da1 * fix crashes when searching symbols 2002-12-27 18:07:44 +00:00
peter
9147303907 * duplicate procsym-unitsym fix 2002-12-25 01:26:56 +00:00
peter
a261bbcfac * type redefine fix for tb0437 2002-12-21 13:07:34 +00:00
carl
081a4aab35 * 3% memory optimization
* changed some types
  + added type checking with different size for call node and for
     parameters
2002-12-07 14:27:07 +00:00
peter
dc66eafb0b * merged cdecl and array fixes 2002-12-06 17:51:09 +00:00
carl
93d011d184 + checking for symbols used with hint directives is done mostly in pexpr
only now
2002-11-30 11:12:48 +00:00
carl
5c5db0e0a3 + unimplemented hint directive added
* hint directive parsing implemented
  * warning on these directives
2002-11-29 22:31:19 +00:00
peter
3d696d9c7c * tvarsym.get_push_size replaced by paramanager.push_size 2002-11-27 20:04:09 +00:00
carl
e15d019b58 + small optimization for speed 2002-11-22 22:45:49 +00:00
pierre
65c85744da * correct a stabs generation problem that lead to use errordef in stabs 2002-11-19 16:26:33 +00:00
peter
a496dbe1ff * pass proccalloption to ret_in_xxx and push_xxx functions 2002-11-18 17:31:54 +00:00
peter
bfd72ad5d5 * merged changes from 1.0.7 up to 04-11
- -V option for generating bug report tracing
    - more tracing for option parsing
    - errors for cdecl and high()
    - win32 import stabs
    - win32 records<=8 are returned in eax:edx (turned off by default)
    - heaptrc update
    - more info for temp management in .s file with EXTDEBUG
2002-11-15 01:58:45 +00:00
carl
8e942d82bb + bss / constant alignment fixes
* avoid incrementing address/datasize in local symtable for const's
2002-11-09 15:29:28 +00:00
peter
7489b6629f * threadvars need 4 bytes extra for storing the threadvar index 2002-10-14 19:44:43 +00:00
peter
6d4fcce014 * Add finalization of typed consts
* Finalization of globals in the main program
2002-10-06 19:41:30 +00:00
carl
67486c96c3 * fixes for Delphi 6 compilation
(warning : Some features do not work under Delphi)
2002-10-05 12:43:23 +00:00
peter
90e8dc3c41 * real fix internalerror for dup ids in union sym 2002-09-09 19:41:46 +00:00
peter
a540ff122c * tdicationary.replace added to replace and item in a dictionary. This
is only allowed for the same name
  * varsyms are inserted in symtable before the types are parsed. This
    fixes the long standing "var longint : longint" bug
  - consume_idlist and idstringlist removed. The loops are inserted
    at the callers place and uses the symtable for duplicate id checking
2002-09-09 17:34:14 +00:00
peter
20af604613 * memdebug enhancements 2002-09-05 19:29:42 +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
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
e313bab4ff * first part of procinfo rewrite 2002-08-17 09:23:33 +00:00
peter
ac71268ce6 * saving of asmsymbols in ppu supported
* asmsymbollist global is removed and moved into a new class
    tasmlibrarydata that will hold the info of a .a file which
    corresponds with a single module. Added librarydata to tmodule
    to keep the library info stored for the module. In the future the
    objectfiles will also be stored to the tasmlibrarydata class
  * all getlabel/newasmsymbol and friends are moved to the new class
2002-08-11 13:24:10 +00:00
daniel
46b8ed0657 * Tried to make Tprocsym.defs protected. I didn't succeed but the cleanups
are worth comitting.
2002-07-23 09:51:22 +00:00
florian
31da813d1d * exit is now a syssym instead of a keyword 2002-07-16 15:34:20 +00:00
florian
4bbd4814c8 * fixed crash with default parameters and stdcall calling convention 2002-07-15 19:44:53 +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
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
5e7a1e3729 * removed unused units
* use tlocation.size in cg.a_*loc*() routines
2002-04-04 19:05:54 +00:00
peter
b4cc4b7b01 * removed compiler warnings 2002-03-04 19:10:11 +00:00
peter
190ead04c0 * more fixes for protected handling 2002-02-03 09:30:03 +00:00
peter
7ed7eebed9 * allow also dup id in delphi mode in interfaces 2002-01-29 21:30:25 +00:00
peter
4f36879f03 * fixed recordsymtable.insert_in() for inserting variant record fields
to not used symtable.insert() because that also updates alignmentinfo
    which was already set
2002-01-29 19:46:00 +00:00
peter
fd2ad837e2 * implicit result variable generation for assembler routines
* removed m_tp modeswitch, use m_tp7 or not(m_fpc) instead
2002-01-24 18:25:48 +00:00
peter
60d2ddbbd5 * protected/private symbols parsing fixed 2001-12-31 16:59:41 +00:00
peter
faf78ea813 * overloading supported in child classes
* fixed parsing of classes with private and virtual and overloaded
    so it is compatible with delphi
2001-11-18 18:43:13 +00:00
peter
887f6ba34c * removed obsolete chainprocsym and test_procsym code 2001-11-02 23:16:50 +00:00
peter
d2e1952377 * procsym definition rewrite 2001-11-02 22:58:00 +00:00
Jonas Maebe
9a5955d79f * fixed crashing bug in unit reference counting 2001-10-12 20:27:43 +00:00
peter
59cb901446 * gdb fixes merged 2001-09-30 21:29:47 +00:00
michael
387ad2c42e * realname updated for some hints
* realname used for consts,labels
2001-09-19 11:06:03 +00:00
Jonas Maebe
ed449defca + searchsystype() and searchsystype() functions in symtable
* changed ninl and nadd to use these functions
  * i386 set comparison functions now return their results in al instead
    of in the flags so that they can be sued as compilerprocs
  - removed all processor specific code from n386add.pas that has to do
    with set handling, it's now all done in nadd.pas
  * fixed fpc_set_contains_sets in genset.inc
  * fpc_set_in_byte is now coded inline in n386set.pas and doesn't use a
    helper anymore
  * some small fixes in compproc.inc/set.inc regarding the declaration of
    internal helper types (fpc_small_set and fpc_normal_set)
2001-09-04 11:38:54 +00:00
peter
f88f6eb571 * rtti/init table updates
* rttisym for reusable global rtti/init info
  * support published for interfaces
2001-08-30 20:13:52 +00:00
florian
9746f4c2d6 * some cg reorganisation
* some PPC updates
2001-08-26 13:35:06 +00:00
peter
7b45b6a4a9 * local browser support fixed 2001-08-19 09:39:27 +00:00
peter
81200dc9ef * funcret moved from tprocinfo to tprocdef 2001-08-06 21:40:46 +00:00
peter
b3c72a630a * skip private symbols when found in withsymtable 2001-07-29 22:12:58 +00:00
peter
b10e754536 * alignmentinfo record added
* -Oa argument supports more alignment settings that can be specified
    per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN
    RECORDMAX,LOCALMIN,LOCALMAX. It is possible to set the mimimum
    required alignment and the maximum usefull alignment. The final
    alignment will be choosen per variable size dependent on these
    settings
2001-07-01 20:16:15 +00:00
peter
e652444594 + varargs directive 2001-06-04 11:53:12 +00:00
peter
f86ce17588 + hint directive parsing support 2001-06-03 21:57:35 +00:00
peter
6c7708c1e0 * ppu object to class rewrite
* move ppu read and write stuff to fppu
2001-05-06 14:49:16 +00:00
peter
0c03535b5b * registration of targets and assemblers 2001-04-18 22:01:53 +00:00
peter
54b534cde7 * better check for globalsymtable 2001-04-13 20:05:15 +00:00
peter
fdeadeed22 * scanner object to class 2001-04-13 18:08:36 +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
florian
82a6a7ed95 + basic variant type support in the compiler 2001-03-22 00:10:58 +00:00
peter
6eb671f761 * fixed some memory leaks 2001-03-13 18:45:06 +00:00
peter
d8abf76f6b * getsym redesign, removed the globals srsym,srsymtable 2001-03-11 22:58:49 +00:00
peter
8acb794be6 * moved deref to be done after loading of implementation units. prederef
is still done directly after loading of symbols and definitions.
2001-02-21 19:37:19 +00:00
peter
a7fe3cb6b9 * new fixfilename, findfile for unix. Look first for lowercase, then
NormalCase and last for UPPERCASE names.
2001-02-20 21:41:15 +00:00
peter
f0e23ff231 * fixed crash with unsupported token overloading 2001-01-08 21:40:26 +00:00
peter
32b9cdb7cf + new tlinkedlist class (merge of old tstringqueue,tcontainer and
tlinkedlist objects)
2000-12-25 00:07:25 +00:00
peter
162f6681cf * fixed mem leak with withsymtable 2000-12-23 19:50:09 +00:00
peter
0bee4f7cb9 * fixed missing typecast 2000-12-10 20:25:32 +00:00
florian
5d57010458 * fixed web bug #1203: class fields can be now redefined
in Delphi mode though I don't like this :/
2000-12-10 14:14:51 +00:00
florian
00a98196cc * moved to i386 2000-11-30 22:16:49 +00:00
florian
b9796f6a7f * unused units removed from uses clause
* some changes for widestrings
2000-11-29 00:30:30 +00:00
pierre
319ddd55cb * stabs fixing 2000-11-28 00:28:06 +00:00
peter
e0a874dc4f * some realname updates for messages 2000-11-12 22:17:46 +00:00
florian
d5a2d64cf5 * fixed two bugs to get make cycle work, but it's not enough 2000-11-06 15:54:15 +00:00
florian
51527ba1c9 + merged Attila's changes for interfaces, not tested yet 2000-11-04 14:25:19 +00:00
peter
5115083270 * tprocdef.fullprocname added for better casesensitve writing of
procedures
2000-11-01 23:04:37 +00:00
peter
451723647e * symtable splitted, no real code changes 2000-10-31 22:02:46 +00:00
peter
eb3ca9c51d * unit names and procedure names are stored mixed case 2000-10-15 07:47:51 +00:00
peter
e171f341a0 * moehrendorf oct 2000 rewrite 2000-10-14 10:14:45 +00:00
peter
38951f5ce1 * lot of compile updates for cg11 2000-10-01 19:48:23 +00:00
peter
a71e44ac49 * use defines.inc 2000-09-24 15:06:10 +00:00
peter
4c94659743 * moved some util functions from globals,cobjects to cutils
* splitted files into finput,fmodule
2000-08-27 16:11:48 +00:00
pierre
f1bd579bf4 * fix the stabs problems 2000-08-21 11:27:44 +00:00
peter
c21d6d6871 * give fatal if objfpc/delphi mode things are found (merged) 2000-08-20 14:58:41 +00:00
peter
7eaac1706d * splitted namedobjectitem.next into indexnext and listnext so it
can be used in both lists
  * don't allow "word = word" type definitions (merged)
2000-08-16 18:33:53 +00:00
peter
43f82ba0ff * memdebug/memory patches (merged)
* only once illegal directive (merged)
2000-08-08 19:28:57 +00:00
michael
650fbb86aa + removed logs 2000-07-13 11:32:24 +00:00
michael
e7aca136a1 + Initial import 2000-07-13 06:29:38 +00:00
pierre
d86f8c5ec8 * fix for bug #1019 2000-07-03 09:48:23 +00:00
pierre
36f461db33 * align all variants to same start address 2000-06-23 21:34:09 +00:00
peter
d55672bd95 * C record packing fixed to also check first entry of the record
if bigger than the recordalignment itself
  * variant record alignment uses alignment per variant and saves the
    highest alignment value
2000-06-18 18:11:32 +00:00
peter
43b224b136 * rename the result of a function to hide it instead of using setname 2000-06-14 19:00:58 +00:00
peter
9527b53b60 * removed unused label i left in when testing 2000-06-14 16:51:18 +00:00
peter
14d248a322 * checking for dup id with para of methods fixed for delphi mode 2000-06-09 21:34:40 +00:00
pierre
7b1219536c + support for NOT overloading
+ unsupported overloaded operators generate errors
2000-06-05 20:41:17 +00:00
pierre
b8020e724b fix bug in tbs/tbs0317 2000-06-02 21:17:26 +00:00
florian
2658c0aeda + fieldtable support for classes 2000-06-02 18:48:47 +00:00
peter
aa7cb6bde2 * delphi/tp mode fixes for dup id checking (tbs319,tbf320) 2000-06-01 19:07:52 +00:00
pierre
66b7f21d77 * fix for bug #959 2000-05-23 14:15:44 +00:00
pierre
a77b264bd0 * * get it to compile with Delphi by Kovacs Attila Zoltan 2000-05-12 05:55:04 +00:00
pierre
1bd418e467 * some DBX changes but it still does not work ! 2000-05-11 09:40:11 +00:00
pierre
f4d925b2e1 * fix the unitsym chain 2000-05-03 14:34:05 +00:00
pierre
71cbe13810 * power to ** operator fixed 2000-04-27 11:35:03 +00:00
pierre
22a6677394 * fix for snapshot failue
* order_overloaded reintrocduced and adapted to operators
2000-04-27 10:06:04 +00:00
pierre
3174b39bcc * More changes for operator bug
Order_overloaded method removed because it conflicted with
    new implementation where the defs are ordered
    according to the unit loading order !
2000-04-26 08:54:18 +00:00
pierre
dbdb7ee667 + Hint about unused unit
* Testop bug fixed !!
    Now the operators are only applied if the unit is explicitly loaded
2000-04-25 23:55:29 +00:00
peter
013cfb9bc4 * made overloaded_operators local per unit, but it still doesn't work
correct
2000-04-24 12:45:44 +00:00
pierre
861a491bbd * fix bug #294 in a BP compatible way ie. hidding the function result 2000-03-27 21:15:34 +00:00
florian
2805167e6e * bug #294 fixed: parameters can have now the same name as the function/
procedure, this is compatible with TP/Delphi
2000-03-22 09:25:57 +00:00
florian
4ac9fc1812 * in delphi mode: method parameters can now have the same name as parameters 2000-03-20 09:34:33 +00:00
pierre
51443d110f * fix for bug #840 2000-03-01 13:56:31 +00:00
pierre
16638c8b65 * fixes for locals in inlined procedures
fix for bug797
  + stabs generation for inlined paras and locals
2000-03-01 00:03:10 +00:00
florian
df41d1395c * newcg is compiling
* fixed the dup id problem reported by Paul Y.
2000-02-20 20:49:45 +00:00
pierre
12d4917565 * avoid stack overflow in tref.done (bug 846) 2000-02-11 13:53:49 +00:00
peter
4a4a24b6e8 * log truncated 2000-02-09 13:22:42 +00:00
peter
96ed273164 * smartlinking fixes for binary writer
* release alignreg code and moved instruction writing align to cpuasm,
    but it doesn't use the specified register yet
2000-01-12 10:38:16 +00:00
pierre
beebcdebfc * avoid testing object types that are simple aliases for unused privates 2000-01-09 00:37:56 +00:00
peter
e525797c51 * updated copyright to 2000 2000-01-07 01:14:18 +00:00
peter
a7161a8dfc * fixed resolving of ttypesym which are reference from object/record
fields.
2000-01-03 19:26:03 +00:00
florian
89c403c529 * very basic widestring support 1999-12-18 14:54:34 +00:00
peter
295c4e4ce1 * moved verbose to implementation uses 1999-12-02 11:28:27 +00:00
pierre
98a6530898 * give info of original duplicated symbol more often 1999-12-01 22:32:35 +00:00
peter
0512ba80fb + ttype, tsymlist 1999-11-30 10:40:42 +00:00
pierre
ae7a04ea12 * defaultsymtablestack is now restored after parser.compile 1999-11-24 11:41:03 +00:00
pierre
fca8adf6c2 * also complain about unused functions in program 1999-11-22 00:23:09 +00:00
pierre
bb6dc0cee8 * avoid certain wrong notes/hints 1999-11-19 14:49:15 +00:00
pierre
b528749138 * Notes/Hints for local syms changed to
Set_varstate function
1999-11-18 15:34:44 +00:00
pierre
62da9bd4c0 * Notes/hints changes 1999-11-17 17:04:58 +00:00
peter
918b5219ea * labels used but not defined give error instead of warning, the warning
is now only with declared but not defined and not used.
1999-11-15 22:00:46 +00:00
pierre
94f418dc11 + one field added for ttoken record for operator
linking the id to the corresponding operator token that
    can now now all be overloaded
  * overloaded operators are resetted to nil in InitSymtable
    (bug when trying to compile a uint that overloads operators twice)
1999-11-15 17:52:59 +00:00
pierre
d766ee87fc + better reference pos for forward defs 1999-11-09 23:35:49 +00:00
Jonas Maebe
d70b3211a4 + search optimial register to use in alignment code (compile with
-dalignreg, -dalignregdebug to see chosen register in
    assembler code). Still needs support in ag386bin.
1999-11-06 16:21:57 +00:00
peter
0887060ff2 * truncated log to 20 revs 1999-11-06 14:34:16 +00:00
pierre
25553ebfea * local browsing works at first level
ie for function defined in interface or implementation
    not yet for functions inside other functions
1999-11-05 17:18:02 +00:00
peter
94cb2299ea * moved unit alias support into ifdef 1999-11-04 23:13:25 +00:00
peter
1610a9d709 + -Ua<oldname>=<newname> unit alias support 1999-11-04 10:54:02 +00:00