-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lots of commits related to I/O and the scheduler #6046
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These should work now, I hope
There are some better abstractions for this now
Things like the GC heap and unwinding are desirable everywhere the language might be used, not just in tasks. All Rust code should have access to LocalServices.
I am going to use memory_region and boxed_region as the local heap in the new scheduler, for now at least, and I don't have a rust_env available.
Reusing the existing boxed_region implementation from the runtime
For consistency, for all I/O calls, inspecting the error can be done with the io_error condition.
These will make it easier to write I/O code without worrying about errors
A task without an unwinder will abort the process on failure. I'm using this in the runtime tests to guarantee that a call to `assert!` actually triggers some kind of failure (an abort) instead of silently doing nothing. This is essentially in lieu of a working linked failure implementation.
This also reverts some changes to TLS that were leaking memory. Conflicts: src/libcore/rt/uv/net.rs src/libcore/task/local_data_priv.rs src/libcore/unstable/lang.rs
@brson landing as is is fine with me, though I might try to sneak in and force that |
Conflicts: src/libcore/task/local_data_priv.rs
I've added trt_field_vtable, trt_field_box, and trt_field_tydesc, and inserted them in place of the "magic numbers" used to access trait object fields through GEPi().
Lots of linking arguments need to be passed as -Wl,--foo so giving the comma meaning at the rustc layer makes those flags impossible to pass. Multiple arguments can now be passed from a shell by quoting the argument: --link-args='-lfoo -Wl,--as-needed'.
- it is now cross platform, instead of just unix - it now avoids sleeping (fixing issue rust-lang#6156) - it now calls force_destroy() when force = true (was a bug)
These were accidentally un-xfail'ed since they pass on x64. They don't yet on x86.
…agic_nums, r=catamorphism,graydon I don't know how one would write a separate test for this sort of thing. Building the compiler, and `make check` worked, which should mean I didn't screw anything.
Lots of linking arguments need to be passed as -Wl,--foo so giving the comma meaning at the rustc layer makes those flags impossible to pass. Multiple arguments can now be passed from a shell by quoting the argument: --link-args='-lfoo -Wl,--as-needed'.
Follow up with test case for rust-lang#6125.
Recent demoding makes the visitor glue leak. It hasn't shown up in tests because the box annihilator deletes the leaked boxes. This affects the new scheduler though which does not yet have a box annihilator. I don't think there's any great way to test this besides setting up a task that doesn't run the box annihilator and I don't know that that's a capability we want tasks to have.
This was some merge fallout
Even more of `core::run` could be rust-ified -- I believe that access to the C extern environ can be done with rust now. I did not do this because some special casing is needed for OSX and I don't have a mac I can test with. I think this will also fix rust-lang#6096.
now. it is going to pass. crosses fingers |
Conflicts: mk/rt.mk src/libcore/run.rs
bors
added a commit
that referenced
this pull request
May 3, 2013
r? @pcwalton Sorry this is so big, and sorry the first commit is just titled 'wip'. Some interesting bits * [LocalServices](brson@f9069ba) - This is the set of runtime capabilities that *all* Rust code should expect access to, including the local heap, GC, logging, unwinding. * [impl Reader, etc. for Option](brson@5fbb094) - Constructors like `File::open` return Option<FileStream>. This lets you write I/O code without ever unwrapping an option. This series adds a lot of [documentation](https://github.com/brson/rust/blob/io/src/libcore/rt/io/mod.rs#L11) to `core::rt::io`.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Sep 24, 2020
…st, r=flip1995 Change the criteria of `interior_mutable_const` This implements my suggestion [here](rust-lang/rust-clippy#5050 (comment)), and so hopefully fixes rust-lang#5050. * stop linting associated types and generic type parameters * start linting ones in trait impls whose corresponding definitions in the traits are generic * remove the `is_copy` check as presumably the only purpose of it is to allow generics with `Copy` bounds as `Freeze` is internal and generics are no longer linted * remove the term 'copy' from the tests as being `Copy` no longer have meaning --- changelog: Change the criteria of `declare_interior_mutable_const` and `borrow_interior_mutable_const` to narrow the lints to only lint things that defenitly is a interior mutable type, not potentially.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @pcwalton
Sorry this is so big, and sorry the first commit is just titled 'wip'.
Some interesting bits
File::open
return Option. This lets you write I/O code without ever unwrapping an option.This series adds a lot of documentation to
core::rt::io
.