Commit Graph

103303 Commits

Author SHA1 Message Date
Alex Crichton f3fb1c5e95 Update the `wasi` crate for `wasm32-wasi`
This commit updates the `wasi` crate used by the standard library which
is used to implement most of the functionality of libstd on the
`wasm32-wasi` target. This update comes with a brand new crate structure
in the `wasi` crate which caused quite a few changes for the wasi target
here, but it also comes with a significant change to where the
functionality is coming from.

The WASI specification is organized into "snapshots" and a new snapshot
happened recently, so the WASI APIs themselves have changed since the
previous revision. This had only minor impact on the public facing
surface area of libstd, only changing on `u32` to a `u64` in an unstable
API. The actual source for all of these types and such, however, is now
coming from the `wasi_preview_snapshot1` module instead of the
`wasi_unstable` module like before. This means that any implementors
generating binaries will need to ensure that their embedding environment
handles the `wasi_preview_snapshot1` module.
2019-12-03 07:03:06 -08:00
bors 7d808659cd Auto merge of #66947 - matthiaskrgr:submodule_upd, r=oli-obk
submodules: update clippy from 7b8e8293 to 45196cee

Changes:
````
account for external macro in MISSING_INLINE_IN_PUBLIC_ITEMS lint
build(tests/fmt): use shared target dir
chore: fix and split some ui tests on 32bit system
build: set up build job for i686 targets
remove needless my_lint ui test
git quiet
deploy: cd to out/ before adding files to git
Less needless_doctest_main false positives
fmt
Feed the dog
Use rustc_env instead of exec_env for test
Make triggering this lint less likely 📎
Use exec_env to set backtrace level and normalize output
Update custom ICE function with latest rustc
Use Clippy version in ICE message
Add custom ICE message that points to Clippy repo
Fix master deployment
Run update_lints
Add projections check to EUV for escape analysis
Use infer_ctxt
Move use_self to nursery
Use `println!` on success instead of `eprintln!`
Revert "Disable chalk integration test. Output too large"
Remove the old integration-tests.sh script
Use rust implementation for integration tests in CI
Rust implementation of integration test
Don't error on clippy.toml of dependencies
Fix categorizations
Fix arguments on ExprUseVisitor::new
euv moved from middle to typeck
cmt_ -> Place
build: check if RTIM is not installed
make use of Result::map_or
trigger string_lit_as_bytes when literal has escapes
Remove negative float literal checks.
Enable deny-warnings feature everywhere in CI
Remove unused debugging feature
implemented `as_conversions` lint
fixing a typo
[comparison_chain] #4827 Check `core::cmp::Ord` is implemented
add a good example for the approx_const lint
Add suggested good cases in docs for lifetimes lint
````
Fixes #66840
2019-12-03 09:51:07 +00:00
bors 4787e97475 Auto merge of #66256 - CAD97:patch-2, r=RalfJung
Layout::pad_to_align is infallible

