This is just a bunch of minor changes and simplifications to the structure of core::rt. It makes ownership of the ~Scheduler more strict (though it is still mutably aliased sometimes), turns the scheduler cleanup_jobs vector into just a single job, shunts the thread-local scheduler code off to its own file.
This pull request changes the representation of identifiers by adding an integer to the side of each one. This integer will eventually be a reference to a side-table of syntax contexts, presumably stored in TLS. This pull request also adds a bunch of utility functions required for hygiene, and associated tests, but doesn't actually deploy those functions.
Finally, it also has a number of small cleanup items.
This is a test file containing examples of commands that should
succeed. When we write the test runner, we will have to figure
out how to automate them.
r? @nikomatsakis
This doesn't completely fix the x86 ABI for structs, but it does fix some cases. On linux, structs appear to be returned correctly now. On windows, structs are only returned by pointer when they are greater than 8 bytes. That scenario works now.
In the case where the struct is less than 8 bytes our generated code looks peculiar. When returning a pair of u16, C packs both variables into %eax to return them. Our generated code though expects to find one of the pair in %ax and the other in %dx. Similar for u8. I haven't looked into it yet.
There appears to also be struct passing problems on linux, where my `extern-pass-TwoU8s` and `extern-pass-TwoU16s` tests are failing.
1. Implemented the `clean` command
2. The methods implementing rustpkg commands all returned `bool`.
Since most of not all of the error situations seem unrecoverable,
I changed the methods to return unit (and also stubbed out several
more methods that were assuming a package script existed, to be
re-implemented in the future)
This Adds a bunch of tests for passing and returning structs
of various sizes to C. It fixes the struct return rules on unix,
and on windows for structs of size > 8 bytes. Struct passing
on unix for structs under a certain size appears to still be broken.
There's no test runner for rustpkg yet; just sketching out a few
basic test scenarios. pass/ contains packages that should compile
successfully, whereas fail/ contains packages that should fail
to build.
1. Fail when there's no package script and no crates named
main.rs, lib.rs, bench.rs, or test.rs.
2. Inject the crate link_meta "name" and "vers" attributes, so
that the output file gets named correctly in the library case.
3. Normalize '-' to '_' in package names.
This will help not to meet confusing errors.
In issue #5873, the error was "expected constant expr for vector length: Can't cast str to int".
It was originally "expected constant expr for vector length: Non-constant path in constant expr" (though still invalid error).
This patch make the original error to be printed.
This patch is a sledge hammer that moves all tests into `#[cfg(test)] mod test { .. }`, and makes them private, there were several instances of `pub mod tests { #[test] pub fn ... } `.
(The reason for this is I was playing with using `syntax` to index code ([result so far](http://www.ug.it.usyd.edu.au/~hwil7821/rust-api/)) and it was getting some junk from the tests.)
The rustdoc commit is particularly brutal, so it's fine if that one isn't landed.
In order to do a context switch you have to give up ownership of the scheduler,
effectively passing it to the next execution context. This could help avoid
some situations here tasks retain unsafe pointers to schedulers between context
switches, across which they may have changed threads.
There are still a number of uses of unsafe scheduler pointers.
This adds examples for the methods in std::base64.
Each example is complete in the sense that you can copy-paste it into a file and compile it successfully without adding anything (imports, etc). The hardest part of figuring out how to use this was figuring out the right import statements to put at the top.