Upgrade Emscripten targets to use upstream LLVM backend
- Refactors the Emscripten target spec to share code with other wasm
targets.
- Replaces the incorrect wasm32 C call ABI with the old asmjs
version, which is correct for both wasm32 and JS.
- Updates the varargs ABI used by Emscripten and deletes the old one.
- Removes the obsolete wasm32-experimental-emscripten target.
- Temporarily makes Emscripten targets use panic=abort by default
because supporting unwinding will require an LLVM patch.
When thread sanitizer instrumentation is enabled during compilation of
stack probe function, the function will be miscompiled and trigger
segmentation fault at runtime. Disable stack probes when tsan is
enabled.
Fix rustdoc display with js disabled
Fixes#64988.
Currently, all sections are collapsed when the page is loading, and then is displayed once done. However, if js is disabled, they never get expanded. Therefore, they need to be shown by default.
r? @Mark-Simulacrum
- Refactors the Emscripten target spec to share code with other wasm
targets.
- Replaces the incorrect wasm32 C call ABI with the old asmjs
version, which is correct for both wasm32 and JS.
- Updates the varargs ABI used by Emscripten and deletes the old one.
- Removes the obsolete wasm32-experimental-emscripten target.
- Temporarily makes Emscripten targets use panic=abort by default
because supporting unwinding will require an LLVM patch.
`filter_map()` is less general, but more efficient, and has the same
effect in this case.
This commit reduces the instruction count for
`unicode_normalization-check-clean` by about 2%.
The `if let Some(val) = value.try_eval_bits(...)` branch in `from_const()` is
very hot for the `unicode_normalization` benchmark.
This commit introduces a special-case alternative for scalars that avoids
`try_eval_bits()` and all the functions it calls (`Const::eval()`,
`ConstValue::try_to_bits()`, `ConstValue::try_to_scalar()`, and
`Scalar::to_bits()`), instead extracting the result immediately.
The type and value checking done by `Scalar::to_bits()` is replicated by moving
it into a new function `Scalar::check_raw()` and using that new function in the
special case.
PR #64673 introduced some special-case handling of scalar types in
`Const::try_eval_bits()`. This handling is now moved out of that function into
the new `IntRange::integral_size_and_signed_bias` function.
This commit reduces the instruction count for
`unicode_normalization-check-clean` by about 10%.
This commit moves a lot of code around but doesn't change functionality
at all. The main goal was for `from_pat()` to no longer call
`from_ctor()`.
The increase in inlining resulted in less function call overhead, for a
3% instruction count win on `unicode_normalization-check-clean`.
metadata: Some crate loading cleanup
So, my goal was to fix caching of loaded crates which is broken and causes ICEs like #56935 or #64450.
While investigating I found that the code is pretty messy and likes to confuse various things that look similar but are actually different.
This PR does some initial cleanup in that area, I hope to get to the caching itself a bit later.
Fix most remaining Polonius test differences
This fixes most of the Polonius test differences and also avoids overflow in issue-38591.rs.
r? @nikomatsakis
Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr
This removes the implicit dependency on the environment variables set
when running `./x.py test`