Commit Graph

157 Commits

Author SHA1 Message Date
Michaël Van Canneyt
e1a34d3410 * Copy function for array helper 2024-07-05 15:56:11 +02:00
Michaël Van Canneyt
fc29d5ca7d * More routines need to display missing key name 2024-05-15 08:22:15 +02:00
Michaël Van Canneyt
259af2d252 * When raising error, display missing key value as string, if possible 2024-05-14 08:59:00 +02:00
Michaël Van Canneyt
f89cd88ce2 * Add TList<T>RemoveItem, for delphi compatibility 2024-05-13 14:28:22 +02:00
florian
e107aa5b5e * patch by foxpas to disable use of crc32 instructions on x86_64-darwin as they apparently don't work, resolves #40344 2024-02-29 22:03:21 +01:00
Michaël Van Canneyt
97495e93b8 * Delphi compatible TCollection.Sort() using helper 2024-02-21 10:31:29 +01:00
Michaël Van Canneyt
dfa22fb53a * Add function reference version of TComparer.Construct 2024-02-20 16:12:14 +01:00
Michaël Van Canneyt
4f1329fb14 * added cnDeleting, cnExtracting,cnAdding to TCollectionNotification for Delphi compatibility 2024-02-16 17:54:35 +01:00
Michaël Van Canneyt
b07818e51b * Add TList.ExtractAt for delphi compatibility 2024-02-16 17:47:02 +01:00
Michaël Van Canneyt
59d0af7f65 * Added Delegatedcomparer for Delphi compatibility 2024-02-16 16:13:19 +01:00
Michaël Van Canneyt
2e9a846543 * The order of calling class constructors is not guaranteed.
But LookupExtendedEqualityComparer is called during class constructor of another class.
  So it needs to init tables, or it returns a nil result.
  This results in a crash when the comparer is used because FEqualitycomparer is nil.
