1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-22 21:50:45 -08:00
Commit graph

70 commits

Author SHA1 Message Date
Gareth Rees
a0ad452c8c Can't call funcheck outside of aver because funcheck is not available in the rash variety.
Copied from Perforce
 Change: 186836
 ServerID: perforce.ravenbrook.com
2014-07-04 17:25:33 +01:00
Gareth Rees
08f341fcc9 Catch-up merge from master sources @186540 to branch/2014-05-17/chunk-tree.
Copied from Perforce
 Change: 186546
 ServerID: perforce.ravenbrook.com
2014-06-12 17:55:16 +01:00
Gareth Rees
cb629746ea Catch-up merge from masters sources @186519 to branch/2014-04-17/describe.
Copied from Perforce
 Change: 186526
 ServerID: perforce.ravenbrook.com
2014-06-12 13:45:22 +01:00
Gareth Rees
de2a30d207 Catch-up merge from master sources @186481 to branch/2014-05-17/chunk-tree.
Copied from Perforce
 Change: 186491
 ServerID: perforce.ravenbrook.com
2014-06-11 13:52:31 +01:00
Gareth Rees
8e4721db4c Fix problems identified by rb in review <https://info.ravenbrook.com/mail/2014/05/29/13-01-02/0/>.
Copied from Perforce
 Change: 186347
 ServerID: perforce.ravenbrook.com
2014-05-29 14:50:36 +01:00
Gareth Rees
a0e076be57 Improvements following review.
Copied from Perforce
 Change: 186227
 ServerID: perforce.ravenbrook.com
2014-05-21 00:43:06 +01:00
Gareth Rees
15b35c6e1c New function splaydebugcount counts the number of items in a splay tree (while checking its consistency).
Copied from Perforce
 Change: 186182
 ServerID: perforce.ravenbrook.com
2014-05-19 13:47:56 +01:00
Gareth Rees
0b0a465674 Replace the chunk ring with a chunk tree.
Fix bug in SplayFindNext (LESS and GREATER the wrong way round).

Copied from Perforce
 Change: 186157
 ServerID: perforce.ravenbrook.com
2014-05-17 17:05:42 +01:00
Gareth Rees
c77c91056d Consistent order stream, depth.
Copied from Perforce
 Change: 186001
 ServerID: perforce.ravenbrook.com
2014-05-11 18:30:23 +01:00
Gareth Rees
2493f121dc Correct indentation of describe output by passing depth parameter to describe functions and to writef.
Call Describe functions from test cases so that we get coverage.

Copied from Perforce
 Change: 186000
 ServerID: perforce.ravenbrook.com
2014-05-11 18:20:38 +01:00
Gareth Rees
d1b44a4f05 Back out change 185626 (violates the design.mps.writef.snazzy).
Copied from Perforce
 Change: 185941
 ServerID: perforce.ravenbrook.com
2014-05-02 12:44:31 +01:00
Gareth Rees
6721c2b913 Correct indentation of describe output.
Copied from Perforce
 Change: 185626
 ServerID: perforce.ravenbrook.com
2014-04-17 13:36:42 +01:00
Gareth Rees
6432d58813 Fix the condition for splaynodeupdate.
Copied from Perforce
 Change: 185307
 ServerID: perforce.ravenbrook.com
2014-04-07 16:26:03 +01:00
Gareth Rees
b90f8b9bcd Use cbs subclasses to implement the fast-find and find-in-zones features. this avoids the need to control behaviour by passing booleans, and it means that there is no wasted space in the cbs block structure when these features are not used.
Bring splay tree design up to date; add missing diagrams; move it to the "current" section of the manual.

Copied from Perforce
 Change: 185294
 ServerID: perforce.ravenbrook.com
2014-04-07 15:36:18 +01:00
Gareth Rees
f2776dc0b4 Can't use checkd_nosig(tree, ...) because treeempty is null.
arena->enabledMessageTypes might be NULL.

