void assertTypeLocation(IRGS& env, const RegionDesc::Location& loc, Type type) { assertx(type <= TStkElem); using T = RegionDesc::Location::Tag; switch (loc.tag()) { case T::Stack: assertTypeStack(env, offsetFromBCSP(env, loc.offsetFromFP()), type); break; case T::Local: assertTypeLocal(env, loc.localId(), type); break; } }
void assertTypeLocation(IRGS& env, const Location& loc, Type type) { assertx(type <= TStkElem); switch (loc.tag()) { case LTag::Stack: assertTypeStack(env, offsetFromBCSP(env, loc.stackIdx()), type); break; case LTag::Local: assertTypeLocal(env, loc.localId(), type); break; } }
void emitAssertRATL(IRGS& env, int32_t loc, RepoAuthType rat) { if (auto const t = ratToAssertType(env, rat)) { assertTypeLocal(env, loc, *t); } }
void emitPushL(HTS& env, int32_t id) { assertTypeLocal(env, id, Type::InitCell); // bytecode invariant auto* locVal = ldLoc(env, id, makeExit(env), DataTypeGeneric); push(env, locVal); stLocRaw(env, id, fp(env), cns(env, Type::Uninit)); }