a07e21d913
Just see if every suspend call is followed only by safe instructions or returns, then insert a suspension point check if there isn't a direct return. The first part of this is equivalent to the old implementation, just refactored. The second part generates strictly more checks; see, for example, the fixed test, in which the previous implementation failed to insert a check before a CHECKCAST. ^KT-51818 Fixed