Changes between Version 6 and Version 7 of Commentary/Rts/HaskellExecution/PointerTagging


Ignore:
Timestamp:
Nov 26, 2007 3:56:59 PM (6 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Rts/HaskellExecution/PointerTagging

    v6 v7  
    5858  * If a function fails its heap check and returns to the runtime to garbage collect, on re-entry the closure 
    5959    pointer must be still tagged. 
     60  * the PAP entry code jumps to the function's entry code, so it must have a tagged pointer to the function 
     61    closure in R1.  We therefore assume that a PAP always contains a tagged pointer to the function closure. 
    6062 
    6163In the second case, calling a known non-top-level function must pass the function closure in R1, and this pointer ''must'' be correctly tagged.  The code generator does not arrange to tag the pointer before calling the function; it assumes the pointer is already tagged.  Since we arrange to tag the pointer when the closure is created, this assumption is normally safe.  However, if the pointer has to be saved on the stack, say across a call, then when the pointer is retrieved again we must either retag it, or be sure that it is still tagged.  Currently we do the latter, but this imposes an invariant on the garbage collector: all tags must be retained on non-top-level function pointers.