As per [this comment](https://github.com/rust-lang/rust/issues/55724#issuecomment-441421651) (cc @glandium).

> Per https://github.com/rust-lang/rust/blob/eb981a1/src/libcore/alloc.rs#L63-L65, `layout.size()` is always <= `usize::MAX - (layout.align() - 1)`.
>
> Which means:
>
> * The maximum value `layout.size()` can have is already aligned for `layout.align()` (`layout.align()` being a power of two, `usize::MAX - (layout.align() - 1)` is a multiple of `layout.align()`)
> * Incidentally, any value smaller than that maximum value will align at most to that maximum value.
>
> IOW, `pad_to_align` can not return `Err(LayoutErr)`, except for the layout not respecting its invariants, but we shouldn't care about that.

This PR makes `pad_to_align` return `Layout` directly, representing the fact that it cannot fail.
2019-12-03 01:50:33 +00:00
Matthias Krüger f77104b424 submodules: update clippy from 7b8e8293 to 7a943a9d
Changes:
````
Normalize custom ICE test
Rustup to rust-lang/rust#64736
Use assert_crate_local for a more explicit error
Rustup to https://github.com/rust-lang/rust/pull/66789
account for external macro in MISSING_INLINE_IN_PUBLIC_ITEMS lint
build(tests/fmt): use shared target dir
chore: fix and split some ui tests on 32bit system
build: set up build job for i686 targets
remove needless my_lint ui test
git quiet
deploy: cd to out/ before adding files to git
Less needless_doctest_main false positives
fmt
Feed the dog
Use rustc_env instead of exec_env for test
Make triggering this lint less likely 📎
Use exec_env to set backtrace level and normalize output
Update custom ICE function with latest rustc
Use Clippy version in ICE message
Add custom ICE message that points to Clippy repo
Fix master deployment
Run update_lints
Add projections check to EUV for escape analysis
Use infer_ctxt
Move use_self to nursery
Use `println!` on success instead of `eprintln!`
Revert "Disable chalk integration test. Output too large"
Remove the old integration-tests.sh script
Use rust implementation for integration tests in CI
Rust implementation of integration test
Don't error on clippy.toml of dependencies
Fix categorizations
Fix arguments on ExprUseVisitor::new
euv moved from middle to typeck
cmt_ -> Place
build: check if RTIM is not installed
make use of Result::map_or
trigger string_lit_as_bytes when literal has escapes
Remove negative float literal checks.
Enable deny-warnings feature everywhere in CI
Remove unused debugging feature
implemented `as_conversions` lint
fixing a typo
[comparison_chain] #4827 Check `core::cmp::Ord` is implemented
add a good example for the approx_const lint
Add suggested good cases in docs for lifetimes lint
````
2019-12-02 23:26:50 +01:00
bors fdc0011561 Auto merge of #64736 - Nashenas88:mir_predecessors_cache_cleanup, r=oli-obk
Remove interior mutability in mir predecessors cache
2019-12-02 14:51:02 +00:00
Paul Daniel Faria 3eaad564d2 Fix issues caused during rebasing 2019-12-02 09:40:03 -05:00
Paul Daniel Faria 6123478f2a Fix issues caused during rebasing 2019-12-02 08:43:01 -05:00
Paul Daniel Faria 38bd3a2342 Use new HashStable proc macro 2019-12-02 08:43:01 -05:00
Paul Daniel Faria acb90eb014 Fix tidy issues 2019-12-02 08:43:01 -05:00
Paul Daniel Faria 9978574c9e Fix rebasing errors, convert some BodyCache::body() calls to reborrows 2019-12-02 08:43:01 -05:00
Paul Daniel Faria 64654ce1f1 Fix type errors created during rebasing 2019-12-02 08:42:24 -05:00
Paul Daniel Faria 598797c6e7 Remove unchecked inline attribute, remove unused functions, make chache mod private again 2019-12-02 08:41:30 -05:00
Paul Daniel Faria c6354e9839 Remove inline attributes that hadn't been profiled, unexport Cache since it no longer needs to be public 2019-12-02 08:41:30 -05:00
Paul Daniel Faria 245abc49be Fix type errors cause during rebasing 2019-12-02 08:41:30 -05:00
Paul Daniel Faria 05dc5e9f47 Compute predecessors in mir_build query and use existing cache for generating ReadOnlyBodyCache, remove unneeded fns 2019-12-02 08:41:30 -05:00
Paul Daniel Faria ed90818ac8 Remove files created during conflict resolution 2019-12-02 08:40:56 -05:00
Paul Daniel Faria 51b06656da Fix typos caused during rebase 2019-12-02 08:40:56 -05:00
Paul Daniel Faria b2fe254c98 Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, rename all body_cache back to body 2019-12-02 08:40:56 -05:00
Paul Daniel Faria 595d161d36 Remove BodyCache.body and rely on Deref as much as possible for ReadOnlyBodyCache 2019-12-02 08:38:16 -05:00
Paul Daniel Faria c42bdb8c74 Undo minor changes that weren't needed, fix one lifetime typo 2019-12-02 08:38:16 -05:00
Paul Daniel Faria e54c610f85 Fix compilation errors created during rebase 2019-12-02 08:38:16 -05:00
Paul Daniel Faria ab657e3b6b Fix typo 2019-12-02 08:38:16 -05:00
Paul Daniel Faria 67b7a78231 Fix tidy errors 2019-12-02 08:38:16 -05:00
Paul Daniel Faria 35590b5cc8 Fix typos caused during rebase 2019-12-02 08:37:23 -05:00
Paul Daniel Faria 4de31b26d1 Fix remaining compilation issues 2019-12-02 08:37:04 -05:00
Paul Daniel Faria fc6b58d0a8 Simplify BodyCache impl and fix all remaining type errors in librustc_mir (lifetime errors still exist) 2019-12-02 08:35:08 -05:00
Paul Daniel Faria 38c0887c76 Fix remaining Body -> (ReadOnly)BodyCache type errors in librustc_mir outside of librustc_mir/transform 2019-12-02 08:31:35 -05:00
Paul Daniel Faria 3642a71da2 Fix typo caused by rebasing 2019-12-02 08:31:35 -05:00
Paul Daniel Faria 0a19371243 Add predecessors fn to ReadOnlyBodyCache, fix more Body -> (ReadOnly)BodyCache type errors 2019-12-02 08:31:35 -05:00
Paul Daniel Faria 26f1c01ff7 Add read_only fn to BodyCache<&mut...> impl, fix more Body -> (ReadOnly)BodyCache type errors 2019-12-02 08:31:35 -05:00
Paul Daniel Faria ab98c595ea Fix a large number of Body -> (ReadOnly)BodyCache type errors, add predecessor_locations fn to ReadOnlyBodyCache 2019-12-02 08:31:35 -05:00
Paul Daniel Faria 2eed90a621 Account for new maybe_sideeffect helper that requires predecessors 2019-12-02 08:30:30 -05:00
Paul Daniel Faria c8c266a0fb Convert &mut to & since the reference didn't need to be mutable 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 66279d12f9 Revert back to using FunctionCx's Body 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 16952cce01 Add Body back as field of FunctionCx, but under a different lifetime 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 3d68f5f3e7 Improved BodyCache body impl so it only returns a sharable ref, add new body_mut method, fix visit macros, simplify usage in codegen_ssa analyzer 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 30b1d9e798 Remove Body from FunctionCx, pass it along during librustc_codegen_ssa 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 649c73f96d Simplify Cache wrapper to single type, impl Deref on it, fix all compilation errors in librustc_codegen_ssa 2019-12-02 08:30:30 -05:00
Paul Daniel Faria c0592faa67 Move predecessor cache outside of Body, use wrapper types to manage Cache and Body (WIP, amend this commit) 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 9b335ce1a6 Move predecessors cache back to its own type
This ensures that the cache can be properly ignored during encoding and decoding.
Fix panics that arose due to lack of encoding
2019-12-02 08:30:30 -05:00
Paul Daniel Faria 22bc8a01c1 Add back cache invalidation to basic_blocks_and_local_decls_mut 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 52cc85f008 Address nits and remove unneeded pass 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 94414ac7bb Address excessive line length that was triggering warning during linting 2019-12-02 08:30:30 -05:00
Paul Daniel Faria ad734680af Move predecessors cache invalidation back to basic_blocks_mut, add a couple more ensure_predecessors to prevent panics 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 8e8c97e5fd Ensure predecessors are recomputed at critical points, fixes panics 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 570e4182e8 Address linting errors caught by CI 2019-12-02 08:30:30 -05:00
Paul Daniel Faria e1afa519e8 Fix Mir visitor macro to ensure it calls the proper method to invalidate the predecessors cache 2019-12-02 08:30:30 -05:00
Paul Daniel Faria 2b31456068 Add pass to ensure predecessors cache is generated after optimization 2019-12-02 08:30:30 -05:00
Paul Daniel Faria f534d9f8c4 Stop invalidating predecessors cache when accessing unique basic block, invalidate cache when accessing unique terminator 2019-12-02 08:30:30 -05:00
Paul Daniel Faria ce29f43f52 Get rid of old comment 2019-12-02 08:30:30 -05:00