rbyd: Added LFS_ASSERTRBYDBALANCE for asserting rbyds are balanced
This is _not_ free, so an opt-in define is needed. This is also expected to fail right now due to balance issues with diverging yellow nodes in range-removals, but it's the first step towards trying to fix said balance issues. I've been trying to avoid adding debug machinery to lfs.c itself, since it tends to hurt readability, but I really don't know how you could assert rbyd balance out-of-tree short of trying to fetch every block in emubd somehow... Oh well, finding and asserting rbyd balance in lfsr_rbyd_fetch at least doesn't require that much code. No code changes, thanks to const-propagation.
This commit is contained in:
@@ -168,6 +168,12 @@ extern "C"
|
||||
#define LFS_IFDEF_GC(a, b) (b)
|
||||
#endif
|
||||
|
||||
#ifdef LFS_ASSERTRBYDBALANCE
|
||||
#define LFS_IFDEF_ASSERTRBYDBALANCE(a, b) (a)
|
||||
#else
|
||||
#define LFS_IFDEF_ASSERTRBYDBALANCE(a, b) (b)
|
||||
#endif
|
||||
|
||||
|
||||
// Builtin functions, these may be replaced by more efficient
|
||||
// toolchain-specific implementations. LFS_NO_BUILTINS falls back to a more
|
||||
|
||||
Reference in New Issue
Block a user