Copied from Perforce
 Change: 185271
 ServerID: perforce.ravenbrook.com
2014-04-07 10:14:40 +01:00
Gareth Rees
d3d2795fce Improve control over checking:
1. Where Type is a pointer type with a signature, replace CHECKL(TypeCheck(val)) with CHECKD(Type, val).
2. Where Type is a pointer type with no signature, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val).
3. Where Type is a pointer type with a signature, but the structure is not visible at point of checking, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val). Reference <design/check/#.hidden-type>
4. Make BTCheck extern and use it where possible.
5. Replace AVER(TypeCheck(val)) with AVERT(Type, val).

Copied from Perforce
 Change: 185263
 ServerID: perforce.ravenbrook.com
2014-04-06 22:51:05 +01:00
Gareth Rees
9d5266c0cc Improved support for pelles c:
* Refactor nmake files so that a compiler-specific makefile is included; move Microsoft Visual C-specific options to mv.nmk.
* Add nmake files for Pelles (w3i3pc.nmk and pc.nmk).
* Rename spw3i3mv.c to spw3i3.c and spw3i6mv.c to spw3i6.c since these are also used by Pelles C.
* Make reasonable changes to the source code to avoid warnings from Pelles C:
** check results of function calls;
** avoid useless return values;
** undef max before defining it;
** ensure printf formats are checkable;
** move notreached() assertions to the end of blocks;
** suppress warnings in cases where the code shouldn't be changed ("Unreachable code", "Inline assembly code is not portable", "Structured Exception Handling is not portable").

Copied from Perforce
 Change: 184977
 ServerID: perforce.ravenbrook.com
2014-03-24 18:23:29 +00:00
Richard Brooksby
1e8eec530b Catch-up merge from branch/2014-02-22/splay-tune to pick up code review changes.
Copied from Perforce
 Change: 184727
 ServerID: perforce.ravenbrook.com
2014-03-11 16:07:19 +00:00
Richard Brooksby
4e28809e4a Responding to code review. see <https://info.ravenbrook.com/mail/2014/03/04/12-02-27/0/>.
Copied from Perforce
 Change: 184669
 ServerID: perforce.ravenbrook.com
2014-03-07 15:00:54 +00:00
Richard Brooksby
d8362f2cad Merging branch/2014-02-22/splay-tune to pick up splay tree improvements.
Copied from Perforce
 Change: 184606
 ServerID: perforce.ravenbrook.com
2014-02-28 14:27:40 +00:00
Richard Brooksby
31b493236c Reinstating exhaustive splay tree search, since a tree or node may intersect a requested zone set, and be larger than a requested size, but still not satisfy a request.
Copied from Perforce
 Change: 184594
 ServerID: perforce.ravenbrook.com
2014-02-28 10:52:45 +00:00
Richard Brooksby
1ef160e7b1 Reverting exhaustive search in splayfindfirst and splayfindlast since zoned cbs will use an accurate test on the cbs block zones property, and this code will never be exercised.
Copied from Perforce
 Change: 184588
 ServerID: perforce.ravenbrook.com
2014-02-28 00:47:42 +00:00
Richard Brooksby
6b17c88c69 Implementing splayfindlast to match splayfindfirst. oops.
Copied from Perforce
 Change: 184578
 ServerID: perforce.ravenbrook.com
2014-02-27 16:03:55 +00:00
Richard Brooksby
dc4652b271 Minor tweaks to comments.
Copied from Perforce
 Change: 184550
 ServerID: perforce.ravenbrook.com
2014-02-26 13:00:07 +00:00
Richard Brooksby
4ef9c96411 Moving and updating most of the usage documentation from the design document to the source code. design documentation should contain justification of design decisions, not a user manual.
Copied from Perforce
 Change: 184547
 ServerID: perforce.ravenbrook.com
2014-02-26 01:39:10 +00:00
Richard Brooksby
59334b5e4f Updating copyright dates.
Copied from Perforce
 Change: 184510
 ServerID: perforce.ravenbrook.com
