Commit Graph

49886 Commits

Author SHA1 Message Date
marcus
78b8fb3414 Ami-Extra: fixed compilation for powerpc-amiga
git-svn-id: trunk@35171 -
2016-12-19 07:06:27 +00:00
marcus
0ee0c6499b Ami-extra: 64bit fix in muihelper for Dispatcher
git-svn-id: trunk@35170 -
2016-12-18 22:04:56 +00:00
florian
bba23f6561 * warnings fixed
* cleanup

git-svn-id: trunk@35169 -
2016-12-18 20:28:38 +00:00
florian
2e16628db1 * warning fixed
git-svn-id: trunk@35168 -
2016-12-18 20:27:13 +00:00
marcus
29abfe9dd3 Ami-Extra: some more MUI Helper for custom classes and hooks
git-svn-id: trunk@35167 -
2016-12-18 19:35:59 +00:00
michael
b08297a667 * Fix from Mattias Gaertner to implement calling functions without arguments.
git-svn-id: trunk@35166 -
2016-12-18 16:22:23 +00:00
marcus
3f4e9cfcb7 Ami-Extra: example code for muihelper
git-svn-id: trunk@35165 -
2016-12-18 15:17:02 +00:00
marcus
f4a3a45c3f Amiga: AsTag/TAG_ with unsigned overloads
git-svn-id: trunk@35164 -
2016-12-18 14:35:15 +00:00
marcus
b93a685ab8 Amiga: moved muihelper to ami-extra, added more macros, 64bit ready
git-svn-id: trunk@35163 -
2016-12-18 14:11:38 +00:00
Jonas Maebe
6e05c78a54 + support for recording an exception catching personality function for a
procdef for ABI-conformant exception handling

git-svn-id: trunk@35162 -
2016-12-18 13:57:45 +00:00
Jonas Maebe
4b9179636b + support for creating and writing LLVM landingpad instructions
git-svn-id: trunk@35161 -
2016-12-18 13:57:42 +00:00
Jonas Maebe
28e5636daa + support for LLVM nil assembler symbols in instructions (write as "null")
+ support for LLVM nil tai operands (will be used for terminating a daisy
    chain of catch/filter clauses of landingpads): don't try to write it

git-svn-id: trunk@35160 -
2016-12-18 13:57:39 +00:00
Jonas Maebe
746de569d5 - removed unused local variable
git-svn-id: trunk@35159 -
2016-12-18 13:57:36 +00:00
Jonas Maebe
b14c037533 * record in the flowcontrol flags whether we are currently in a block whose
exceptions are caught in the current routine (fc_catching_exceptions),
    so that for LLVM we will be able to use "invoke" instead of "call" in that
    case

git-svn-id: trunk@35158 -
2016-12-18 13:57:33 +00:00
Jonas Maebe
6a1c4f9b75 * replaced cg.a_label/a_jmp_always with hlcg.* calls (only for consistency,
does not change anything in practice)

git-svn-id: trunk@35157 -
2016-12-18 13:57:29 +00:00
Jonas Maebe
3ae1f6664a * extracted exception state handling helpers into a utility class so
they can be overridden

git-svn-id: trunk@35156 -
2016-12-18 13:57:25 +00:00
Jonas Maebe
7503c2bd3e * changed llvmgettemprecorddef() to take an open array instead of a tfplist
as list of defs to be stored in the record, so we don't need to create and
    free a class instance every time we call this routine

git-svn-id: trunk@35155 -
2016-12-18 13:57:22 +00:00
Jonas Maebe
5850963ea9 - removed double compilation commands for two units
git-svn-id: trunk@35154 -
2016-12-18 13:57:19 +00:00
Jonas Maebe
d8c4980b2e * don't reuse the same type with the typed const builder for
differently-sized types

