void FrameState::refineLocalValues(LocalStateHook& hook, SSATmp* oldVal, SSATmp* newVal) const { assert(newVal->inst()->is(CheckType)); assert(newVal->inst()->src(0) == oldVal); for (unsigned i = 0, n = m_locals.size(); i < n; ++i) { if (m_locals[i].value == oldVal) { hook.refineLocalValue(i, oldVal, newVal); } } }
void FrameState::refineLocalValues(LocalStateHook& hook, SSATmp* oldVal, SSATmp* newVal) const { assert(newVal->inst()->is(CheckType, AssertType)); assert(newVal->inst()->src(0) == oldVal); walkAllInlinedLocals( [&](uint32_t i, unsigned inlineIdx, const LocalState& local) { if (local.value == oldVal) { hook.refineLocalValue(i, inlineIdx, oldVal, newVal); } }); }