Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Sep 26, 2020

See Commits and Changes for more details.


Created by pull[bot]. Want to support this open source service? Please star it : )

DougGregor and others added 11 commits September 24, 2020 20:56
…d yielded values are only used within the coroutine's lifetime.

I think validating this was an oversight from the bringup of coroutines. I
discovered this while writing test cases for coroutine lifetime extension. I
realized it was possible to write a test case that should have triggered this
but was not.

I added some tests to make sure that we continue to flag this in the future.

rdar://69597888
This check did not handle MemberRefExprs with an InOutExpr base,
giving it inconsistent behavior:

- With a class, we would diagnose self-assignment of computed
  properties

- With a struct, accesses to computed properties would build a
  MemberRefExpr with an InOutExpr base, so self-assignments
  were *not* diagnosed.

Let's tweak the check to consistently diagnose self-assignments
to stored properties only, instead of the emergent behavior
as described above.
We used to wrap the base expression in an InOutExpr when accessing a
computed property. This was a vestigial remnant of differences in the
SILGen code paths for stored vs computed property access.

These days SILGen doesn't care and is perfectly happy to call getters
and setters with an LValueType base as well.

This allows us to remove the call to getAccessSemantics(), which for
a 'didSet', had to kick off type checking of the body.

Fixes <rdar://problem/69532933>.
Also remove the unused AccessSemantics parameter.
…antics-cycle

Sema: Simplify adjustSelfTypeForMember() a little bit to avoid a cycle
…94d3a737baacc1c4b6d8303

[ownership] Teach the ownership verifier how to verify that guaranteed yielded values are only used within the coroutine's lifetime.
…fixits-use-after-free

[Type checker] Eliminate a use-after-free due to C++ temporaries.
…-sil-async

[Concurrency] (De-)mangling for SIL @async function types.
@pull pull bot merged commit afb0d50 into swiftwasm Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants