Use NULL instead of END_X_QUEUE closures?
Ömer Sinan Ağacan
omeragacan at gmail.com
Mon May 7 19:34:07 UTC 2018
Currently we sometimes use special closures to mark end of lists of different
objects. Some examples:
But we also use NULL for the same thing, e.g. in weak pointer lists
I'm wondering why we need special marker objects (which are actual closures
with info tables) instead of using NULL consistently. Current approach causes a
minor problem when working on the RTS because every time I traverse a list I
need to remember how the list is terminated (e.g. NULL when traversing weak
pointer lists, END_TSO_QUEUE when traversing TSO lists).
More information about the ghc-devs