2024-02-15 18:18:53 +01:00
Michaël Van Canneyt
aa4136ce52 * Add TList<T>.list property for Delphi compatibility. Fixes #40642 2024-02-15 12:22:45 +01:00
florian
b431d6203c * patch by Olivier Guichard to fix lpi files, resolves #40617 2024-02-01 22:28:37 +01:00
Karoly Balogh
ac0287b5e0 human68k: fpmake changes, disable everything that cannot be built currently 2023-11-30 23:43:27 +00:00
Michaël Van Canneyt
d8e4544fbe * Delphi compatible hash again compatible 2023-11-29 20:27:36 +01:00
Michaël Van Canneyt
45cb7d1eff * Make dictionary constructor behave as Delphi does in absence of comparer 2023-11-22 16:29:33 +01:00
Michael VAN CANNEYT
ff7eb29706 * Dotted filenames for package fcl-db 2023-07-27 19:04:15 +02:00
Michaël Van Canneyt
a1e7a0ba09 * Dotted filenames for package rtl-generics 2023-07-27 19:04:14 +02:00
Michael VAN CANNEYT
bd4e9676fa * Add namespaces.lst 2023-07-27 19:04:09 +02:00
Michaël Van Canneyt
2289c1f6a2 * Remove redundant Makefile.fpc 2023-07-25 13:01:55 +02:00
Michaël Van Canneyt
bb1b1bc705 * Regenerate makefiles with subtarget support 2023-07-24 16:32:02 +02:00
Michaël Van Canneyt
6b5a4dbf6e * use cthreads in correct location 2023-07-19 14:27:28 +02:00
Michaël Van Canneyt
b1a86854d6 * PChar -> PAnsiChar 2023-07-15 18:22:40 +02:00
Michaël Van Canneyt
e32418a189 * Allow compilation using webassembly 2023-07-11 10:36:08 +02:00
Michaël Van Canneyt
e4ded6e277 * Webassembly also has reversed clean - most likely 32/64 bits issue, not delphi/FPC issue 2023-07-11 10:35:15 +02:00
Michaël Van Canneyt
e6c7efe057 * Set better defaults 2023-07-11 10:35:15 +02:00
Michaël Van Canneyt
c9c2a1d30d * Enable compilation for webassembly 2023-07-11 10:35:09 +02:00
Sven/Sarah Barth
d5c1533377 * fix #40331: for enumeration with holes (that don't have type information) use the binary comparers
+ added test
2023-06-30 16:30:46 +02:00
Sven/Sarah Barth
82857174cc * move check for whether to use binary comparer functionality to a static function of TComparerService 2023-06-30 16:27:13 +02:00
Sven/Sarah Barth
574d07041e * ensure that the ATypeInfo parameter is valid before checking it 2023-06-30 16:26:16 +02:00
Rika Ichinose
c88751a610 Re-enable QSort killer O(N²) detection, make it deterministic and instant, and make the killer itself universal. 2023-04-19 18:23:14 +00:00
Sven/Sarah Barth
db66d8f057 * ensure that _LookupVtableInfoEx isn't called with a type that needs special handling as we can't (or won't) really cover that using some generic RTTI handling 2023-03-28 23:14:42 +02:00
Sven/Sarah Barth
939f7345ac * essentially undo 4823ca7114 as comparers that need now use a suitable class implementation directly 2023-03-28 23:14:42 +02:00
Sven/Sarah Barth
073a6e91e6 * use the explicit implementations of the I*Comparer<> interfaces for types like records and objects; fixes #40074 and #40077 on systems using the Sys V ABI 2023-03-28 23:14:42 +02:00
Sven/Sarah Barth
2a8665ef94 + introduce explicit implementations for the IComparer<>, IEqualityComparer<> and IExtendedEqualityComparer<> interfaces for types that should be compared using binary comparison (e.g. records, objects, etc) 2023-03-28 23:14:42 +02:00
Dmytro Bogatskyy
327aac7f24 Add aarch64-iphonesim target 2023-03-27 18:45:00 +00:00
Sven/Sarah Barth
4823ca7114 * fix #40074: adjust Generics.Defaults to make use of the new ConstParamIsRef<> utility function to correctly determine how a generic binary parameter needs to be compared 2023-03-06 23:24:36 +01:00
Sven/Sarah Barth
b0e9b9d705 * don't use size specific binary comparers 2023-03-06 23:24:36 +01:00
Jinyang He
783bbb66f9 Update Makefiles 2023-02-05 19:18:48 +00:00
Jinyang He
7cde8df8c7 Add loongarch64 packages support 2023-02-05 19:18:48 +00:00
Sven/Sarah Barth
693491048b * change constref parameters to const for Delphi compatibility as well as better code generation 2022-12-23 15:12:32 +01:00
Sven/Sarah Barth
43f4904d74 Revert commit 663ee7bc20 as it's simply not allowed to set an object instance value twice no matter if it's the same object instance or not. 2022-12-23 14:56:56 +01:00
florian
e1bbcf7050 * patch by ab: Optimized default hash asm in generics.hashes, resolves #40035
* generic.hashes now uses the cpu unit to detect crc32 cpu support
2022-12-14 21:57:14 +01:00
J. Gareth "Curious Kit" Moreton
663ee7bc20 * Fix to TObjectOpenAddressingLP in generics.collections where SetValue
would free the object if the current value is the same as the new value
    (fixes #40024)
2022-12-09 01:43:37 +00:00
florian
aff133cac2 * disable timing check as it causes too much false negatives on machines under load 2022-12-01 22:56:42 +01:00
florian
74bef61b99 * try to improve result stability by longer runtime 2022-11-25 23:11:11 +01:00
florian
0a9e1ede72 * improve test for Generics.Collections.TArrayHelper.QSort, resolves #39932 2022-10-01 15:37:52 +02:00
florian
51a3030b6a + test for heapsort fallback to Generics.Collections.TArrayHelper.Sort 2022-10-01 12:11:30 +02:00
Rika Ichinose
3fff2aca6d Add heapsort fallback to Generics.Collections.TArrayHelper.Sort. 2022-10-01 09:34:28 +00:00
marcoonthegit
4710281936 * guard agains empty arrays in a few tArrayHelper binsearch methods
fixes bug #39761
2022-06-05 18:03:28 +02:00