Skip to content

[ownership] Get rid of old entrypoint for creatingEndBorrow that takes the original value. #29599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Feb 2, 2020

The original design was to make it so that end_borrow tied at the use level its
original/borrowed value. So we would have:

%borrowedVal = begin_borrow %original
...
end_borrow %borrowedVal from %original

In the end we decided not to use that design and instead just use:

%borrowedVal = begin_borrow %original
...
end_borrow %borrowedVal

In order to enable that transition, I left the old API for end_borrow that took
both original and borrowedVal and reimplemented it on top of the new API that
just took the borrowedVal (i.e. the original was just a dead arg).

Now given where we are in the development, it makes sense to get rid of that
transition API and move to just use the new API.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

…s the original value.

The original design was to make it so that end_borrow tied at the use level its
original/borrowed value. So we would have:

```
%borrowedVal = begin_borrow %original
...
end_borrow %borrowedVal from %original
```

In the end we decided not to use that design and instead just use:

```
%borrowedVal = begin_borrow %original
...
end_borrow %borrowedVal
```

In order to enable that transition, I left the old API for end_borrow that took
both original and borrowedVal and reimplemented it on top of the new API that
just took the borrowedVal (i.e. the original was just a dead arg).

Now given where we are in the development, it makes sense to get rid of that
transition API and move to just use the new API.
@gottesmm gottesmm requested a review from atrick February 2, 2020 20:58
@gottesmm
Copy link
Contributor Author

gottesmm commented Feb 2, 2020

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit a336904 into swiftlang:master Feb 2, 2020
@gottesmm gottesmm deleted the pr-762e321418ba69083a3400aa47cb65b0d34f5e37 branch July 23, 2021 21:51
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.

2 participants