diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-10-23 18:18:44 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-01-29 16:25:20 -0800 |
| commit | 3e9589c0f43af69544b042f50b886005613540f2 (patch) | |
| tree | ac718169258ed337a5164fe2943ad6b79a8c15df /src/libstd/sys/unix/stack_overflow.rs | |
| parent | d1cace17af31ddb21aeb8a3d94cb3eda934047d9 (diff) | |
| download | rust-3e9589c0f43af69544b042f50b886005613540f2.tar.gz rust-3e9589c0f43af69544b042f50b886005613540f2.zip | |
trans: Reimplement unwinding on MSVC
This commit transitions the compiler to using the new exception handling instructions in LLVM for implementing unwinding for MSVC. This affects both 32 and 64-bit MSVC as they're both now using SEH-based strategies. In terms of standard library support, lots more details about how SEH unwinding is implemented can be found in the commits. In terms of trans, this change necessitated a few modifications: * Branches were added to detect when the old landingpad instruction is used or the new cleanuppad instruction is used to `trans::cleanup`. * The return value from `cleanuppad` is not stored in an `alloca` (because it cannot be). * Each block in trans now has an `Option<LandingPad>` instead of `is_lpad: bool` for indicating whether it's in a landing pad or not. The new exception handling intrinsics require that on MSVC each `call` inside of a landing pad is annotated with which landing pad that it's in. This change to the basic block means that whenever a `call` or `invoke` instruction is generated we know whether to annotate it as part of a cleanuppad or not. * Lots of modifications were made to the instruction builders to construct the new instructions as well as pass the tagging information for the call/invoke instructions. * The translation of the `try` intrinsics for MSVC has been overhauled to use the new `catchpad` instruction. The filter function is now also a rustc-generated function instead of a purely libstd-defined function. The libstd definition still exists, it just has a stable ABI across architectures and leaves some of the really weird implementation details to the compiler (e.g. the `localescape` and `localrecover` intrinsics).
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
