rust/src/tools
bors be055d96c4 Auto merge of #67502 - Mark-Simulacrum:opt-catch, r=Mark-Simulacrum
Optimize catch_unwind to match C++ try/catch

This refactors the implementation of catching unwinds to allow LLVM to inline the "try" closure directly into the happy path, avoiding indirection. This means that the catch_unwind implementation is (after this PR) zero-cost unless a panic is thrown.

https://rust.godbolt.org/z/cZcUSB is an example of the current codegen in a simple case. Notably, the codegen is *exactly the same* if `-Cpanic=abort` is passed, which is clearly not great.

This PR, on the other hand, generates the following assembly:

```asm
# -Cpanic=unwind:
	push   rbx
	mov    ebx,0x2a
	call   QWORD PTR [rip+0x1c53c]        # <happy>
	mov    eax,ebx
	pop    rbx
	ret
	mov    rdi,rax
	call   QWORD PTR [rip+0x1c537]        # cleanup function call
	call   QWORD PTR [rip+0x1c539]        # <unfortunate>
	mov    ebx,0xd
	mov    eax,ebx
	pop    rbx
	ret

# -Cpanic=abort:
	push   rax
	call   QWORD PTR [rip+0x20a1]        # <happy>
	mov    eax,0x2a
	pop    rcx
	ret
```

Fixes #64224, and resolves #64222.
2020-03-13 22:43:06 +00:00
..
build-manifest Rollup merge of #68253 - japaric:bare-metal-cortex-a, r=alexcrichton 2020-01-22 16:02:09 -08:00
cargo@bda50510d1 Update cargo, clippy 2020-03-02 12:25:29 -08:00
cargotest Format the world 2019-12-22 17:42:47 -05:00
clippy@329923edec submodules: update clippy from 8b7f7e66 to 329923ed 2020-03-04 19:56:10 +01:00
compiletest Rollup merge of #66472 - GuillaumeGomez:show-coverage-json, r=ollie27 2020-03-11 14:03:42 +01:00
error_index_generator Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
linkchecker Add shared script for linkchecking books. 2020-02-13 09:50:20 -08:00
miri@974c8be95e update miri 2020-03-04 11:03:08 +01:00
remote-test-client Format the world 2019-12-22 17:42:47 -05:00
remote-test-server Format the world 2019-12-22 17:42:47 -05:00
rls@5fde462d8c submodules: update rls from 10bf331 to 5fde462 2020-02-24 13:47:34 +01:00
rust-installer@9f66c14c3f Update rust-installer to limit memory use 2019-08-28 14:48:02 -07:00
rustbook Auto merge of #69115 - ehuss:update-books, r=Dylan-DPC 2020-02-14 19:59:05 +00:00
rustc-std-workspace-alloc Update version of rustc-std-workspace-* crates 2019-09-09 13:02:10 -07:00
rustc-std-workspace-core Update version of rustc-std-workspace-* crates 2019-09-09 13:02:10 -07:00
rustc-std-workspace-std Update version of rustc-std-workspace-* crates 2019-09-09 13:02:10 -07:00
rustc-workspace-hack Update cargo, rls 2020-01-14 09:47:04 -08:00
rustdoc Format the world 2019-12-22 17:42:47 -05:00
rustdoc-js Move documentation build into bootstrap 2019-02-25 17:46:06 +01:00
rustdoc-js-std Make js tests work even with resource-suffix option 2019-03-10 23:10:40 +01:00
rustdoc-themes Format the world 2019-12-22 17:42:47 -05:00
rustfmt@9f53665f91 Update RLS and Rustfmt 2020-02-12 15:47:38 +01:00
tidy Auto merge of #67502 - Mark-Simulacrum:opt-catch, r=Mark-Simulacrum 2020-03-13 22:43:06 +00:00
unicode-table-generator Use .next() instead of .nth(0) on iterators. 2020-03-03 03:15:03 +01:00
unstable-book-gen Format the world 2019-12-22 17:42:47 -05:00
publish_toolstate.py more toolstate comments 2020-03-04 08:30:26 -08:00