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

Block expression results #305

Merged
merged 13 commits into from
Apr 1, 2011
Merged

Block expression results #305

merged 13 commits into from
Apr 1, 2011

Conversation

brson
Copy link
Contributor

@brson brson commented Apr 1, 2011

This patch series deals with retrieving the results of block expressions, particularly when those results are boxed. The strategy for pulling boxes out of block expressions is to allocate space to point to the box at the top of the function; when the block evaluates a boxed result it's copied to the alloca and upref'd; when the block's enclosing scope leaves the box is loaded from the alloca and downref'd.

At the end of this series standalone block expressions and if expressions can result in most types except for generic boxed types.

Note that the second commit adds two utility functions, block_to_str and expr_to_str, to pprust. These are unrelated to the rest of the series, but I used them for debugging and didn't feel it was worth putting that commit into a separate pull request.

@graydon graydon merged commit 1bc06bc into rust-lang:master Apr 1, 2011
kazcw pushed a commit to kazcw/rust that referenced this pull request Oct 23, 2018
Some intrinsics take `i64` or `u64` arguments which typically means that they're
using 64-bit registers and aren't actually available on x86. This commit adds a
check to stdsimd-verify to assert this and moves around some intrinsics that I
believe should only be available on x86_64.

This commit was checked in many places against gcc/clang/MSVC using godbolt.org
to ensure that we're agreeing with what other compilers are doing.

Closes rust-lang#304
antoyo added a commit to antoyo/rust that referenced this pull request Oct 9, 2023
Add support for "pure" function attribute
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