Commit Graph

2705 Commits

Author SHA1 Message Date
Sven/Sarah Barth
5e53c7fd04 + add test that checks that the Atomic*-intrinsics work correctly inside generics 2024-12-13 22:57:25 +01:00
Sven/Sarah Barth
311c023271 * ensure that any Boolean type can be used for the Succeeded parameter and that there are no unitialized warnings
+ added test
2024-12-13 22:57:25 +01:00
florian
0265d5d0c9 * test might not be precise enough with fastmath 2024-12-13 22:42:19 +01:00
Sven/Sarah Barth
76a15dbd6c + add tests for atomic intrinsics 2024-12-12 22:05:15 +01:00
Frederic Kehrein
05b73f1523 Postponing building of VMT until inheritance chain is specialized
This commit does 3 changes:
1. Introduce new option `oo_inherits_not_specialized` indicating if
   somewhere in the inheritance chain of an object there is a non
   specialized generic parameter
2. Avoid building the VMT for an object which has a generic parameter in
   the inheritance chain (fixes #40983)
3. When no vmt is build `insert_struct_hidden_paras` usually called as
   part of `build_vmt` will be called seperately to add missing
   parameters
2024-12-08 17:54:50 +00:00
florian
e471c08cf8 + SHA512Support 2024-12-07 11:10:34 +01:00
Pierre Muller
3a481d9590 Add explicit -CE option and check that mysqrt returns zero for negative arg 2024-12-03 12:45:53 +00:00
Pierre Muller
564d50ce8e Check that a normal real division does not generate an exception 2024-12-03 12:09:05 +01:00
Michaël Van Canneyt
e1e301dea8 * Add missing methods to thunk class for parent interfaces without RTTI 2024-11-25 11:32:36 +01:00
florian
c48d8e9708 * write additional info for the tests, might help to identify spurious failures 2024-11-17 14:21:12 +01:00
Sven/Sarah Barth
6ec8441744 * test that SysUtils.Swap<>() doesn't hide System.Swap() 2024-11-17 10:15:44 +01:00
Frederic Kehrein
64c27a86a8 * Adding new generic Extract and Swap function to RTL
These allow to move data from one variable to another without triggering
the copy operation. Extract makes use of the newly introduced move
semantic for function results and Swap uses System.Move to not trigger
the copy mechanism.
2024-11-16 22:08:06 +00:00
Frederic Kehrein
ca92c49f8c * Avoid calling copy operator when moving data from temporary objects
When a function returns a managed record, a new temporary object is
created for the result, which is then copied to the real destination.
For managed records with a deep copy implementation, this can create
immense overhead. So instead this introduces a move, which basically
consists of
```pascal
procedure Move(var src, dst);
begin
  Finalize(dst); // Finalize existing data
  Move(src,dst,sizeof(dst)); // Shallow copy
  Initialize(src); // Clear source
```

* nld.pas: use MOVE when assigning the function result from the
  temporary return object
* rtl/inc/systemh.pas: Adding new macro to mark new RTTI version with MOVE
  operation
* rtl/inc/compproc.inc, rtl/inc/rtti.inc: Adding new move mechanism when
  indicated by the compiler.
2024-11-16 22:08:06 +00:00
Frederic Kehrein
4b92df28cf Adding static properties to extended RTTI 2024-11-15 12:47:41 +00:00
florian
092ff254f1 + AtomicIncrement/Decrement overloads
* tests extended
2024-11-10 14:56:10 +01:00
florian
fe6dd84d01 + new tests 2024-11-09 09:51:59 +01:00
Frederic Kehrein
6618c0dbf7 Fixing a bug where an empty postfix for enum was allowed 2024-11-07 21:09:37 +00:00
Frederic Kehrein
1778fb6fe3 Implementing TImplementedInterface.getcopy to allow copying of interfaced objectcs
It's probably not fully correct(see comment about procdef copy) but
seems good enough ¯\_(ツ)_/¯
2024-11-03 14:08:45 +00:00
Sven/Sarah Barth
782b707763 * clarify purpose of texrtti18 and texrtti19 2024-11-01 15:31:20 +01:00
Sven/Sarah Barth
823b376a9d * texrtti18.pp is no longer relevant due to 59a1199110 which adds support for array properties in Extended RTTI, so move the new texrtti20.pp over to texrtti18.pp 2024-11-01 15:30:18 +01:00
florian
99a9cfbc71 + additional test 2024-11-01 10:52:35 +01:00
florian
63734fb792 * unnecessary directives removed 2024-10-31 22:35:04 +01:00
Frederic Kehrein
59a1199110 Adding support for indexed properties in extended RTTI 2024-10-31 14:51:00 +00:00
florian
397293f09f + more fixes to mark symbols used by preprocessor expressions properly
+ made MarkSymbolAsUsed more fail safe
  + tests
2024-10-20 17:28:20 +02:00
Rika Ichinose
d63b6294b5 Compile “length(string or array) = 0” as “pointer(string or array) = nil” without further check, unless really required.
Also handle length <> 0, > 0, < 0, >= 0, <= 0, assuming lengths are never negative.
2024-10-16 16:53:59 +03:00
Frederic Kehrein
a188322e76 Fixing bug where in const init no typecheck for symbol was performed 2024-10-09 19:48:53 +00:00
Michaël Van Canneyt
736edf6422 * Better testlocation 2024-10-02 07:36:17 +02:00
Frederic Kehrein
dcabb0151f Adding fpsockets unit to fcl-net 2024-10-02 07:36:17 +02:00
Frederic Kehrein
23dd7a5173 Adding TNullPtr to types
Additional changes:
* Now using TNullPtr instead of custom type in TNullable
* Adding assignment of variants with TNulPtr to avoid name conflicts
* Adding comparison to TNullPtr (Pointers, TObjects, TNullable)
2024-10-02 05:30:09 +00:00
Frederic Kehrein
6ff63107a6 Adding pointer access to nullable 2024-10-01 13:18:39 +00:00
Frederic Kehrein
d3b14eb1ba Adding tuple unit 2024-09-29 12:49:57 +02:00
Frederic Kehrein
b5a0c3b1b6 Adding some convinience functions to TNullable 2024-09-28 13:05:08 +00:00
Rika Ichinose
fc1050a834 Make use of CPUX86_HINT_BSX_DEST_UNCHANGED_ON_ZF_1 in Bsf*/Bsr*. 2024-09-22 08:33:44 +00:00
florian
8b48127b2c * as shared libraries without glibc on linux currently don't work, link those tests
on current fpc versions and linux always against glibc, so the shared library handling is tested
2024-09-19 22:57:45 +02:00
florian
5c91c89aea * avr: take advantage of sbiw in mod/div_word
+ test
2024-09-11 22:40:10 +02:00
florian
d43d581507 * fix test for non-x86 platforms 2024-09-01 21:19:25 +01:00
Nikolay Nikolov
d561390687 + increase WebAssembly max memory limit for test tmt1.pp, because the test runs
out of memory with the default memory limit of 256 MiB
2024-08-24 13:12:08 +03:00
Nikolay Nikolov
1e630e8a17 + increase WebAssembly max memory limit for test theapthread.pp, because the
test runs out of memory with the default memory limit of 256 MiB
2024-08-22 20:08:35 +03:00
Nikolay Nikolov
e48fdc5b0f + added WebAssembly inline asm tests for:
i32.clz
  i64.clz
  i32.ctz
  i64.ctz
  i32.popcnt
  i64.popcnt
2024-07-28 19:32:36 +03:00
Nikolay Nikolov
c1d6cad444 + added WebAssembly inline asm tests for:
i32.rotl
  i64.rotl
  i32.rotr
  i64.rotr
2024-07-28 19:24:02 +03:00
Nikolay Nikolov
5043bdaf18 + added WebAssembly inline asm tests for:
i32.shr_s
  i64.shr_s
2024-07-28 19:17:28 +03:00
Nikolay Nikolov
536b85021d + added WebAssembly inline asm tests for:
i32.shr_u
  i64.shr_u
2024-07-28 19:12:12 +03:00
Nikolay Nikolov
a1e4d5a517 + added WebAssembly inline asm test for:
i32.shl
  i64.shl
2024-07-28 19:06:20 +03:00
Nikolay Nikolov
3967814081 + added WebAssembly inline asm test for:
i32.and
  i64.and
  i32.or
  i64.or
  i32.xor
  i64.xor
2024-07-28 18:58:31 +03:00
Nikolay Nikolov
28a849a293 + added WebAssembly inline asm test for:
i32.rem_s
  i64.rem_s
  i32.rem_u
  i64.rem_u
2024-07-28 18:46:48 +03:00
Nikolay Nikolov
3ad7a0e716 + added WebAssembly inline asm tests for the instructions:
i32.div_s
  i64.div_s
  i32.div_u
  i64.div_u
2024-07-28 18:38:32 +03:00
florian
124480e73a * spelling fixed 2024-07-27 19:51:37 +02:00
Michaël Van Canneyt
429d04089e * Wrong file copied 2024-07-27 13:21:24 +02:00
Michaël Van Canneyt
87137a4aaa * Do not include class and array properties in RTTI 2024-07-27 08:21:44 +02:00
Nikolay Nikolov
50c1eb4089 + added WebAssembly inline asm test for the instructions:
i32.mul
    i64.mul
    f32.mul
    f64.mul
2024-07-21 15:23:20 +03:00