Skip to content

Conversation

gottesmm
Copy link
Contributor

rdar://127318392

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

gottesmm added 5 commits July 18, 2024 21:28
…edIsolationInfo.

Just slicing off a nice addition. These already had appropriate print methods so
this commit just exposes the print API in the raw_ostream format.
…ue to compiler bugs, we have a function isolated to self without an isolated parameter.

Closures generally only inherit actor instance isolation if they directly
capture state from the actor instance. In this case, for some reason that is not
true, so we hit an assert that assumes that we will only see a global actor
isolated isolation.

Region Isolation should be able to handle code even if the closure isolation
invariant is violated by the frontend. So to do this, I am introducing a new
singleton actor instance to represent the isolation of a defer or closure
created in an actor instance isolated method. The reason why I am using a
singleton is that closures and defer are not methods so we do not actually know
which parameter is 'self' since it isn't in the abi. But we still need some
value to represent the captured values as belonging to. To square this circle, I
just did what we have done in a similar situation where we did not have a value:
(ActorAccessorInit). In that case, we just use a sentinel to represent the
instance (NOTE: This is represented just via a kind so ActorInstances that are
operator== equal will not &value equal since we are just using a kind).
…PartitionUtils.h and add APIs for mapping an ElementID -> Representative.

This is just moving up the declaration in the chain of dependencies so that I
can write logic in PartitionUtils.h using it. I also added entrypoints to lookup
the ReprensetativeValue for our various emitters.
… of just the representative of the source value when constructing assign and merge.

This will let me know the exact source operand used instead of the source value
representative. This will ensure that the name associated with the diagnostic is
not of the representative value, but the actual value that was the source of the
assign.

This is an NFCI commit that is an algebraic refactor.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm enabled auto-merge July 19, 2024 05:08
…dingResult() so that the unittests can override it.

The unittests for PartitionUtils pass in mocked operands and instructions that
cannot be dereferenced. Adding this static CRTP helper allows for the unittest
PartitionOpEvaluator subclass to just return false for it instead of
dereferencing operands or instructions. The rest of the evaluators just get to
use the default "normal" implementation that actually accesses program state.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants