Only check for should_deoptimize_flag if there was a redefinition

We only need to check for the deoptimize flag on stack when a
redefinition has happened. After a redefinition we cannot use any JITed
code and hence we need to check if we need to deoptimize a particular
frame even when the method isn't marked for deoptimization. In all other
cases it isn't really required to check this bit.

Bug: 253232638
Test: art/test.py
Change-Id: Ib7192db004347d407ec55454b4de040d300d3280
1 file changed