pierre
819752c334
Avoid warnings when -v0 is used by using $push/$pop
...
git-svn-id: trunk@41960 -
2019-04-29 14:19:16 +00:00
pierre
7b3e027dc8
Move update of fields counting allocated memory to after SysGetMem call
...
git-svn-id: trunk@41882 -
2019-04-16 15:05:13 +00:00
svenbarth
07b1a3d211
* adjust signature of variant managers olevarfromint so that 64-bit values can be passed as well (as was probably intended originally)
...
git-svn-id: trunk@41570 -
2019-03-03 14:50:05 +00:00
florian
74275a9173
* in ISO mode, f^ is undefined after Rewrite
...
git-svn-id: trunk@41429 -
2019-02-24 10:32:59 +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
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
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
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
nickysn
ea340b9481
* fixed bug in QuickSort_ItemList_CustomItemExchanger_Context and
...
QuickSort_ItemList_Context and which can cause wrong sort results, due to not
taking into account that the pivot can be moved by the swap operation
git-svn-id: trunk@41191 -
2019-02-03 16:34:05 +00:00
nickysn
c7d8bd9666
+ added a sort algorithm interface that accepts a custom callback function for
...
exchanging two elements. This is required for TStringList.Sort (and is the
most generic form for a sort algorithm interface that I can think of).
git-svn-id: trunk@41182 -
2019-02-03 00:33:43 +00:00
nickysn
59a75ea429
* use Inc() and Dec() instead of v:=v+1
...
git-svn-id: trunk@41178 -
2019-02-02 22:58:52 +00:00
nickysn
4082b8c7fc
+ added and implemented QuickSort_ItemList_Context
...
git-svn-id: trunk@41175 -
2019-02-02 21:21:07 +00:00
nickysn
7f44f2535e
* the Compare parameter renamed Comparer for consistency
...
git-svn-id: trunk@41174 -
2019-02-02 21:08:30 +00:00
nickysn
8cf5779297
* the first parameter of QuickSort_PtrList_NoContext renamed ItemPtrs for
...
consistency with the other similar procedures
git-svn-id: trunk@41173 -
2019-02-02 21:07:27 +00:00
nickysn
a2a0ed53b2
* the type of the ItemCount parameter changed from PtrUInt to SizeUInt
...
git-svn-id: trunk@41172 -
2019-02-02 21:05:02 +00:00
nickysn
848890e54b
+ added the TItemListSorter_NoContext and TItemListSorter_Context procedure
...
types to sortbase. No implementation for them yet. They will allow sorting
an array with elements of arbitrary size (e.g. array of records).
git-svn-id: trunk@41171 -
2019-02-02 21:03:10 +00:00
nickysn
25f6da7066
* added PtrList to the names of the current sort algorithm callback functions and
...
types, to indicate they sort a list of pointers
git-svn-id: trunk@41170 -
2019-02-02 20:56:59 +00:00
nickysn
248fd313f8
+ introduced unit SortBase, which implements the foundation for pluggable
...
sorting algorithms. A default QuickSort implementation is provided by the
unit. Other units can be added, to provide other sorting algorithms (e.g.
HeapSort, MergeSort, IntroSort, etc.)
* TList and TFPList updated to use the current default sorting algorithm defined
in SortBase for their .Sort method.
git-svn-id: trunk@41167 -
2019-02-02 20:06:50 +00:00
Károly Balogh
7bc03f2590
reverted accidental commit to text.inc
...
git-svn-id: trunk@41089 -
2019-01-28 04:18:50 +00:00
Károly Balogh
c85f7cfc26
aros/amigaos4: enabled ELF32/64 and GetModuleAddr() in exeinfo, based on the MorphOS versionexeinfo.pp
...
git-svn-id: trunk@41088 -
2019-01-28 04:16:44 +00:00
michael
f3cb1b12ce
* Insert and Delete are compiler internals now, need fake definitions
...
git-svn-id: trunk@40932 -
2019-01-20 12:52:17 +00:00
michael
e69f4c1e4b
* Fix bug ID #19842 using patch from Bart Broersma
...
git-svn-id: trunk@40908 -
2019-01-19 16:35:30 +00:00
Károly Balogh
56f0a71466
heaptrc: empty the array for the call trace, otherwise the trace dump code will just dump the rest of the array as well, on systems where the heap is not initialized to zero, or if the memory area has been re-used
...
git-svn-id: trunk@40856 -
2019-01-13 16:23:18 +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
Károly Balogh
b2dafed7c5
haiku: drop the old OpenElf32Beos function, and have a platform specific GetModuleByAddr, this fixes lineinfo on stacktraces (both i386-stabs and x86_64-dwarf2)
...
git-svn-id: trunk@40845 -
2019-01-11 19:51:13 +00:00
pierre
3a52fdf997
Add FPC_SYSTEM_EXIT_NO_RETURN macro for embedded target
...
git-svn-id: trunk@40801 -
2019-01-07 21:41:18 +00:00
Jonas Maebe
4f72edcdd5
+ LLVM support for the FMA intrinsics
...
git-svn-id: trunk@40604 -
2018-12-21 20:57:19 +00:00
Jonas Maebe
2330164ee2
+ internal sqrt support for LLVM (faster on all platforms, necessary on
...
platforms that don't have RTL support for it, as the the generic
fpc_sqrt_real just calls runerror)
git-svn-id: trunk@40575 -
2018-12-16 20:44:41 +00:00
Jonas Maebe
14f3676b2a
+ llvm_lifetime_start/llvm_lifetime_end intrinsic declarations
...
git-svn-id: trunk@40500 -
2018-12-08 15:31:45 +00:00
Jonas Maebe
122d0d36d6
+ volatile() expression that marks an expression as volatile
...
* disable matching volatile references in the assembler optimisers, so they
can't be removed (more conservative than needed, but better than removing
too many)
o the CSE optimiser will ignore them by default, because they're an unknown
inline node for it
* also removed no longer used fpc_in_move_x and fpc_in_fillchar_x inline node
identifiers from rtl/inc/innr.inc, and placed fpc_in_unaligned_x at the
right place
git-svn-id: trunk@40465 -
2018-12-04 19:53:20 +00:00
florian
90557f2e62
* properly calcualte aligncount as proposed by Jeppe, should resolve #33323
...
git-svn-id: trunk@40449 -
2018-12-02 14:49:24 +00:00
florian
72416edcc4
+ support for tlsm_general on i386-linux
...
git-svn-id: trunk@40281 -
2018-11-11 17:32:20 +00:00
florian
9c041afc7c
* disable generic threadvar handling if section thread vars are available
...
git-svn-id: trunk@40270 -
2018-11-07 22:03:01 +00:00
yury
a19528efa1
* Fixed warnings.
...
git-svn-id: trunk@40188 -
2018-11-02 19:22:46 +00:00
yury
a077e0dd90
* Fixed comparison.
...
git-svn-id: trunk@40186 -
2018-11-02 19:04:26 +00:00
michael
3b1622f10a
* Add GetTypeKind
...
git-svn-id: trunk@40060 -
2018-10-28 10:47:57 +00:00
florian
33463c8698
* moved align helper so it actually gets inlined
...
git-svn-id: trunk@40011 -
2018-10-21 20:50:21 +00:00
Jonas Maebe
fbfc98a600
* changed definitino of Objective-C BOOL type to Boolean8 where
...
appropriate
* changed all Boolean types in the Cocoa headers to BOOL (rest of
mantis #34411 )
git-svn-id: trunk@39950 -
2018-10-16 21:14:26 +00:00
Jonas Maebe
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
yury
19fa828466
* android: Use the current dir as temp.
...
git-svn-id: trunk@39869 -
2018-10-06 15:20:20 +00:00
Tomas Hajny
62b57e81cd
* FExpand / ExpandFileName behaviour updated according to discussion in bug #34166
...
git-svn-id: trunk@39840 -
2018-09-28 22:57:57 +00:00
svenbarth
cc354f9d72
* have the fpc_*_copy compiler intrinsics reference the intrinsic symbol they belong to
...
git-svn-id: trunk@39816 -
2018-09-26 21:33:46 +00:00
florian
a34d4e715c
Merged riscv_new branch
...
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
Jeppe Johansen
74a7963d58
Redo overflow checking code.
...
Fix shift operators in case of unsigned subreg operations. There should be no sign extension here.
Add some unittest implementations that test stack execution and writing to readonly constants.
git-svn-id: branches/laksen/riscv_new@39762 -
2018-09-16 18:37:59 +00:00