mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[region-isolation] Begin tracking in SILIsolationInfo the actorInstance that a value is isolated to if we are dealing with an actor instance.
This will let us distinguish in between values derived from two actor instances of the same type and to emit better errors.
This commit is contained in:
@@ -3281,8 +3281,11 @@ TrackableValue RegionAnalysisValueMap::getTrackableValue(
|
||||
// If we were able to find this was actor isolated from finding our
|
||||
// underlying object, use that. It is never wrong.
|
||||
if (info.actorIsolation) {
|
||||
SILValue actorInstance =
|
||||
info.value->getType().isActor() ? info.value : SILValue();
|
||||
iter.first->getSecond().mergeIsolationRegionInfo(
|
||||
SILIsolationInfo::getActorIsolated(value, *info.actorIsolation));
|
||||
SILIsolationInfo::getActorIsolated(value, actorInstance,
|
||||
*info.actorIsolation));
|
||||
}
|
||||
|
||||
auto storage = AccessStorageWithBase::compute(value);
|
||||
@@ -3332,7 +3335,7 @@ TrackableValue RegionAnalysisValueMap::getTrackableValue(
|
||||
auto parentAddrInfo = getUnderlyingTrackedValue(svi);
|
||||
if (parentAddrInfo.actorIsolation) {
|
||||
iter.first->getSecond().mergeIsolationRegionInfo(
|
||||
SILIsolationInfo::getActorIsolated(svi,
|
||||
SILIsolationInfo::getActorIsolated(svi, parentAddrInfo.value,
|
||||
*parentAddrInfo.actorIsolation));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user