Commit Graph

4803 Commits

Author SHA1 Message Date
svenbarth
24c4b90343 * instead of declaring another type with a 'attribute' suffix, *search* for another type with a 'ATTRIBUTE' suffix (Delphi allows declaring both a TFoo and TFooAttribute in the same unit)
+ added test

git-svn-id: trunk@42362 -
2019-07-12 22:05:18 +00:00
svenbarth
869664c6da * rename custom attributes related tests to something more sensible
git-svn-id: trunk@42361 -
2019-07-12 22:05:12 +00:00
svenbarth
b2932393df Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 1/3]
Implemented attributes for class types and properties (based on work by Joost van der Sluis). Added TCustomAttribute - a base class for attributes. Added TUnitInfo record to RTTI. It contains the unit name and unit options (for now only a flag which specifies if the unit contains attributes). Added several tests for attributes.

git-svn-id: trunk@42356 -
2019-07-12 22:04:48 +00:00
Jonas Maebe
40082100e1 * fixed range test optimization for signed types and enabled it for them
git-svn-id: trunk@42332 -
2019-07-06 09:57:32 +00:00
svenbarth
433f07c407 * forgot to commit tests in r42329
git-svn-id: trunk@42330 -
2019-07-05 15:30:53 +00:00
svenbarth
d0eddbcbb9 * fix for Mantis #35735: also handle "generic" keyword inside helper types
+ added test

git-svn-id: trunk@42328 -
2019-07-05 14:12:13 +00:00
Jonas Maebe
c425c51963 * simplify and optimize generated LLVM code for case statements
git-svn-id: trunk@42305 -
2019-06-29 12:17:49 +00:00
Jonas Maebe
c038e4c3f2 * relaxation of r42272: again only show warnings rather than errors for
out-of-range constants, because of the comments mentioned in #35753
    (except for enums, as apparently Delphi does the same)
  * added range check warnings about explicit type casts that throw away
    bits (e.g. byte($fff)), without giving warnings for most common cases
    (like cardinal(-1))
  * fixed masking/sign exting constant array indices (must be based on index
    range type size/signedness rather than on array size/"signedness")

