Commit Graph

6633 Commits

Author SHA1 Message Date
svenbarth
10af6fe2fb * fix for Mantis #35965: correct alignment also for the class info used to retrieve the unit name
+ added test

git-svn-id: trunk@42697 -
2019-08-15 13:29:19 +00:00
Jonas Maebe
03cd0cce59 * change result of pi function from ansistring into dynamic array, so we
generate unique calls every time we write to it
  * replace calls to high(ansistring/dynarray) in the inner body of the pi
    function with a variable that gets assigned once
  -> the FPC version is now just as fast as the C version

git-svn-id: trunk@42695 -
2019-08-15 10:32:36 +00:00
sergei
416c974d3f * x86_64: Fixed code generation for try..finally blocks, so that exit label from inner try..finally stays within scope of procedure's implicit try..finally block if one is present. Mantis #34772.
git-svn-id: trunk@42673 -
2019-08-13 08:29:28 +00:00
florian
5947143d8f * intel asm reader: try to read avx512 extensions only if the instruction supports them
* cleanup

git-svn-id: trunk@42656 -
2019-08-12 10:46:19 +00:00
florian
f9cd4c158a * improved readme.txt again
git-svn-id: branches/tg74/avx512@42649 -
2019-08-11 16:22:06 +00:00
florian
537c63bd83 * fixed a few merging issues
+ extended readme to explain avx tests can be run using GNU Parallel

git-svn-id: branches/tg74/avx512@42647 -
2019-08-11 16:05:19 +00:00
florian
bce70a5105 * test only a limited grid of surrogate pairs to avoid that tests run longer
than all other tests together when testing with -j

git-svn-id: branches/tg74/avx512@42646 -
2019-08-11 16:03:34 +00:00
florian
f883dd6dbb Synchronized with trunk, part 2 (make all works, avx-512 support not yet tested, no regression testing yet)
git-svn-id: branches/tg74/avx512@42643 -
2019-08-10 19:38:35 +00:00
florian
746bfced25 Synchronized with trunk, part 1 (only make cycle tested, make all is broken, avx-512 support not yet tested
git-svn-id: branches/tg74/avx512@42642 -
2019-08-10 13:53:20 +00:00
pierre
008c1436d8 Fix bug report 35937 by simple assembly code change and add test
git-svn-id: trunk@42603 -
2019-08-08 14:10:21 +00:00
Jonas Maebe
6b9f2114f1 * test from mantis #35897, already fixed
git-svn-id: trunk@42575 -
2019-08-03 13:52:46 +00:00
Jonas Maebe
46afcbb362 * an incomplete case statement is not an error in ISO Pascal (mantis #35910)
* give a compile-time error in ISO/Extended Pascal if the compiler can prove
    the case selector value is not handled, and a warning in other modes
    (mantis #35915)
   o trigger the case node simplification at the end of the case node typecheck
     pass, like for other nodes

git-svn-id: trunk@42574 -
2019-08-03 13:47:27 +00:00
Jonas Maebe
ce598c15ec * factored out the conditions under which add nodes need to perform
overflow checks
   o in particular ensure that cpu-specific overrides don't perform overflow
     checks when nf_internal is set

git-svn-id: trunk@42573 -
2019-08-03 12:19:50 +00:00
svenbarth
6952ab5baf * fix for Mantis #35918: don't set the mangledname for the attribute's constructor function; let the compiler do its job instead
git-svn-id: trunk@42560 -
2019-08-02 14:07:17 +00:00
florian
bdd4b6691e * fix test for arm
git-svn-id: trunk@42538 -
2019-07-30 21:04:30 +00:00
florian
9560d63e42 * test needs exception checking
git-svn-id: trunk@42537 -
2019-07-30 21:04:29 +00:00
florian
3ef319c0b0 * compilation of tests on 32 bit targets fixed, using while loops so keeping the type sizes
git-svn-id: trunk@42526 -
2019-07-28 21:06:37 +00:00
svenbarth
811d39d995 * correctly align the stream on targets that require proper alignment
git-svn-id: trunk@42522 -
2019-07-28 19:50:33 +00:00
svenbarth
8fc5c9edb2 * fix compilation of tests on 32-bit systems (doesn't (shouldn't?) change their behavior)
git-svn-id: trunk@42520 -
2019-07-28 19:26:51 +00:00
florian
1a67ffdd22 * fix alignment of ParamList
* fix test for architectures using aligned rtti

git-svn-id: trunk@42516 -
2019-07-28 12:43:15 +00:00
Jonas Maebe
3fb7c19482 - removed tests as modern Delphi versions behave differently (mantis #35886)
git-svn-id: trunk@42512 -
2019-07-28 12:03:40 +00:00
florian
23585ded15 * fix access to ParamFlags of the tkMethod branch of type data for CPUs requiring proper alignment
git-svn-id: trunk@42511 -
2019-07-28 11:55:19 +00:00
Jonas Maebe
789f288771 * fixed distribution of random(int64) based on patch by Pangea
(mantis #35878)

git-svn-id: trunk@42508 -
2019-07-28 11:14:58 +00:00
Jonas Maebe
1da43f67d4 * (non-ancient) Delphi versions that accept explicit ordinal -> floating
point typecasts behave the same as FPC (convert the value) rather than
    as Turbo Pascal (reinterpret the bit pattern) (mantis #35886)

git-svn-id: trunk@42507 -
2019-07-28 11:14:54 +00:00
svenbarth
5313f6e9af * fix Currency comparison... again...
git-svn-id: trunk@42490 -
2019-07-24 20:32:22 +00:00
svenbarth
0c27ea83be * we halt if the currency values are *not* equal, not if they're equal... m(
git-svn-id: trunk@42487 -
2019-07-23 20:53:50 +00:00
svenbarth
e97a2cb03e * tests with Delphi showed that an attribute class must explicitely declare a parameterless constructor if it should be used, cause TCustomAttribute.Create is private
Note: this also means that TCustomAttribute itself can not be used as an attribute
* adjusted existing tests
+ added test

git-svn-id: trunk@42471 -
2019-07-20 20:03:38 +00:00
svenbarth
c282f21b1b * don't bother finding the correct constructor if the attribute isn't a TCustomAttribute descendant anyway; simply skip the parameters in that case
+ added tests

git-svn-id: trunk@42470 -
2019-07-20 19:46:03 +00:00
svenbarth
6cde8ab4cb * fix for Mantis #35866: parse_paras does not check whether the expressions are really constant, so check that manually
+ added test

git-svn-id: trunk@42469 -
2019-07-20 19:45:59 +00:00
svenbarth
43b5dbf613 * fix for Mantis #23071: also store local symtable in the PPU if the procdef is generic as we need it to resolve genericdefs to nested types
git-svn-id: trunk@42459 -
2019-07-19 15:55:28 +00:00
svenbarth
4d6844e731 * fix test on systems where Currency is calculated using floating point types
git-svn-id: trunk@42458 -
2019-07-19 15:55:25 +00:00
svenbarth
176a63b67b * fix for Mantis #35862: free the list of functions added with AddTerminateProc to avoid memory leaks
+ added test

git-svn-id: trunk@42457 -
2019-07-19 15:55:21 +00:00
svenbarth
87458a065c * allow use of multiple, comma separated attributes as Delphi allows that as well
+ added test

git-svn-id: trunk@42409 -
2019-07-12 22:08:14 +00:00
svenbarth
404b465c33 * allow custom attributes for all type declarations that are not a simple alias
+ added tests

git-svn-id: trunk@42405 -
2019-07-12 22:08:00 +00:00
svenbarth
a72553eea2 * disable [...] syntax for procedure directives if modeswitch "prefixed attributes" is enabled; they conflict otherwise and it's not easily resolveable
+ added test

git-svn-id: trunk@42402 -
2019-07-12 22:07:50 +00:00
svenbarth
b945e66e28 * store attribute information in PPU; this is less important for the compiler, but more for e.g. Lazarus when dealing with binary only units
* increase ppu version
+ added test
* adjust ppudump to handle attributes as well
ToDo: output parameter nodes as well

git-svn-id: trunk@42401 -
2019-07-12 22:07:46 +00:00
svenbarth
71fa4d1fe2 * the RTTI of an attribute not only consists of the creation function, but also of the attribute's type, a pointer to the constructor and a data blob containing the constant parameters
+ added test

git-svn-id: trunk@42390 -
2019-07-12 22:07:05 +00:00
svenbarth
c214648224 + add a test for overloaded attribute constructors
git-svn-id: trunk@42380 -
2019-07-12 22:06:28 +00:00
svenbarth
5532ac3355 * fix test
git-svn-id: trunk@42372 -
2019-07-12 22:05:58 +00:00
svenbarth
e060a43d70 * rename TAttributeData to the more appropriate TAttributeTable
git-svn-id: trunk@42371 -
2019-07-12 22:05:55 +00:00
svenbarth
38fad4b5cf * also check for invalid attribute data in tests
git-svn-id: trunk@42364 -
2019-07-12 22:05:25 +00:00
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
svenbarth
1607e15e48 * ensure that the toString constant is used instead of TObject's ToString method
git-svn-id: trunk@42352 -
2019-07-12 16:25:30 +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
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
fb387da807 * use variables of correct size with movd (test checks whether movd only
reads 32 bit even when destination is xmm register) (mantis #35701,
    as noted by J. Gareth Moreton)

git-svn-id: trunk@42268 -
2019-06-22 13:31:02 +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
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
Jonas Maebe
faf75095cd * synchronised with trunk till r42189
git-svn-id: branches/debug_eh@42190 -
2019-06-07 18:24:38 +00:00
pierre
471cb73c5f Add {$goto on} if FPC macro is defined
git-svn-id: trunk@42186 -
2019-06-07 07:55:40 +00:00
nickysn
914426e703 * fixed an i8086 inline assembler bug, where 'call word ptr [label]' (an
indirect call) was assembled as 'call near label' (direct call) instead of
  'call near [label]' and 'call dword ptr [label]' was assembled as
  'call near label' instead of 'call far [label]'

git-svn-id: trunk@42176 -
2019-06-05 15:49:39 +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
Jonas Maebe
a0e35fd1bc * synchronised with trunk till r42118
git-svn-id: branches/debug_eh@42119 -
2019-05-25 13:19:06 +00:00
Jonas Maebe
77658b925b * disable regular array -> dynamic array type coversion support unless
{$modeswitch arraytodynarray} is active (mantis #35576)
   o changed compiler to compile without this modeswitch
   o added the modeswitch to a test that depends on it

git-svn-id: trunk@42118 -
2019-05-25 12:31:32 +00:00
Jonas Maebe
0cd0e1614b * synchronised with trunk till r42105
git-svn-id: branches/debug_eh@42106 -
2019-05-19 19:24:25 +00:00
Jonas Maebe
23428dbf4c * replaced non-breaking space with space (patch by J. Gareth Moreton,
mantis #35602)

git-svn-id: trunk@42105 -
2019-05-19 19:20:51 +00:00
Jonas Maebe
15532e5277 * disabled low-level hack test for LLVM
git-svn-id: trunk@42102 -
2019-05-19 19:20:38 +00:00
Jonas Maebe
eb0f02348d * fixed loading parent frame pointer for nested procvars on targets that
that use explicit parentfp structs (fixes webtbs/tw17379 for llvm)

git-svn-id: trunk@42100 -
2019-05-19 19:20:29 +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
Jonas Maebe
6d597e1286 * synchronised with trunk till r42053
git-svn-id: branches/debug_eh@42054 -
2019-05-12 21:09:23 +00:00
Jonas Maebe
883d1f2a79 - removed test that shortstring is aligned to a multiple of pointer size,
as the compiler does not guarantee any such thing

git-svn-id: trunk@42053 -
2019-05-12 21:08:42 +00:00
Jonas Maebe
0227c55b53 - removed explicit linking of ptest.o, as that happens already automatically
due to the "uses ptest" and breaks LTO (then both ptest.o and ptest.bc
    get linked, resulting in duplicate symbols)

git-svn-id: trunk@42052 -
2019-05-12 21:08:39 +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
aa8a7f5130 Do not use BSD system tar option -I if TARPROG is gtar for OpenBSD
git-svn-id: trunk@42022 -
2019-05-08 09:38:43 +00:00
pierre
3f39fe75f3 Fix test_c_objects rule (by removal of extra closing braces)
git-svn-id: trunk@41983 -
2019-05-04 12:45:02 +00:00
pierre
b4baf9b49c Link against libstdc++ and libc to avoid linking error for openbsd OS
git-svn-id: trunk@41982 -
2019-05-04 12:41:46 +00:00
pierre
e7e96f98b2 Link against libc to avoid __guard_local not found symbol failure at link time for OpenBSD target
git-svn-id: trunk@41981 -
2019-05-04 12:38:23 +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
pierre
b365fdd478 Fix compilation of testsuite program
git-svn-id: trunk@41959 -
2019-04-29 09:09: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
128bf046b4 * regenerated Makefiles with LLVM bitcode installation support
git-svn-id: branches/debug_eh@41914 -
2019-04-20 18:56:45 +00:00
pierre
8ff0aaa369 Avoid arithmetic overflow inside heaptrc unit on this test
git-svn-id: trunk@41883 -
2019-04-16 15:10:40 +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
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
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
Jonas Maebe
bde560dac2 * also accept {$elsif} after {$if(n)def} (mantis #34858)
git-svn-id: trunk@41724 -
2019-03-17 15:20:22 +00:00
pierre
74fed2a4cd Regenerate Makefile's after fpcmake change in commit #41721
git-svn-id: trunk@41723 -
2019-03-17 14:45:03 +00:00
Jonas Maebe
d78dbd5d59 + test from mantis #35224 (already works)
git-svn-id: trunk@41718 -
2019-03-16 20:01:57 +00:00
Jonas Maebe
fd42c3fb01 * only enable tw35187 for Windows and Linux, since it uses syscalls under unix
(which are not supported on all unix targets; feel free to re-enable for
     specific unix targets if the test has been verified to compile there)
   o also fixed placement of dotest directives: they have to come before any
     part of the program code

git-svn-id: trunk@41717 -
2019-03-16 19:14:17 +00:00
Jonas Maebe
ed2ae508d0 * only add hidden parameters for objectdef methods after generating the vmt,
so that they take into account inherited calling conventions (mantis #35233)
   o don't needlessly calculate the paraloc info when generating a JVM mangled
     name

git-svn-id: trunk@41716 -
2019-03-16 19:14:14 +00:00
nickysn
a32e69bf72 * the i386-openbsd C and C++ test modules recompiled with -fPIC
git-svn-id: trunk@41688 -
2019-03-12 16:04:57 +00:00
nickysn
dd41651e36 * recompiled OpenBSD x86_64 C external modules with -fPIC
git-svn-id: trunk@41673 -
2019-03-10 18:18:47 +00:00
nickysn
0d7ee960cc * recompiled the OpenBSD x86_64 C and C++ .o test files; GCC version is the
same (so, no need to update readme.txt), but OpenBSD's default compile
  settings have changed (PIC is enabled by default)

git-svn-id: trunk@41672 -
2019-03-10 17:38:07 +00:00
florian
d657373933 * patch by J. Gareth Moreton which avoids that the optimizer causes reads of invalid memory, resolves #35187
git-svn-id: trunk@41667 -
2019-03-10 10:48:50 +00:00
Jonas Maebe
cb5b407e89 * fixed taarch64abi.pp so it doens't rely on undefined behaviour between the
end of an inline assembly block and the end of a routine

git-svn-id: trunk@41651 -
2019-03-09 16:11:34 +00:00
pierre
a7d45c0ca0 Commit patch submitted by J. Gareth Moreton in bug report 35180
git-svn-id: trunk@41589 -
2019-03-04 21:53:22 +00:00
svenbarth
9a9c6a3ff4 * fix for Mantis #35150: correctly convert Int64/QWord values to OleVariant (Delphi compatible)
+ added test

git-svn-id: trunk@41571 -
2019-03-03 14:50:09 +00:00
Jonas Maebe
aba3f8f162 * fixed over-eager rejection of tobjecttype.fieldname expression after r40785
(mantis #35149)

git-svn-id: trunk@41474 -
2019-02-25 21:17:24 +00:00
florian
38a7f7c975 * casing fixed
git-svn-id: trunk@41428 -
2019-02-24 09:54:05 +00:00
pierre
c1e93bd2c2 + compiler/symdef.pas: Add missing call to tderef.reset methods in all tdef constructors.
+ compiler/sysmsym.pas: Do the same for for all tsym constructors.
  + compiler/symtype.pas: Generate internalerror in  tcompilerppufile.putderef
    if a deref field has index -1, as this means that buildderef was not called
    while it should have been called.
  + compiler/symtable.pas: Fix bug report itself by adding an extra local variable
    CHANGED to add extra cycles in tstoredsymtable.buildderef_referenced method.

New tests for this bug report: tests/webtbs/tw35139.pp and  tests/webtbs/tw35139a.pp

git-svn-id: trunk@41425 -
2019-02-23 23:03:29 +00:00
pierre
1a564de6e6 Add testing of use of variable of class
git-svn-id: trunk@41417 -
2019-02-23 15:37:39 +00:00
joost
42204977f8 * Patch from Bart Broersma to fix writing unicode strings in the Windows
registry + test (modified, bug #35060)

git-svn-id: trunk@41415 -
2019-02-22 22:26:21 +00:00
yury
382d5060a0 * aarch64: According to ARM64 ABI, function's arguments and the result are not required to be sign/zero extended to a full register size. Obey this rule for all targets except iOS where sign/zero extension is required.
git-svn-id: trunk@41412 -
2019-02-22 17:59:54 +00:00
joost
cd03f5326d * Fixed bug #35060, proper unicode-handling of registry-keynames. With test
(modified) from Bart Broersma

git-svn-id: trunk@41325 -
2019-02-15 21:25:05 +00:00
svenbarth
7364cd59b5 * always enable threads on Unix-like targets
git-svn-id: trunk@41308 -
2019-02-11 20:33:29 +00:00
svenbarth
b810d8f32b * fix for Mantis #35027: ensure that the synchronize event entry is reset correctly in case of an exception
+ added test

git-svn-id: trunk@41281 -
2019-02-10 15:43:03 +00:00
svenbarth
1502a13e7c * fix for Mantis #35028: when the mainthread executes a queued ThreadMethod make sure that the queue entry is released even if an exception is raised
+ added test

git-svn-id: trunk@41280 -
2019-02-10 15:42:58 +00:00
svenbarth
b1ee29c836 * fix for Mantis #30205: (adjusted) patch by Do-wan Kim to only use the default calling convention for exception handlers
+ added test

git-svn-id: trunk@41277 -
2019-02-10 11:26:46 +00:00
nickysn
b0ca862f32 + implemented IntroSort (hybrid between QuickSort and HeapSort) in unit SortAlgs
git-svn-id: trunk@41258 -
2019-02-08 15:34:29 +00:00
nickysn
8b17af1f89 + added test for unit sortalgs, that tests the heapsort and randomized quicksort algorithms
git-svn-id: trunk@41247 -
2019-02-07 14:41:33 +00:00
nickysn
5c4af27a7a + added test for the sortbase unit
git-svn-id: trunk@41195 -
2019-02-03 19:16:48 +00:00
nickysn
2a0eb54fd5 + added a simple test that tests TList.Sort
git-svn-id: trunk@41181 -
2019-02-02 23:56:24 +00:00
Jonas Maebe
20c4992ac9 - removed data race test with mixed and writers, because the modifications
to the global variable in the read-locked sections could cause
    false positives regarding detecting whether nothing got changed
    during a write-locked section due to lack of read/write dependencies

git-svn-id: trunk@41165 -
2019-02-02 15:17:12 +00:00
Jonas Maebe
56fd8e1208 * fixed tinterlockedmt*.pp for architectures with weak memory consistency
models

git-svn-id: trunk@41164 -
2019-02-02 14:28:48 +00:00
Jonas Maebe
0db9ff5c39 * fixed packed bitsize calculation for types with a negative lower bound and
and upper bound just below the next power of two (mantis #34971)

git-svn-id: trunk@41161 -
2019-02-01 17:31:53 +00:00
florian
4f0da5fcc3 + patch by Marģers to support the x86 assembler instructions blsi, blsr, blsmsk, adcx, adox, movbe, pclmulqdq, resolves #34815 and #34799
+ avxopcodes tests also movbe and pclmulqdq

git-svn-id: trunk@40951 -
2019-01-20 18:50:12 +00:00
florian
8c66e9a2eb + support for 16 bit registers
git-svn-id: trunk@40950 -
2019-01-20 18:50:10 +00:00
florian
fc7ecf3206 * usage example for linux
git-svn-id: trunk@40949 -
2019-01-20 18:50:09 +00:00
florian
e24449bcfd * if sub nodes of a commutative node contain conditionally executed nodes, these sub nodes might not be swapped
as this might result in some nodes not being executed, like temp. create nodes with init. code, see e.g. issue #34653, resolves #34653

git-svn-id: trunk@40934 -
2019-01-20 12:55:20 +00:00
florian
925531b99c * constrained generics are also compatible with formaldefs, resolves #34893
git-svn-id: trunk@40921 -
2019-01-19 21:23:36 +00:00
florian
644c47e121 * when deciding about the case code generation in case of size optimization, the number of labels is relevant, not the covered range, resolves #34818
git-svn-id: trunk@40851 -
2019-01-13 10:32:00 +00:00
florian
dd072ce76b + seek for typefiles in iso mode, resolves #34848
git-svn-id: trunk@40850 -
2019-01-12 23:29:20 +00:00
pierre
193df0204a Add x86_64-haiku target to some Makefile's
git-svn-id: trunk@40820 -
2019-01-09 22:43:56 +00:00
Jonas Maebe
b2b34338e5 * give an error when trying to call an object instance method via a type node
(mantis #34821)

git-svn-id: trunk@40785 -
2019-01-06 15:21:36 +00:00
Károly Balogh
078d8e9d2a tarray15: the conditions added in r40779 should be or, instead of and (thanks Pierre)
git-svn-id: trunk@40784 -
2019-01-06 14:08:35 +00:00
Károly Balogh
cae98304f8 tarray15: no rodata support on a bunch of m68k platforms
git-svn-id: trunk@40779 -
2019-01-06 10:50:02 +00:00
Károly Balogh
59aef99f52 haiku-x86_64: regenerated all Makefiles
git-svn-id: trunk@40757 -
2019-01-04 03:17:19 +00:00
svenbarth
04bbfd1746 * fix for Mantis #27378: save and (more importantly) restore verbosity when switching a unit
+ added test

git-svn-id: trunk@40750 -
2019-01-03 20:31:34 +00:00
florian
22365a1f57 + test for #27543 which is fixed meanwhile
git-svn-id: trunk@40731 -
2019-01-01 16:16:54 +00:00
florian
1641585655 * updated bcase.pp benchmark by Gareth Moreton, now used also as test
git-svn-id: trunk@40710 -
2018-12-30 22:21:03 +00:00
svenbarth
dada756828 * also enable published for TObjA so that the test fails for the correct reason
git-svn-id: trunk@40704 -
2018-12-29 19:23:19 +00:00
Jonas Maebe
7b313a2c15 * stop searching for methods to implement interfaces in parent classes after
encountering a method with the correct name that does not have the
    "overload" directive (same logic as when looking for a call candidate,
    to avoid errors when using a Pascal-level wrapper to call interface
    methods, and Delphi-compatible since it always required "overload" for
    overloaded methods)
   o also catches calling convention mismatches like in webtbs/tw27349

git-svn-id: trunk@40683 -
2018-12-28 18:25:58 +00:00
florian
7f5c2fa3aa * (modified) patch by Gareth Moreton: Speed improvement in case blocks, resolves #0034762
This patch improves the compiler where "case" statements are concerned, using jump tables more often and creating more efficient machine code in some situations:
  * If a case block only contains one branch (not including the else block), the initial range check is removed, since this becomes wasted effort.
  * If the else block is empty, the else label is set to the end label - though this doesn't decrease the code size, it takes a bit of strain off the peephole optimizer.
  * On -O2 and above, some node analysis is now done on the branch labels. Most of the time this just redirects it to the end
    label for empty blocks, but if the block contains a goto statement, it will redirect it to its destination instead,
    thus increasing performance by not having multiple jumps (this won't get picked up by the peephole optimiser if the label addresses are in a jump table).
  * Some checks now use what I call the 'true count' rather than the 'label count'. The true count includes each
    individual value in a range - for example, 0..2 counts as 3. This increases the chance that a jump table will be
    utilised in situations where it is more efficient than a linear list.
  * For jump tables, if the case block almost covers the entire range (32 entries or fewer from full coverage),
    the initial range check is removed and the gaps included in the jump table (pointing to the else label).

git-svn-id: trunk@40676 -
2018-12-27 18:31:55 +00:00
svenbarth
0f83458513 * previous Invoke() related commit also correctly fixed Mantis #34509
git-svn-id: trunk@40670 -
2018-12-26 22:59:48 +00:00
svenbarth
93e0cd9e1a * fix for Mantis #34496: correctly align stack so that SSE operations work correctly
git-svn-id: trunk@40666 -
2018-12-26 22:59:36 +00:00
svenbarth
e28dff523a * with the change regarding property access lists this test is no longer considered correct
git-svn-id: trunk@40658 -
2018-12-26 11:26:08 +00:00
svenbarth
60adebfe28 * Mantis #34691 is fixed by previous change regarding property access list
git-svn-id: trunk@40657 -
2018-12-26 11:26:04 +00:00
svenbarth
539ed761ba * a property access list must only consist of record or object fields; classes are not allowed
git-svn-id: trunk@40656 -
2018-12-26 11:26:01 +00:00
Jonas Maebe
acfa2088ef + test for previous commit
git-svn-id: trunk@40646 -
2018-12-25 17:52:56 +00:00
Jonas Maebe
70cadc7694 * fixed string constant length when going from utf-8 to single-byte code page
(mantis #33666, patch by engkin)

git-svn-id: trunk@40637 -
2018-12-24 22:21:40 +00:00
pierre
430ec7bbe4 Try to ix compilation failures in units/fpcunit directory
git-svn-id: trunk@40601 -
2018-12-20 22:39:40 +00:00
pierre
e9e5b05caa Remove Unicode $180E (Mongolian Vowel Separator), as it is not anymore a whitespace character
git-svn-id: trunk@40600 -
2018-12-20 21:30:44 +00:00
Jonas Maebe
c6bb85eae9 * support for compiling the objects unit methods that expect local procedure/
function pointers using {$modeswitch nestedprocvars} functionality, activate
    this for LLVM and also activate that modeswitch for a test that uses this
   o also convert the IDE units to use this functionality
   o requires extra typecasts because implicit type conversions from
     procvar(p: psometype) to procvar(p: pointer) are not supported; on the
     plus side, even those type conversions are checked for validity
   o note: requires {$modeswitch nestedprocvars} in all programs/units
     that rely on this functionality

git-svn-id: trunk@40598 -
2018-12-20 21:22:40 +00:00
pierre
0846456ce4 * Skip all surrogate values in for loops from low(word) to high(word)
git-svn-id: trunk@40560 -
2018-12-15 21:06:01 +00:00
pierre
0fafe640c5 Change tstringlistexchange test code to give different error values and check that sort is done properly instead of requiring a given number of exchanges
git-svn-id: trunk@40547 -
2018-12-14 09:51:45 +00:00
pierre
bf7af550c8 Add mode objfpc to units/character/tutf32convert test
git-svn-id: trunk@40546 -
2018-12-14 09:32:01 +00:00
nickysn
99528f9774 + added all the missing test/units/* subdirectories: classes character dateutil fpcunit softfpu variants
git-svn-id: trunk@40538 -
2018-12-13 16:00:23 +00:00
pierre
f8563772c5 Always accept empty string as meaning zero is TryRomanToInt, fixes intermittent errors in tromantoint test
git-svn-id: trunk@40537 -
2018-12-13 10:21:58 +00:00