> So, I think #2 is the way to go. We'll add a new flag, > (BUFFER|PMC)_stay_of_execution_FLAG or something, that gets added to > allocated PMCs and Buffers. It'll be treated the same way as the > constant/immortal flag is treated for DOD purposes, with one > difference--there'll be an op which specifically clears the flags. > Since the flag is *not* valid to be set across ops, we're fine.
Sounds good to me. This requires that we manually insert this clear_soe_flag op in code, where we want it. If we don't insert it, we effectively make everything immortal/immune, forever. Finding 'proper' places to insert this could be hard to do for the compiler writer, imo. The larger the amount of code in a loop, the more likely this op is to exist inside the loop? Not sure what other heuristics there would be. > Only those functions that *must* set it will, and they are also > required to make sure the stay_of_execution_count interpreter > variable is set to the proper number (or at least large enough) on > abnormal exit. (That way we can keep the flag clearing op from > actually running if there's no reason) Aren't most functions going to be required to set it, indirectly? new_*_header seems like an ideal place to set the SOE flag, and increment the internal counter. But that's going to impact a ton of code. Am I correct in assuming these three functions are what you meant by 'must set it', or were you referring to something else? Mike Lambert