Skip to content
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

add documentation for Result Location Semantics #2809

Open
14 tasks
andrewrk opened this issue Jul 3, 2019 · 2 comments
Open
14 tasks

add documentation for Result Location Semantics #2809

andrewrk opened this issue Jul 3, 2019 · 2 comments
Labels
Milestone

Comments

@andrewrk
Copy link
Member

@andrewrk andrewrk commented Jul 3, 2019

  • how result locations flow across expressions
    • variables
    • struct initialization
    • array initialization
    • union initialization
    • if
    • while
    • switch
    • return
    • function calls - return values & parameters
    • catch
    • orelse
    • @bitCast
  • mention #2761 and #2765
@andrewrk andrewrk added the docs label Jul 3, 2019
@andrewrk andrewrk added this to the 0.5.0 milestone Jul 3, 2019
@vi
Copy link

@vi vi commented Sep 22, 2019

What is a Result Location?

@andrewrk andrewrk removed this from the 0.5.0 milestone Sep 26, 2019
@andrewrk andrewrk added this to the 0.6.0 milestone Sep 26, 2019
@andrewrk andrewrk removed this from the 0.6.0 milestone Feb 10, 2020
@andrewrk andrewrk added this to the 0.7.0 milestone Feb 10, 2020
@fengb
Copy link
Contributor

@fengb fengb commented Apr 14, 2020

Here’s the original issue: #287

My best summary: when a function returns a newly created value, it will automatically put it into the function’s return location instead of making a copy. Previously, this was only a potential optimization from LLVM, but now it’s guaranteed by Zig.

@andrewrk andrewrk removed this from the 0.7.0 milestone Oct 30, 2020
@andrewrk andrewrk added this to the 0.8.0 milestone Oct 30, 2020
@andrewrk andrewrk removed this from the 0.8.0 milestone Nov 6, 2020
@andrewrk andrewrk added this to the 0.9.0 milestone Nov 6, 2020
@andrewrk andrewrk removed this from the 0.9.0 milestone May 19, 2021
@andrewrk andrewrk added this to the 0.10.0 milestone May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants