Commit Graph

3388 Commits

Author SHA1 Message Date
florian
0657ce7c02 * get rid of fpc_Resume
git-svn-id: branches/debug_eh@41476 -
2019-02-25 21:43:56 +00:00
florian
6b34e511a0 - removed cdecl from FPC_psabi_begin_catch
git-svn-id: branches/debug_eh@41475 -
2019-02-25 21:25:22 +00:00
Jonas Maebe
a079e5fa80 * synchronised with trunk till r41449
git-svn-id: branches/debug_eh@41450 -
2019-02-24 20:01:53 +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
ac883969a9 * synchronised with trunk till r41423
git-svn-id: branches/debug_eh@41424 -
2019-02-23 17:08:03 +00:00
Jonas Maebe
5cb5b10f8d * fixed LLVM and non-i386 compilation
git-svn-id: branches/debug_eh@41423 -
2019-02-23 17:03:42 +00:00
florian
8db9b211d5 * fixed unwinding from signal handlers, the approach used now is very simple and clean
git-svn-id: branches/debug_eh@41414 -
2019-02-22 22:01:45 +00:00
florian
b1cc02e417 * reraise has to reset the ref. count to 0
git-svn-id: branches/debug_eh@41383 -
2019-02-19 22:17:27 +00:00
florian
9e67e7311a * change the exception address is only useful if a valid frame is passed
git-svn-id: branches/debug_eh@41377 -
2019-02-18 22:04:08 +00:00
florian
0e25d6f00d * better debug messages
+ initial approach to handle addr and frame

git-svn-id: branches/debug_eh@41368 -
2019-02-17 21:45:18 +00:00
florian
a91f009b7e * cleanup
git-svn-id: branches/debug_eh@41309 -
2019-02-11 20:33:50 +00:00
florian
3b77146e1c * adapt FPC_Unwind_Exception for native eh_frame support
git-svn-id: branches/debug_eh@41307 -
2019-02-11 20:30:21 +00:00
florian
294c7c9daf * adapt identifiert name
* updates for eh_frame support on native targets
* improved messages

git-svn-id: branches/debug_eh@41306 -
2019-02-11 20:29:02 +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
Jonas Maebe
1b48e6abe8 * _Unwind_SetGR/_Unwind_GetGR/_Unwind_SetIP/_Unwind_GetIP implementation for
ARM EABI

git-svn-id: branches/debug_eh@41214 -
2019-02-03 21:10:07 +00:00
Jonas Maebe
ef1757a5a7 + ARM EABI exception handling support for PSABIEH
git-svn-id: branches/debug_eh@41213 -
2019-02-03 21:10:04 +00:00
Jonas Maebe
d835a91a31 * detabbed
git-svn-id: branches/debug_eh@41212 -
2019-02-03 21:10:01 +00:00
Jonas Maebe
d93c05a90c * synchronised with trunk till r41207
git-svn-id: branches/debug_eh@41208 -
2019-02-03 21:05:37 +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
Jonas Maebe
a0d796e98d * synchronised with trunk till r41159
git-svn-id: branches/debug_eh@41160 -
2019-02-01 17:01:54 +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
Jonas Maebe
b3a8543a56 * synchronised with trunk till r40942
git-svn-id: branches/debug_eh@40943 -
2019-01-20 17:37:07 +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
31c047adf8 * synchronised with trunk till r40605
git-svn-id: branches/debug_eh@40606 -
2018-12-21 20:58:16 +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
b41cd1eb6a * synchronised with trunk till r40575
git-svn-id: branches/debug_eh@40576 -
2018-12-16 20:45:55 +00:00