about summary refs log tree commit diff
path: root/src/test/run-make/wasm-panic-small
AgeCommit message (Collapse)AuthorLines
2019-02-11use ignore directives for run-make testsAndy Russell-5/+2
This makes the tests easier to read, and makes it possible to tell which tests aren't being run on the host platform. Fixes #56704.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-01std: Improve codegen size of accessing TLSAlex Crichton-0/+11
Some code in the TLS implementation in libstd stores `Some(val)` into an `&mut Option<T>` (effectively) and then pulls out `&T`, but it currently uses `.unwrap()` which can codegen into a panic even though it can never panic. With sufficient optimizations enabled (like LTO) the compiler can see through this but this commit helps it along in normal mode (`--release` with Cargo by default) to avoid codegen'ing the panic path. This ends up improving the optimized codegen on wasm by ensuring that a call to panic pulling in more file size doesn't stick around.
2018-04-13std: Avoid allocating panic message unless neededAlex Crichton-1/+20
This commit removes allocation of the panic message in instances like `panic!("foo: {}", "bar")` if we don't actually end up needing the message. We don't need it in the case of wasm32 right now, and in general it's not needed for panic=abort instances that use the default panic hook. For now this commit only solves the wasm use case where with LTO the allocation is entirely removed, but the panic=abort use case can be implemented at a later date if needed.
2018-04-13std: Minimize size of panicking on wasmAlex Crichton-0/+27
This commit applies a few code size optimizations for the wasm target to the standard library, namely around panics. We notably know that in most configurations it's impossible for us to print anything in wasm32-unknown-unknown so we can skip larger portions of panicking that are otherwise simply informative. This allows us to get quite a nice size reduction. Finally we can also tweak where the allocation happens for the `Box<Any>` that we panic with. By only allocating once unwinding starts we can reduce the size of a panicking wasm module from 44k to 350 bytes.