rust/src/librustc_trans/trans/mir
Alex Crichton 3e9589c0f4 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).
2016-01-29 16:25:20 -08:00
..
analyze.rs [MIR] Promote temps to alloca on multi-assignment 2016-01-21 19:01:43 +02:00
block.rs trans: Reimplement unwinding on MSVC 2016-01-29 16:25:20 -08:00
constant.rs Rollup merge of #30774 - nagisa:mir-fix-constval-adts, r=arielb1 2016-01-11 21:17:53 +02:00
did.rs clean up trans_static_method_callee and friends 2016-01-21 14:42:09 +02:00
lvalue.rs use a newtype for the variant discriminant instead of u64 2016-01-16 16:03:09 +01:00
mod.rs trans: Reimplement unwinding on MSVC 2016-01-29 16:25:20 -08:00
operand.rs [MIR] Avoid some code generation for stores of ZST 2016-01-12 21:35:10 +02:00
rvalue.rs trans: Reimplement unwinding on MSVC 2016-01-29 16:25:20 -08:00
statement.rs