-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
trans: Move rust_try into the compiler #27176
Conversation
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
r? @brson cc @rust-lang/compiler (my knowledge of trans is pretty bad and I may have done egregious things) |
} | ||
|
||
// MSVC's definition of the `rust_try` function. The exact implementation here | ||
// is a little different than the GNU (standard) version below, not ony because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ony" -> "only"
51016bd
to
6046fb7
Compare
@bors r+ |
📌 Commit 6046fb7 has been approved by |
Awesome patch. |
825860c
to
970a3ca
Compare
@bors: r=brson |
📌 Commit 970a3ca has been approved by |
false); | ||
|
||
// Define the "inner try" shim | ||
let rust_try_inner = declare::declare_internal_rust_fn(ccx, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are “defining” the shim, declare::define_internal_rust_fn
should be used.
This commit moves the IR files in the distribution, rust_try.ll, rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main distribution. There's a few reasons for this change: * LLVM changes its IR syntax from time to time, so it's very difficult to have these files build across many LLVM versions simultaneously. We'll likely want to retain this ability for quite some time into the future. * The implementation of these files is closely tied to the compiler and runtime itself, so it makes sense to fold it into a location which can do more platform-specific checks for various implementation details (such as MSVC 32 vs 64-bit). * This removes LLVM as a build-time dependency of the standard library. This may end up becoming very useful if we move towards building the standard library with Cargo. In the immediate future, however, this commit should restore compatibility with LLVM 3.5 and 3.6.
970a3ca
to
c35b2bd
Compare
⌛ Testing commit c35b2bd with merge 3475c5b... |
💔 Test failed - auto-win-gnu-64-nopt-t |
@bors: retry On Tue, Jul 21, 2015 at 9:19 PM, bors notifications@github.com wrote:
|
This commit moves the IR files in the distribution, rust_try.ll, rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main distribution. There's a few reasons for this change: * LLVM changes its IR syntax from time to time, so it's very difficult to have these files build across many LLVM versions simultaneously. We'll likely want to retain this ability for quite some time into the future. * The implementation of these files is closely tied to the compiler and runtime itself, so it makes sense to fold it into a location which can do more platform-specific checks for various implementation details (such as MSVC 32 vs 64-bit). * This removes LLVM as a build-time dependency of the standard library. This may end up becoming very useful if we move towards building the standard library with Cargo. In the immediate future, however, this commit should restore compatibility with LLVM 3.5 and 3.6.
:( |
In theory, yes, but that still requires the standard library to have |
I am not sure I understand this point. Didn't My concern with the new way is that:
|
(sorry for jumping in late - I was not aware of this change until bors told me that my PR collided with this one) |
Ah by this I just mean that the tool The other shims and such in
I don't disagree with this!
I'm not quite sure I follow this. Is this basically saying that it's easier to edit IR than it is to edit the compiler?
No worries! |
I meant that as a library function in rustrt_native, it could have been overridden. Not so much with it as compiler intrinsic. |
How do you override something in a native library? You mean avoiding The ABI of unwinding is very closely tied to the compiler itself, so even though it could be implemented in various locations it kinda makes sense to me to implement this as an intrinsic so the compiler has complete control over all ABI possibilities. |
I meant that when building rustrt_native for a new target, you could write a custom rust_try. |
That's true, but do you know if that's done often? From what I've seen the |
Was it known that this would break unwinding entirely on Individual |
Actually, scratch that, it's because the snapshot compiler doesn't have the |
@eddyb yes this was known. |
On the functionality side, morestack is gone (rust-lang/rust#27338), and rustrt_native is gone (rust-lang/rust#27176). On the implementation side, connect has been renamed to join (rust-lang/rust#26957).
rust-lang/rust#27176 "removes LLVM as a build-time dependency of the standard library. This may end up becoming very useful if we move towards building the standard library with Cargo."
This commit moves the IR files in the distribution, rust_try.ll,
rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main
distribution. There's a few reasons for this change:
have these files build across many LLVM versions simultaneously. We'll likely
want to retain this ability for quite some time into the future.
itself, so it makes sense to fold it into a location which can do more
platform-specific checks for various implementation details (such as MSVC 32
vs 64-bit).
end up becoming very useful if we move towards building the standard library
with Cargo.
In the immediate future, however, this commit should restore compatibility with
LLVM 3.5 and 3.6.