• Kevin Modzelewski's avatar
    Add a getattr rewrite "return convention" · 6160ed80
    Kevin Modzelewski authored
    Previously, we would inspect the combination of (return_value, exception_state)
    to try to determine what the behavior of future rewrites will be.  For example,
    if no attribute was returned and no exception was thrown, then we would assume
    that all future times through the rewrite the behavior would be the same.  This
    has caused a few bugs, and I'm about to add other cases where it won't be possible
    to examine the current function's return value to determine what the future
    rewrites will do.
    
    So instead, have getattr-like functions return a "rewriter return convention" flag
    that says how future rewrites will behave.
    6160ed80
rewrite_args.h 6.32 KB