git-svn-id: trunk@42275 -
2019-06-23 14:12:33 +00:00
Jonas Maebe
3a2fe24f49 * report range errors for assigning out-of-range constants to enums in
Delphi mode (mantis #35671)
  * always give an error (rather than only a warning in case range checking
    is disabled) when assigning an out-of-range constant to an ordinal variable
    whose type does not span the entire range that its bits can hold (because
    the result is undefined and FPC's optimisers rely on variables only
    holding values that are valid for the type)

git-svn-id: trunk@42272 -
2019-06-22 17:30:42 +00:00
Jonas Maebe
c262c5dbc9 * synchronised with trunk till r42256
git-svn-id: branches/debug_eh@42257 -
2019-06-20 17:21:34 +00:00
Mattias Gaertner
783505b4d7 fcl-passrc: starting test generics
git-svn-id: trunk@42252 -
2019-06-20 08:47:30 +00:00
svenbarth
89e454aca8 * rework/extend SetToString/StringToSet so that sets with a size > 4 can be converted as well (this is Delphi compatible)
+ added test

git-svn-id: trunk@42240 -
2019-06-16 21:36:25 +00:00
Legolas
7c02f2b531 * Nintendo DS port updated to libnds ver.1.7.3
git-svn-id: trunk@42202 -
2019-06-10 06:39:46 +00:00
Jonas Maebe
faf75095cd * synchronised with trunk till r42189
git-svn-id: branches/debug_eh@42190 -
2019-06-07 18:24:38 +00:00
Jonas Maebe
eab079c7bd * fixed cbool "and" with full boolean evaluation, and cbool "xor"
(mantis #35272)

git-svn-id: trunk@42167 -
2019-06-02 20:04:06 +00:00
olivier
353da84b74 + Added test object files for x86_64-haiku.
git-svn-id: trunk@42145 -
2019-05-31 10:10:05 +00:00
michael
205be75320 * Added simple example for AssignStream
git-svn-id: trunk@42123 -
2019-05-25 15:55:43 +00:00
michael
f515c70a40 * Example to demonstrate exit code forms in TCustomApplication
git-svn-id: trunk@42122 -
2019-05-25 15:52:33 +00:00
Jonas Maebe
9e9a982bfe * synchronised with trunk till r42095
git-svn-id: branches/debug_eh@42096 -
2019-05-18 18:43:51 +00:00
Jonas Maebe
7e51c5e856 * DFA now takes case-completeness into account (mantis #35598)
git-svn-id: trunk@42091 -
2019-05-18 12:01:41 +00:00
nickysn
357d3ca390 - removed cprt0.as from the OpenBSD i386 RTL as well
git-svn-id: trunk@42078 -
2019-05-15 16:13:57 +00:00
nickysn
ef86b3ab29 - delete cprt0.as from the OpenBSD x86_64 startup code, because it's not needed for bootstrapping
git-svn-id: trunk@42077 -
2019-05-15 15:37:51 +00:00
pierre
0961e49919 Add new files required to fix RTL compilation for macos target
git-svn-id: trunk@42061 -
2019-05-14 04:31:36 +00:00
Jonas Maebe
1b6425176b * synchronised with trunk till r42049
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +00:00
Jonas Maebe
ba1b4b1c92 + support for verifying whether a case statements handles all possibilities
(based on patch by Martok)
   o enabled by default in ISO and Extended Pascal: compile-time error if not
     the case in ISO mode, warning and run-time error in Extended Pascal mode
   o warning enabled by default in all other modes for boolean, enumeration and
     subrange integer types with ranges different from the default ones
     (i.e., different from 0..255, -128..127, 0..65536, etc)
   o warnings for all ordinal types can be enabled in all modes with
     -CC

git-svn-id: trunk@42047 -
2019-05-12 14:29:11 +00:00
svenbarth
251c559662 * fix for Mantis #35533: when searching for helpers on types that usually don't support a point operator, don't use automatic dereferentiation
+ added tests

git-svn-id: trunk@42036 -
2019-05-10 20:56:41 +00:00
svenbarth
5a5b47fa24 + add support for MultiHelpers modeswitch by Ryan Joseph for Mantis #35159
+ added tests

git-svn-id: trunk@42026 -
2019-05-10 14:04:45 +00:00
pierre
fae45b2075 Add first linux RTL compliance test file t_linux.h2paschk
git-svn-id: trunk@42016 -
2019-05-06 21:13:42 +00:00
pierre
12647c348e Add script to use h2paschk on t_OS.h2paschk file for rtl tests for system header compliance
git-svn-id: trunk@42015 -
2019-05-06 21:10:12 +00:00
Jonas Maebe
3fa6838815 * basic llvm metadata support
git-svn-id: branches/debug_eh@41978 -
2019-05-02 19:45:26 +00:00
Jonas Maebe
3a1fb45315 * synchronised with trunk till r41976
git-svn-id: branches/debug_eh@41977 -
2019-05-02 19:44:41 +00:00
svenbarth
b7a716cd81 * correct return a pointer to the list so that List^[x] works as it did before 3.2
+ added test

git-svn-id: trunk@41938 -
2019-04-26 08:13:11 +00:00
Jonas Maebe
2923e484fd * synchronised with trunk till r41907
git-svn-id: branches/debug_eh@41908 -
2019-04-20 18:22:52 +00:00
nickysn
d9c109a4dd + added h2paschk structure checker files for the DirectDraw and DirectInput
header translations, used by PTCPas.

git-svn-id: trunk@41887 -
2019-04-16 16:45:54 +00:00
Jonas Maebe
a0f850d57f * synchronised with trunk till r41885
git-svn-id: branches/debug_eh@41886 -
2019-04-16 16:20:44 +00:00
nickysn
9b7cbb0e0b + added OpenBSD RTL structure checker description file for use with the h2paschk
tool. Currently only checks the stat and dirent structures, but more will be
  added in the future.

git-svn-id: trunk@41874 -
2019-04-15 14:22:44 +00:00
Jeppe Johansen
53542b7c5e - Port RISC-V64 startup code to native inline routines.
git-svn-id: trunk@41871 -
2019-04-14 23:36:08 +00:00
Jeppe Johansen
2b78a8fd3d - Add support for .option directive in riscv assembler.
- Use addiw when adjusting U32 to S32

git-svn-id: trunk@41870 -
2019-04-14 20:51:29 +00:00
svenbarth
e6add40495 * fix for Mantis #35348: correctly handle symbols that aren't parameter types (e.g. default values)
+ added test

git-svn-id: trunk@41869 -
2019-04-14 20:47:47 +00:00
svenbarth
c147debda1 * ensure that the correct amount of parameters is used for an operator overload (this is essentially important for unary operators that were declared with two arguments)
git-svn-id: trunk@41868 -
2019-04-14 20:47:43 +00:00
Jonas Maebe
a7bd37d17a * synchronised with trunk till r40776
git-svn-id: branches/debug_eh@41867 -
2019-04-13 15:16:09 +00:00
nickysn
47b8bf5924 + added the initial implementation of my C structure checker code generator
tool, named h2paschk. This is currently a separate tool, that requires a
  manually crafted input file with a special syntax (example is included as a
  comment in the source code), that contains descriptions of all the records
  that need to be checked, but it is planned to add support to h2pas to generate
  these files automatically, since this would be very useful.

git-svn-id: trunk@41858 -
2019-04-10 17:06:17 +00:00
svenbarth
18519c9559 * fix for Mantis #34526: rely on tc_arrayconstructor_2_set instead of manually converting an array constructor to a set, this way assignment operator overloads are taken into account as well
Note: there is still a conversion to a set if the types were determined to be incompatible, so that the error is still "set of X is incompatible to Y" instead of "array of Z is incompatible to Y"
+ added tests

git-svn-id: trunk@41844 -
2019-04-05 15:24:39 +00:00
svenbarth
307ff071e6 * allow any untyped parameter to be passed to a untyped constref parameter
+ added test

git-svn-id: trunk@41829 -
2019-04-04 19:31:55 +00:00
michael
1c8a1407f5 * Added unicode sample using unicodestring
git-svn-id: trunk@41814 -
2019-04-01 16:54:53 +00:00
michael
ffea4d3b38 * Unicode test program using UnicodeString
git-svn-id: trunk@41785 -
2019-03-24 08:47:16 +00:00
svenbarth
f7817d25ff * parameter type needs to be Nil for formal parameters (Delphi compatible)
* adjusted test trtti15
+ added test trtti19

git-svn-id: trunk@41770 -
2019-03-22 22:29:20 +00:00
nickysn
b6d2ef12ad - removed OpenBSD loaders that are not needed for bootstrapping with FPC 3.0.4
git-svn-id: trunk@41765 -
2019-03-22 01:08:37 +00:00
nickysn
e4ffeb2266 + added OpenBSD startup units for gprof support
git-svn-id: trunk@41757 -
2019-03-21 12:52:25 +00:00
Jonas Maebe
dc2cbf8018 * synchronised with trunk till r41725
git-svn-id: branches/debug_eh@41726 -
2019-03-17 15:25:31 +00:00