Mattias Gaertner
67dd6b5bf3
fcl-passrc: resolver: option to allow class property with non static getter/setter
...
git-svn-id: trunk@41255 -
2019-02-08 13:07:02 +00:00
marco
6ec527df23
* add IDANI_CAPTION, mantis #35042
...
git-svn-id: trunk@41254 -
2019-02-08 10:25:30 +00:00
marco
76bb5d1a22
* add loadlibraryex flags, mantis #35041
...
git-svn-id: trunk@41253 -
2019-02-08 10:18:52 +00:00
Mattias Gaertner
15ec036a69
pastojs: helper: default array property
...
git-svn-id: trunk@41252 -
2019-02-08 10:10:30 +00:00
Mattias Gaertner
9a06e90b47
pastojs: helper: array property
...
git-svn-id: trunk@41251 -
2019-02-08 09:15:28 +00:00
nickysn
ff90e7622a
+ added .Sort overloads, that specify an algorithm and use the sortbase defined
...
algorithms for sorting TList, TFPList and TStringList when FPC_TESTGENERICS is
defined as well. Unfortunately, I couldn't test it, because the RTL doesn't
compile with FPC_TESTGENERICS, due to errors, completely unrelated to the
sortbase changes.
git-svn-id: trunk@41248 -
2019-02-07 15:45:13 +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
Mattias Gaertner
46462a01ed
pastojs: property getter/setter in helper
...
git-svn-id: trunk@41246 -
2019-02-07 12:29:28 +00:00
pierre
4d8dcfc42e
Fix compilation on targets without Random: add $ifdef FPC_HAS_FEATURE_RANDOM
...
git-svn-id: trunk@41245 -
2019-02-07 10:46:41 +00:00
Mattias Gaertner
fce57c5528
pastojs: helper inherited
...
git-svn-id: trunk@41244 -
2019-02-06 22:10:33 +00:00
Jonas Maebe
3b87b10904
* explicitly link libobjc to prevent the symbol __objc_empty_cache from
...
resolving to CoreFoundation on macOS 10.14 (which will break running
such programs on older macOS/(Mac) OS X versions)
git-svn-id: trunk@41243 -
2019-02-06 19:48:47 +00:00
nickysn
1c64f4c751
* some formatting changes to avoid very large lines in the source code
...
git-svn-id: trunk@41242 -
2019-02-06 18:26:05 +00:00
nickysn
00a67caa40
* select the middle element in the default quicksort implementation in a way
...
that doesn't generate arithmetic overflow for very large arrays
git-svn-id: trunk@41241 -
2019-02-06 18:05:48 +00:00
pierre
e467d2387d
Add sortbase unit to global units list, as it can be compiled for all CPUs
...
git-svn-id: trunk@41240 -
2019-02-06 15:51:54 +00:00
Mattias Gaertner
3e7c53a3bb
pastojs: class helper: constructor
...
git-svn-id: trunk@41239 -
2019-02-06 15:20:59 +00:00
Mattias Gaertner
c657042f0f
fcl-passrc: adv record: allow static only for class procedure/function
...
git-svn-id: trunk@41238 -
2019-02-06 15:20:35 +00:00
nickysn
52b4fc039c
+ added randomized quicksort to unit sortalgs
...
git-svn-id: trunk@41237 -
2019-02-06 14:20:40 +00:00
nickysn
f4718831ca
* fixed quicksort comment about memory use - our implementation uses O(log n) stack, not O(n log n)
...
git-svn-id: trunk@41236 -
2019-02-06 12:22:08 +00:00
Mattias Gaertner
4d8ae767f7
pastojs: proc ref of helper method
...
git-svn-id: trunk@41235 -
2019-02-06 10:16:03 +00:00
Mattias Gaertner
75bf1e4291
fcl-passrc: resolver: added GetSelfScope
...
git-svn-id: trunk@41234 -
2019-02-06 10:15:31 +00:00
nickysn
c728a1204a
+ added additional notes in the comments for HeapSort
...
git-svn-id: trunk@41233 -
2019-02-05 18:25:27 +00:00
nickysn
f32748a8e7
+ added comment with information about QuickSort and its specific implementation in unit SortBase
...
git-svn-id: trunk@41232 -
2019-02-05 18:02:48 +00:00
nickysn
eca60a0a89
* partition elements equal to the pivot on both sides of the pivot, since that
...
leads to much better performance when sorting lots of repeating elements
git-svn-id: trunk@41231 -
2019-02-05 17:32:28 +00:00
nickysn
bea9961d2d
* use SizeUInt instead of longint for the array indices in the quicksort
...
implementations. This:
1) allows sorting arrays with >4G elements on 64-bit systems
2) allows sorting arrays with up to 4G (>2G) elements on 32-bit systems
3) uses 16-bit instead of the less efficient 32-bit indices on 16-bit and
8-bit platforms
git-svn-id: trunk@41230 -
2019-02-05 16:20:56 +00:00
nickysn
f5f25f7ae6
* use a more robust QuickSort implementation, that is guaranteed to never loop
...
forever and never access index out of bounds elements from the array when
being passed an incorrect comparison function. The resulting sort order is
still undefined in this case, though.
git-svn-id: trunk@41229 -
2019-02-05 16:00:42 +00:00
nickysn
de80621e1e
* use a try..finally block to protect against memory leaks if the comparison
...
callback function raises an exception in QuickSort_ItemList_Context
git-svn-id: trunk@41228 -
2019-02-05 12:14:09 +00:00
joost
e5492d8992
* Fixed version-number without build-number, bug #29055
...
git-svn-id: trunk@41226 -
2019-02-04 21:36:36 +00:00
Mattias Gaertner
9a878f99db
fcl-passrc: fixed parsing (expr).name()
...
git-svn-id: trunk@41225 -
2019-02-04 16:49:07 +00:00
Mattias Gaertner
bf1af93938
pastojs: typecast string(unicodestring), unicodestring(string)
...
git-svn-id: trunk@41224 -
2019-02-04 16:02:42 +00:00
Mattias Gaertner
cfe65c8cd8
fcl-passrc: resolver: typecast string(unicodestring), unicodestring(string)
...
git-svn-id: trunk@41223 -
2019-02-04 16:02:28 +00:00
nickysn
26486bbaea
+ keep track of the pivot index in all quicksort implementations. No functional changes,
...
but will be used to prevent overlap in the divided subregions and also infinite loops
in case of an incorrect compare function.
git-svn-id: trunk@41222 -
2019-02-04 15:32:41 +00:00
Mattias Gaertner
b47c58dddc
fcl-passrc: fixed case of widechar
...
git-svn-id: trunk@41221 -
2019-02-04 15:08:50 +00:00
pierre
15fc7b3510
Programs can also have import libraries
...
git-svn-id: trunk@41220 -
2019-02-04 15:02:42 +00:00
nickysn
ec45f0069a
+ added unit SortAlgs to rtl-extra. It implements extra sorting algorithms
...
that can be used in place of the default QuickSort implementation from unit
SortBase. Currently, only HeapSort is implemented, but others will be added
in the future.
git-svn-id: trunk@41219 -
2019-02-04 14:34:13 +00:00
Mattias Gaertner
57ece7b0f5
fcl-passrc: fixed set literal of widechar, issue #35001
...
git-svn-id: trunk@41218 -
2019-02-04 12:34:25 +00:00
Jonas Maebe
13ce27cc1d
* fixed the default external assembler for llvm when using -s
...
git-svn-id: trunk@41207 -
2019-02-03 21:01:13 +00:00
Jonas Maebe
1abea6451c
* fixed thlcgobj.g_rangecheck() for cpuhighleveltarget when targetting a
...
cpu32bitalu
git-svn-id: trunk@41206 -
2019-02-03 21:01:08 +00:00
Jonas Maebe
7af95cbf06
* LLVM does not support 128 bits arithmetic on 32 bit platforms, which we
...
need for overflow checking -> use RTL built-ins
git-svn-id: trunk@41205 -
2019-02-03 21:01:02 +00:00
Jonas Maebe
353be907c7
* update the stack alignment field of parameters when doing so for paralocs
...
git-svn-id: trunk@41204 -
2019-02-03 21:00:57 +00:00
Jonas Maebe
7a65e1f393
* fixed ARM paraloc defs (for LLVM)
...
git-svn-id: trunk@41203 -
2019-02-03 21:00:51 +00:00
Jonas Maebe
da0deae9ae
* removed unnecessary replacements of the paraloc def with arraydefs on ARM
...
git-svn-id: trunk@41202 -
2019-02-03 21:00:46 +00:00
Jonas Maebe
8c362eac67
* always emit UAL when using LLVM (clang does not and will not support
...
pre-UAL)
git-svn-id: trunk@41201 -
2019-02-03 21:00:41 +00:00
Jonas Maebe
ab51e8637c
* set default Mac OS X target version to 10.6 for LLVM (earlier versions did
...
not include libunwind in libSystem, causing linking errors when compiling
on later versions)
git-svn-id: trunk@41200 -
2019-02-03 21:00:36 +00:00
Jonas Maebe
f9668f8c03
* let de LLVM parameter manager merge multiple paralocs used to represent a
...
single ordinal, as such splitting is handled by LLVM itself (and handling
such split locations is currently not supported by our LLVM code generator)
git-svn-id: trunk@41199 -
2019-02-03 21:00:28 +00:00
Jonas Maebe
503ea604f3
+ nolinline modifier to specify that a routine must never be inlined
...
git-svn-id: trunk@41198 -
2019-02-03 21:00:17 +00:00
joost
5341f6fc7a
* Fixed the user-repository path on Windows
...
git-svn-id: trunk@41197 -
2019-02-03 20:08:21 +00:00
nickysn
1d7ff66602
+ added .Sort() overloads with a SortingAlgorithm parameter to TFPGList,
...
TFPGObjectList, TFPGInterfacedObjectList and TFPSMap
git-svn-id: trunk@41196 -
2019-02-03 19:49:35 +00:00
nickysn
5c4af27a7a
+ added test for the sortbase unit
...
git-svn-id: trunk@41195 -
2019-02-03 19:16:48 +00:00
nickysn
d86da19570
* use the sort algorithm from sortbase for TStringList
...
git-svn-id: trunk@41194 -
2019-02-03 17:00:21 +00:00
Mattias Gaertner
d9954e410e
pastojs: fixed case char of widechar_literal, issue #34993
...
git-svn-id: trunk@41192 -
2019-02-03 16:49:00 +00:00