Opcode queryJmpToQueryOp(Opcode opc) { assert(isQueryJmpOp(opc)); switch (opc) { case JmpGt: return Gt; case JmpGte: return Gte; case JmpLt: return Lt; case JmpLte: return Lte; case JmpEq: return Eq; case JmpNeq: return Neq; case JmpSame: return Same; case JmpNSame: return NSame; case JmpInstanceOfBitmask: return InstanceOfBitmask; case JmpNInstanceOfBitmask: return NInstanceOfBitmask; case JmpIsType: return IsType; case JmpIsNType: return IsNType; default: always_assert(0); } }
// These are the conditional branches supported for direct branch // to their target trace at TraceExit, TraceExitType::NormalCc static bool jccCanBeDirectExit(Opcode opc) { return isQueryJmpOp(opc) && (opc != JmpIsType) && (opc != JmpIsNType); // TODO(#2053369): JmpIsType, etc }