void CheckSpecial::forEachArg(Inst& inst, const ScopedLambda<Inst::EachArgCallback>& callback) { Inst hidden = hiddenBranch(inst); hidden.forEachArg(callback); commitHiddenBranch(inst, hidden); forEachArgImpl(numB3Args(inst), m_numCheckArgs + 1, inst, m_stackmapRole, callback); }
void CheckSpecial::forEachArg(Inst& inst, const ScopedLambda<Inst::EachArgCallback>& callback) { Inst hidden = hiddenBranch(inst); hidden.forEachArg( [&] (Arg& arg, Arg::Role role, Arg::Type type, Arg::Width width) { unsigned index = &arg - &hidden.args[0]; callback(inst.args[1 + index], role, type, width); }); Optional<unsigned> firstRecoverableIndex; if (m_checkKind.opcode == BranchAdd32 || m_checkKind.opcode == BranchAdd64) firstRecoverableIndex = 1; forEachArgImpl(numB3Args(inst), m_numCheckArgs + 1, inst, m_stackmapRole, firstRecoverableIndex, callback); }