Skip to content

Load borrow end borrow #5379

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

Merged
merged 3 commits into from
Oct 20, 2016
Merged

Conversation

gottesmm
Copy link
Contributor

This PR implements the load_borrow and end_borrow instructions. It does not yet remove them using the ownership model eliminator or in IRGen. I skipped the IRGen part since it is not needed right now.

@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test

@eeckstein
Copy link
Contributor

Can you also update SIL.rst?

@eeckstein
Copy link
Contributor

Some questions which come to my mind which I'd like to be answered by the doc in SIL.rst:
-) must load_borrow/end_borrow be properly paired in the CFG?
-) is the end_borrow src always an address type?
-) if yes, is it always the same as load_borrow address?
-) what is the semantics for values with references vs. primitive types?

I think some of the questions are addressed in your proposal, so you just can copy the text from there.

…tions to SIL, Serialization, Printing/Parsing.

I did not add it to the ownership verifier or to IRGen yet.

rdar://28685236
@gottesmm gottesmm force-pushed the load_borrow_end_borrow branch from 9715cee to c41ead0 Compare October 20, 2016 17:54
@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test

@gottesmm
Copy link
Contributor Author

@eeckstein I am going to do a pass through and update SIL.rst for all of the instructions I have been creating.

@gottesmm gottesmm merged commit 85343be into swiftlang:master Oct 20, 2016
@gottesmm gottesmm deleted the load_borrow_end_borrow branch October 20, 2016 18:52
@gottesmm
Copy link
Contributor Author

On Oct 20, 2016, at 8:13 AM, eeckstein [email protected] wrote:

Can you also update SIL.rst?

Sure.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #5379 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAee3_EYWzto-1VVUPe0Xeknb3AkrnHhks5q14UmgaJpZM4Kbxig.

@gottesmm
Copy link
Contributor Author

On Oct 20, 2016, at 8:28 AM, eeckstein [email protected] wrote:

Some questions which come to my mind which I'd like to be answered by the doc in SIL.rst:
-) must load_borrow/end_borrow be properly paired in the CFG?

Eventually, I have not added such functionality yet.
-) is the end_borrow src always an address type?

No. What if I wanted to do a "start_borrow" or something like that of a class. In that case, we would want to relate two object types.
-) if yes, is it always the same as load_borrow address?

In the case of a load_borrow, it will be the load_borrow address.
-) what is the semantics for values with references vs. primitive types?

By primitive types, do you mean trivial types?

I think some of the questions are addressed in your proposal, so you just can copy the text from there.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #5379 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAee3-8OGg9ERqcO3Jc6XzjVMClYs26qks5q14iTgaJpZM4Kbxig.

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