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 -
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 -
as this might result in some nodes not being executed, like temp. create nodes with init. code, see e.g. issue #34653, resolves#34653
git-svn-id: trunk@40934 -
on pdecsub (node units should not depend on parser units):
o maybe_add_public_default_java_constructor()
o handle_calling_convention()
o create_finalizer_procdef() (replaced with create_outline_procdef())
o insert_record_hidden_paras()
o handle_calling_convention()
o proc_add_definition()
o build_parentfpstruct()
o maybe_guarantee_record_typesym()
o get_first_proc_str()
* factored out the creation of a procinfo for a nested procdef based on a
subnodetree of the current procdef into tprocinfo.create_for_outlining()
git-svn-id: trunk@40773 -
encountering a method with the correct name that does not have the
"overload" directive (same logic as when looking for a call candidate,
to avoid errors when using a Pascal-level wrapper to call interface
methods, and Delphi-compatible since it always required "overload" for
overloaded methods)
o also catches calling convention mismatches like in webtbs/tw27349
git-svn-id: trunk@40683 -
This patch improves the compiler where "case" statements are concerned, using jump tables more often and creating more efficient machine code in some situations:
* If a case block only contains one branch (not including the else block), the initial range check is removed, since this becomes wasted effort.
* If the else block is empty, the else label is set to the end label - though this doesn't decrease the code size, it takes a bit of strain off the peephole optimizer.
* On -O2 and above, some node analysis is now done on the branch labels. Most of the time this just redirects it to the end
label for empty blocks, but if the block contains a goto statement, it will redirect it to its destination instead,
thus increasing performance by not having multiple jumps (this won't get picked up by the peephole optimiser if the label addresses are in a jump table).
* Some checks now use what I call the 'true count' rather than the 'label count'. The true count includes each
individual value in a range - for example, 0..2 counts as 3. This increases the chance that a jump table will be
utilised in situations where it is more efficient than a linear list.
* For jump tables, if the case block almost covers the entire range (32 entries or fewer from full coverage),
the initial range check is removed and the gaps included in the jump table (pointing to the else label).
git-svn-id: trunk@40676 -