[CPU] Speed up translation a little bit

This commit is contained in:
gdkchan 2018-04-11 14:44:03 -03:00
parent 46548bbc41
commit 9227b0ea59
4 changed files with 48 additions and 33 deletions

View file

@ -160,11 +160,14 @@ namespace ChocolArm64
//Mark all methods that calls this method for ReJiting,
//since we can now call it directly which is faster.
foreach (ATranslatedSub TS in CachedSubs.Values)
if (CachedSubs.TryGetValue(Position, out ATranslatedSub OldSub))
{
if (TS.HasCallee(Position))
foreach (long CallerPos in OldSub.GetCallerPositions())
{
TS.MarkForReJit();
if (CachedSubs.TryGetValue(Position, out ATranslatedSub CallerSub))
{
CallerSub.MarkForReJit();
}
}
}