[Decaf] PP3: optimize some code to judge the type of subclass.