Commit Graph

428 Commits

Author SHA1 Message Date
paul
cf0a1b1af9 compiler: safecall exception handling:
- move safecall exception handling from codegenerator to generate_except_block method (which generates nodes)
  - call SafeCallException for safecall methods which raises an exception

git-svn-id: trunk@14940 -
2010-02-26 10:17:24 +00:00
Jonas Maebe
e89d0bcee3 + also print node tree after firstpass with -vp (patch by Adriaan van Os,
mantis #15710)

git-svn-id: trunk@14883 -
2010-02-10 16:41:16 +00:00
paul
4b53a54b51 compiler: implement 'var' and 'class var' sections for classes + tests
git-svn-id: trunk@14598 -
2010-01-10 13:48:43 +00:00
paul
3ed4c58502 compiler:
- implement class properties: properties which can access only static fields and static class methods
  - tests
  - fix a possibility to call an instance method from the class method

git-svn-id: trunk@14585 -
2010-01-09 18:37:54 +00:00
florian
c1f3d8dcaa * unified names of system_*/systems_* sets
git-svn-id: trunk@14566 -
2010-01-07 18:16:20 +00:00
paul
bf45b463bc compiler: fix no finalization calls for libraries caused by r14543
git-svn-id: trunk@14552 -
2010-01-06 09:03:09 +00:00
paul
556afdca51 compiler: fix uninitialized result caused by r14543
git-svn-id: trunk@14547 -
2010-01-05 19:15:16 +00:00
paul
f25c21c287 compiler: fix wrong typecast
git-svn-id: trunk@14545 -
2010-01-05 16:22:26 +00:00
paul
8b27daae2c compiler: don't generate code for empty initialization and finalization sections (with help of Florian) (issue #0013482)
git-svn-id: trunk@14543 -
2010-01-05 16:07:37 +00:00
florian
9955e6b2bf * dfa fixes by Sergei Gorelkin, resolve #15402
git-svn-id: trunk@14455 -
2009-12-20 21:02:11 +00:00
Jonas Maebe
9d5b597105 * don't push/pop the unit/program's static symtable on/off the symtable stack
before parsing the main begin/end, because that symtable is already on the
    symtable stack at that point   

git-svn-id: trunk@14233 -
2009-11-21 00:11:39 +00:00
paul
e784ec1079 merge revisions 13898-13899:
- compiler: allow message after the *deprecated* keyword
 - compiler: raise an internal error if deprecated message is trying to set to a non clear string pointer

git-svn-id: trunk@13997 -
2009-11-01 14:06:30 +00:00
florian
515774b864 * merged armthum branch
-- Zusammenführen der Unterschiede zwischen Projektarchiv-URLs in ».«:
U    rtl/arm/setjump.inc
A    rtl/arm/thumb2.inc
U    rtl/arm/divide.inc
A    rtl/embedded/arm/stm32f103.pp
U    rtl/inc/system.inc
U    compiler/alpha/cgcpu.pas
U    compiler/sparc/cgcpu.pas
U    compiler/i386/cgcpu.pas
U    compiler/ncgld.pas
U    compiler/powerpc/cgcpu.pas
U    compiler/avr/cgcpu.pas
U    compiler/aggas.pas
U    compiler/powerpc64/cgcpu.pas
U    compiler/x86_64/cgcpu.pas
U    compiler/cgobj.pas
U    compiler/psystem.pas
U    compiler/aasmtai.pas
U    compiler/m68k/cgcpu.pas
U    compiler/ncgutil.pas
U    compiler/rautils.pas
U    compiler/arm/raarmgas.pas
U    compiler/arm/armatts.inc
U    compiler/arm/cgcpu.pas
U    compiler/arm/armins.dat
U    compiler/arm/rgcpu.pas
U    compiler/arm/cpubase.pas
U    compiler/arm/agarmgas.pas
U    compiler/arm/cpuinfo.pas
U    compiler/arm/armop.inc
U    compiler/arm/narmadd.pas
U    compiler/arm/aoptcpu.pas
U    compiler/arm/armatt.inc
U    compiler/arm/aasmcpu.pas
U    compiler/systems/t_embed.pas
U    compiler/psub.pas
U    compiler/options.pas

git-svn-id: trunk@13801 -
2009-10-04 09:03:44 +00:00
florian
c0d4efed2e * forbid passing derived classes to call by reference parent classes (for objects, this is still allowed), resolves #13135
git-svn-id: trunk@13551 -
2009-08-17 21:46:25 +00:00
Jonas Maebe
6505b4f9c5 * reverted rest of r13469 because it causes crashes for linux/ppc64
git-svn-id: trunk@13473 -
2009-07-29 20:35:51 +00:00
Jonas Maebe
f265fbe343 * fixed GOT loading for i386 in stubs for external procedures whose external
name is (re)defined in the implementation (mantis #14221)

git-svn-id: trunk@13469 -
2009-07-28 17:28:17 +00:00
Jonas Maebe
2465126f60 * also check that nested procedures don't have any nested procedures
of their own that are marked as inline, instead of only doing so
    for non-nested procedures (mantis #13553)

git-svn-id: trunk@13025 -
2009-04-22 15:12:42 +00:00
yury
b3b538e215 * Removed unused local vars.
git-svn-id: trunk@12840 -
2009-03-01 11:44:15 +00:00
florian
c8fae83c57 * forgotten commit of loop strength reduction patch
git-svn-id: trunk@12174 -
2008-11-19 11:03:20 +00:00
peter
0f6f1a9c97 * remove obsolete unchain_overloads
git-svn-id: trunk@12065 -
2008-11-12 22:42:19 +00:00
peter
8419161964 * current_objectdef is now always valid when parsing is within the
context of a class. This can be either the class declaration or
    a method implementation
  * replaced all current_procinfo.procdef._class with current_objectdef

git-svn-id: trunk@12059 -
2008-11-12 18:54:39 +00:00
Jonas Maebe
7626a91592 * disabled last safecall code for non-windows (mantis #12237)
git-svn-id: trunk@12021 -
2008-11-02 15:13:20 +00:00
peter
466f0c0064 * fixed crash in error message when specialization is not resolved
git-svn-id: trunk@11991 -
2008-10-28 16:31:55 +00:00
Jonas Maebe
c65f8e7652 * safecall is only supposed to do anything for Windows targets. Removed
partial implementation for other targets and run test only for Windows

git-svn-id: trunk@11593 -
2008-08-16 14:46:20 +00:00
peter
6c586e4eca * store specializations in globalsymtable for units, use localsymtable
for programs. this allows speciailizations to be done in the interface
    part of the unit
  * support tobject.typemember.typemember nesting for generics
  * fix generic parameter checking when a typemember was created with the
    type of a parameter
  * known issue is nested specializations don't work yet because the token
    replay can't handled nested replays yet

git-svn-id: trunk@11404 -
2008-07-18 23:30:44 +00:00
Jonas Maebe
21f14aaeff * fixed "array of const" check in r10473 (+ fixed indentation)
git-svn-id: trunk@10475 -
2008-03-12 10:48:19 +00:00
peter
beb01e6e79 * give warning for disabling inline if assembler
is detected

git-svn-id: trunk@10473 -
2008-03-11 17:57:24 +00:00
florian
39250de33a * don't load stack size value when generic stack checking is done, resolves #10924
git-svn-id: trunk@10429 -
2008-03-02 16:44:08 +00:00
florian
cd4b05f3de * better detection of source file change while writing debug info
* set module index before replaying tokens of a generic

git-svn-id: trunk@9767 -
2008-01-15 21:36:58 +00:00
Jonas Maebe
cdfb7c8f26 * patch from Sergei Gorelkin to return ansi/widestrings by reference
in an invisible parameter (Delphi compatible, faster/smaller code)

git-svn-id: trunk@9718 -
2008-01-11 22:36:50 +00:00
peter
6058b2c247 * renamed t_times to executionweight and moved it to
code generation pass
  * include executionweight in the spilling decision

git-svn-id: trunk@9330 -
2007-11-25 16:38:05 +00:00
Jonas Maebe
9f705776c9 * fixed disabling of inlining procedures/functions with nested
procedures/functions

git-svn-id: trunk@9232 -
2007-11-13 18:12:25 +00:00
yury
13d948c07b * Fixed: import Address Table should contain the same data as Import Lookup Table.
* Perform import by name with index as hint, if both import name and import index are specified.
* Fixed import by ordinal when external linker is used.
* Fixed some warnings and notes.

git-svn-id: trunk@9083 -
2007-11-02 23:07:15 +00:00
florian
90af7ebf72 * use only windows exceptions for stack checking on win32/win64, resolves #9166
git-svn-id: trunk@9020 -
2007-10-31 23:19:48 +00:00
florian
50cc61c8fd * ignore register list in pure assembler routines, resolves #9335
git-svn-id: trunk@8978 -
2007-10-28 20:41:19 +00:00
peter
a724d80e81 * debuginfo initialized per unit
git-svn-id: trunk@8918 -
2007-10-23 18:19:17 +00:00
peter
1e123d66ba * improved generics
git-svn-id: trunk@8838 -
2007-10-18 00:24:05 +00:00
florian
7229dcfdcb * setup a proper symtable stack before parsing the generic declaration itself, resolves #9419
git-svn-id: trunk@8820 -
2007-10-15 19:43:01 +00:00
peter
9f0ca44c94 * new tf_smartlink_library flag
* use create_smartlink[_sections|_library] to check what to 
    do for smartlinking

git-svn-id: trunk@8715 -
2007-10-01 16:55:08 +00:00
Jonas Maebe
0a606b308d - removed unused nested do_generate_code procedure from read_proc
git-svn-id: trunk@8678 -
2007-09-29 10:28:40 +00:00
Jonas Maebe
559bb6226e * don't try to translate the got register if it's NR_NO (fixes
regression of webtbs/tw3402 on linux/ppc64 after r8651)

git-svn-id: trunk@8668 -
2007-09-28 11:15:16 +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
Jonas Maebe
335bc9fd46 + PIC support for darwin/ppc32 (-Cg works now, no regressions in test
suite compiled with -Cg compared to without -Cg)
  + support for using a virtual register as PIC/got base register
  * moved got loading code from ncgutil to cgobj/cgcpu (can't test whether
    it didn't break anything under linux/i386, because "make cycle OPT=-Cg"
    was already broken due to the *prt*.as -> si_*.pp changes)

git-svn-id: trunk@8651 -
2007-09-26 16:41:32 +00:00
tom_at_work
1fa32dffef * remove additional dot for import name of external function. Makes tprocext compile and run for powerpc64 (stub still not fully working, due to missing GOT loading in stub).
git-svn-id: trunk@8518 -
2007-09-16 21:32:29 +00:00
Jonas Maebe
12575526da * also generate an implicit exception frame in case only the function
result is refcounted, since it may need to be finalized in case of
    an exception (mantis #9385)

git-svn-id: trunk@8347 -
2007-09-01 14:18:09 +00:00
yury
e7ef9757c9 * Corrected comment.
git-svn-id: trunk@8252 -
2007-08-09 10:33:18 +00:00
florian
b6cca14944 * proper handling of dummy result node in dfa, resolves #8717 and #8079
+ tests

git-svn-id: trunk@8147 -
2007-07-23 08:57:31 +00:00
florian
2b2c6f7f53 * don't add empty symtables when specializing generics
git-svn-id: trunk@8066 -
2007-07-15 17:16:21 +00:00
yury
bd0cafd545 * fixed ARM stackframe optimization when float registers are used.
git-svn-id: trunk@8032 -
2007-07-12 21:55:34 +00:00
yury
9bbff8042f * Set return value of safecall procedure if implicit try/finally blocks are disabled.
git-svn-id: trunk@7727 -
2007-06-18 21:40:33 +00:00