granite-rust/src
bors e9f29a8519 Auto merge of #89030 - nbdd0121:box2, r=jonas-schievink
Introduce `Rvalue::ShallowInitBox`

Polished version of #88700.

Implements MCP rust-lang/compiler-team#460, and should allow #43596 to go forward.

In short, creating an empty box is split from a nullary-op `NullOp::Box` into two steps, first a call to `exchange_malloc`, then a `Rvalue::ShallowInitBox` which transmutes `*mut u8` to a shallow-initialized `Box<T>`. This allows the `exchange_malloc` call to unwind. Details can be found in the MCP.

`NullOp::Box` is not yet removed, purely to make reverting easier in case anything goes wrong as the result of this PR. If revert is needed a reversion of "Use Rvalue::ShallowInitBox for box expression" commit followed by a test bless should be sufficient.

Experiments in #88700 showed a very slight compile-time perf regression due to (supposedly) slightly more time spent in LLVM. We could omit unwind edge generation (in non-`oom=panic` case) in box expression MIR construction to restore perf; but I don't think it's necessary since runtime perf isn't affected and perf difference is rather small.
2021-09-25 11:01:13 +00:00
..
bootstrap Enable "generate-link-to-definition" option on rust tools docs as well 2021-09-24 12:05:35 +02:00
build_helper Migrate to 2021 2021-09-20 22:21:42 -04:00
ci ci: Add Dockerfile for dist-m68k-linux 2021-09-17 15:07:13 +00:00
doc Auto merge of #87064 - Aaron1011:new-closure-track-caller, r=estebank 2021-09-23 12:26:51 +00:00
etc Migrate to 2021 2021-09-20 22:21:42 -04:00
librustdoc Auto merge of #89230 - workingjubilee:rollup-1swktdq, r=workingjubilee 2021-09-25 00:20:28 +00:00
llvm-project@cba558df77 Update LLVM submodule 2021-09-20 23:07:04 +02:00
rustdoc-json-types Migrate to 2021 2021-09-20 22:21:42 -04:00
test Auto merge of #89030 - nbdd0121:box2, r=jonas-schievink 2021-09-25 11:01:13 +00:00
tools Auto merge of #89030 - nbdd0121:box2, r=jonas-schievink 2021-09-25 11:01:13 +00:00
README.md
stage0.json Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
version Bump version to 1.57 2021-09-03 21:54:48 -04:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.