2014-02-23 13:54:07 +00:00
Richard Brooksby
8eb1c7b647 Making splaysplit and splayassemble general so that they can be used easily.
Copied from Perforce
 Change: 184452
 ServerID: perforce.ravenbrook.com
2014-02-23 12:18:18 +00:00
Richard Brooksby
bcdce5b35d Returning the results of splitting in a structure so that it’s easier to pass them on to assemble.
Copied from Perforce
 Change: 184451
 ServerID: perforce.ravenbrook.com
2014-02-23 12:10:52 +00:00
Richard Brooksby
42a8ffbe6a Removing unnecessary case of splaying empty trees.
Copied from Perforce
 Change: 184450
 ServerID: perforce.ravenbrook.com
2014-02-23 11:52:21 +00:00
Richard Brooksby
1ac9877082 Adding a signature to splay tree structure. miscellaneous documentation and naming clean-up.
Copied from Perforce
 Change: 184448
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
29cba255f2 Pointer-reversing splay and assemble to avoid double traversal of side tree spines in the update case.
Copied from Perforce
 Change: 184447
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
96be04cb42 Lifting zig and zag cases into common prefix to shorten splaysplit. a few percent faster.
Copied from Perforce
 Change: 184446
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
660c0821d6 Moving downward splay updates to after side tree linkage, allowing the optimiser to do a better job. produces about 10% speedup: xc/release/djbench -x 1234 --sshift 8 mvff
Copied from Perforce
 Change: 184445
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
4e1d9e6a96 Optimising splaytreeneighbours by observing that once one neighbour is found, the other neighbour is already in our hand in one of the side trees. this reduces the number of splays when coalescing.
Copied from Perforce
 Change: 184443
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
d48028902e Specialising left and right splay tree searches where no comparisons are necessary.
Copied from Perforce
 Change: 184442
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
17b72c3052 Adding tree integrity check debugging function.
Copied from Perforce
 Change: 184441
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
fee5ac310e Eliminating redundant passing of tree keys by adding a method to extract the key from a tree node.
Copied from Perforce
 Change: 184440
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
2bb859f62b Avoid dropping children of found node in non-update case. oops.
Copied from Perforce
 Change: 184439
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
f951709e99 Lifting out pointer-reversed updates.
Copied from Perforce
 Change: 184438
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
93a0ffe8ee Generalising pointer reversal of tree spines.
Copied from Perforce
 Change: 184437
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
35ab73ab4a Reducing excessive punctuation and removing unnecessary goto cases in splaysplay.
Copied from Perforce
 Change: 184436
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
6eef655629 Avoiding general compare when searching for first and last nodes in a tree.
Copied from Perforce
 Change: 184435
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
6219c50ca1 Fixing splaytreefind on empty tree. oops.
Regression test: xc/Debug/fbmtest 215526357

Copied from Perforce
 Change: 184434
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
5cdcef0154 Splaysplay returns a compare to indicate the relationship of the new tree root to the key, eliminating some redundant tests, and making it more like treefind.
Allowing SplayTreeNext to deal with modification during iteration, so that iteration can be used to delete trees, for example.

Copied from Perforce
 Change: 184433
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
15c5b6dfc5 Fixing abuses of res and resfail in the splay tree interface.
Copied from Perforce
 Change: 184432
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
6bc35c5ca0 Generalising splayrotate operations into treerotates.
Copied from Perforce
 Change: 184431
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
c446abda38 Replacing null with treeempty where that is intended.
Copied from Perforce
 Change: 184430
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
d04f3c0bc4 Distinguishing tree keys (treekey) from generic void *.
Copied from Perforce
 Change: 184429
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
27373efc5c Unifying splaycomparemethod with treecompare.
Copied from Perforce
 Change: 184428
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
a6d87c91a8 Simplifying splay tree update prototype and removing special null case.
Copied from Perforce
 Change: 184427
 ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00