• Kevin Modzelewski's avatar
    Don't crash in a couple rewriter cases · 2c93ce12
    Kevin Modzelewski authored
    - if we try guarding after a mutation
    - if we use all of our scratch space
    
    Now, just set a "failed" flag internally and which prevents committing.
    
    The motivation for the first part is trying to get rewrite calls to tp_getattro;
    if the rewrite is from getattr then it will succeed, but if it comes from
    callattr then we will want to do some more guards after the tp_getattro.  We
    could try to pass that state around, but for now just use the 'failed' approach.
    2c93ce12
rewriter.cpp 59.2 KB