Skip to content

Emit lifetime end markers for function arguments #18007

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 1 commit into from
Oct 14, 2014

Conversation

dotdash
Copy link
Contributor

@dotdash dotdash commented Oct 13, 2014

Function arguments are (hopefully!) the last places where allocas don't
get proper markers for the end of their lifetimes. This means that this
code using 64 bytes of stack for the function arguments:

std::io::println("1");
std::io::println("2");
std::io::println("3");
std::io::println("4");

But with the proper lifetime markers, the slots can be reused, and
the arguments only need 16 bytes of stack.

Function arguments are (hopefully!) the last places where allocas don't
get proper markers for the end of their lifetimes. This means that this
code using 64 bytes of stack for the function arguments:

````rust
std::io::println("1");
std::io::println("2");
std::io::println("3");
std::io::println("4");
````

But with the proper lifetime markers, the slots can be reused, and
the arguments only need 16 bytes of stack.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 13, 2014
@bors bors merged commit fafe136 into rust-lang:master Oct 14, 2014
@dotdash dotdash deleted the arg_lifetime_end branch February 4, 2015 12:41
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