git-svn-id: trunk@35153 -
2016-12-18 13:57:15 +00:00
Jonas Maebe
691c2d655e * put multiple statements of the else-part of case between begin..end
git-svn-id: trunk@35152 -
2016-12-18 13:57:12 +00:00
Jonas Maebe
fe6b662c37 * fixed range error
git-svn-id: trunk@35151 -
2016-12-18 13:57:09 +00:00
Jonas Maebe
bcb7fedb3c * fixed indentation
git-svn-id: trunk@35150 -
2016-12-18 13:57:06 +00:00
nickysn
ca46040728 + added 16-bit versions of the InterLocked* functions for i8086
git-svn-id: trunk@35149 -
2016-12-18 00:17:10 +00:00
svenbarth
109dff8b56 * allow nested procedures and functions in generic routines (and get rid of an untranslated error message :P )
git-svn-id: trunk@35148 -
2016-12-17 21:23:07 +00:00
svenbarth
d34acf3bc7 * fix for Mantis #31120: check current_genericdef only if the current_procinfo isn't used
+ added test

Note: the test is added to webtbs although it's right now still failing, cause I'll remove the restriction for nested procedures since the compiler now supports them correctly. Due to the way we handle generics we don't have problems with them unlike Delphi.

git-svn-id: trunk@35147 -
2016-12-17 21:20:44 +00:00
svenbarth
779799c406 * only record tokens for real generic routines or those that belong to a generic class/record
* don't parse a semicolon at the end for real specializations or specializations of methods that belong to a specialized class/record 

git-svn-id: trunk@35146 -
2016-12-17 21:13:30 +00:00
svenbarth
a76fd967b2 * inherit df_generic and df_specialization from the parent routine and correctly set the genericdef for a specialization
git-svn-id: trunk@35145 -
2016-12-17 21:10:58 +00:00
Jonas Maebe
c0f4e4db34 * group emitting a label of a try-block and restoring the control flow flags
in a single routine, so that both happen at the same time (needed for LLVM
    where inside a try-block all calls need to be performed using "invoke"
    and refer to the current try-block/catching label)

git-svn-id: trunk@35144 -
2016-12-16 22:41:30 +00:00
Jonas Maebe
a1c0d1a1ff * moved exception handling helpers from ncgutil to ncgflw as they are only
used there (could be turned into protected methods if they are ever needed
    by child classes)

git-svn-id: trunk@35143 -
2016-12-16 22:41:28 +00:00
Jonas Maebe
b75a07b713 * clarified comment for fc_unwind_*
git-svn-id: trunk@35142 -
2016-12-16 22:41:24 +00:00
Jonas Maebe
880d438704 * renamed t<cpuname>procinfo to tcpuprocinfo for all targets, so we can
inherit from it for LLVM without a thousand ifdefs

git-svn-id: trunk@35141 -
2016-12-16 22:41:21 +00:00
Jonas Maebe
e35f83ba94 * support building the LLVM compiler for Darwin/x86_64 and Linux/x86_64 by
specifyng LLVM=1 to make (does not yet work for the top-level makefile
    on Linux because of the fpmake-based building of the IDE)

git-svn-id: trunk@35140 -
2016-12-16 22:41:17 +00:00
Jonas Maebe
d6ccd54da5 - removed unused doexceptlabel
git-svn-id: trunk@35139 -
2016-12-16 22:38:07 +00:00
Jonas Maebe
5bd03651a9 * clarify/ensure intended order of evaluation
git-svn-id: trunk@35138 -
2016-12-16 22:38:04 +00:00
Jonas Maebe
b936d8f012 * don't internalerror when performing an LLVM tc_equal conversion from one
TP-style object to another and the sizes differ, at least if they are
    related
  * restructured and commented the LLVM type conversion checks

git-svn-id: trunk@35137 -
2016-12-16 22:38:01 +00:00
svenbarth
86207c9b55 - remove no longer valid {otNone} comment
git-svn-id: trunk@35136 -
2016-12-16 14:23:14 +00:00
svenbarth
a9d14fe30b * extend TOrdType by entries for 64-bit values
* have tkInt64 and tkQWord entries also contain the OrdType field (basically the compiler can now use the same function to generate them only with different type kinds)

+ added test

git-svn-id: trunk@35135 -
2016-12-16 14:22:04 +00:00
svenbarth
460f309035 * fix for Mantis #31123, applied patch by Maciej Izak
* adjusted test trtti10.pp due to renamed RecInitTable field

Original commit message:

Public interface for init table for records in TypInfo:

* Rename RecInitTable to RecInitInfo (because it is special kind of PTypeInfo for init table of record). Has more sense in practical usage.
+ New structure TRecInitData (and related PRecInitData) to handle data for (init) type info for records (aka init table)
+ New structure TInitManagedField and pointer type PInitManagedField (for init table)
+ Special helper property RecInitData to get PRecInitData for tkRecord

+ test attached

git-svn-id: trunk@35134 -
2016-12-16 13:43:12 +00:00
svenbarth
121a857af8 * fix for Mantis #31118: applied patch by Maciej Izak to fix usage of wrong variable
+ added test

git-svn-id: trunk@35133 -
2016-12-15 13:47:26 +00:00
Károly Balogh
cabcc52db1 less occurred, a.k.a. revert of r35128 in fpmkunitsrc.inc. don't break the build by fixing typos with search & replace in generated files
git-svn-id: trunk@35132 -
2016-12-15 02:04:10 +00:00
michael
e342d3e15c * Not the complete fix for bug ID #31092 was committed
git-svn-id: trunk@35131 -
2016-12-14 22:21:49 +00:00
marco
7ef8f00100 * more occured -> occurred spelling fixes.
git-svn-id: trunk@35130 -
2016-12-14 20:05:21 +00:00
marco
7effa642b8 * more occured
git-svn-id: trunk@35129 -
2016-12-14 20:01:35 +00:00
svenbarth
7089677a22 * change RecInitTable into a direct reference to avoid an unnecessary indirection as both the full and init RTTI of a record always reside inside the same unit
git-svn-id: trunk@35128 -
2016-12-14 18:40:16 +00:00
svenbarth
e580e22576 * extend ref_rtti() with the possibility to use a direct reference if really desired
git-svn-id: trunk@35127 -
2016-12-14 18:38:54 +00:00
michael
d90738c784 * Fix by Graeme Geldenhuys for bug ID #31092
git-svn-id: trunk@35126 -
2016-12-14 17:42:57 +00:00
svenbarth
12dba952f0 * integration of Part 2 patch of Mantis #30687 with a few adjustments:
- indentation in ncgrtti.pas
  - fewer ifdefs in rtti.inc
  - InitTable/Terminator field as first field to avoid padding on targets that require proper alignment and have SizeOf(Pointer) > 4

Original message by Maciej Izak:

Breaking change for rtti layout for record rtti. Init table
is always accessible from regular rtti. Rtti table contains indirect
reference to init table, additionally init table contains nil-terminator (for
rtl purposes - the only way to determine kind of info : init or rtti). Pros:

* will be possible to create more Delphi compatible code for RTTI, finally end-user can access to *real* managed fields of records (some work on TypInfo.pp is still required but is not necessary).
* important step forward for management operators (anyway this commit is not directly related to management operators)
* much more optimal memory allocation/initialization/finalization for records created/destroyed by InitializeArray/FinalizeArray, for example:

type
  TBar = record
    f1,f2,f3,f4,f5,f6,f7,f8,f9: byte;
    s: string;
  end;

previously:

  GetMem(PB, SizeOf(TBar));
  InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE was executed 10 times

now:

  GetMem(PB, SizeOf(TBar));
  InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE is executed just once

+ test attached

git-svn-id: trunk@35125 -
2016-12-13 23:03:11 +00:00
svenbarth
43212c4507 * use a separate OS set for the Rtti unit than CommonSrcOSes
git-svn-id: trunk@35124 -
2016-12-13 22:06:28 +00:00
svenbarth
17154fedaa * move rtti unit from common directory to inc directory as the former is basically for non-Windows files
git-svn-id: trunk@35123 -
2016-12-13 22:04:32 +00:00
marco
f4213124f2 * some more occured->occurred, mostly in comments
git-svn-id: trunk@35122 -
2016-12-13 14:26:41 +00:00