Apple Clang uses different version numbering than "regular" clang, but
it also provides the "regular" version it's based on. Update the sed
pattern to pull out this "regular" version number instead of the Apple
version number.
Changes the int/uint modules to all use macros instead of using the `merge` attribute. It would be nice to have #4375 resolved as well for this, but that can probably come at a later date.
Closes#4219.
This pull request is more of an RFC than a finished implementation.
It adds some basic atomic types, with an interface modelled off of C++11's atomic types.
It also adds free functions that provide a slightly nicer interface for atomic operations, though they are unsafe because there isn't a way to be generic over "word-sized" types.
See also #5042
Currently, keywords are stored in hashsets that are recreated for every
Parser instance, which is quite expensive since macro expansion creates
lots of them. Additionally, the parser functions that look for a keyword
currently accept a string and have a runtime check to validate that they
actually received a keyword.
By creating an enum for the keywords and inserting them into the
ident interner, we can avoid the creation of the hashsets and get static
checks for the keywords.
For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
Currently, keywords are stored in hashsets that are recreated for every
Parser instance, which is quite expensive since macro expansion creates
lots of them. Additionally, the parser functions that look for a keyword
currently accept a string and have a runtime check to validate that they
actually received a keyword.
By creating an enum for the keywords and inserting them into the
ident interner, we can avoid the creation of the hashsets and get static
checks for the keywords.
For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
This updates the bundled linenoise library, and explicitly builds it with UTF8 support. This way rusti correctly handles utf8 characters when doing line operations.
Closes#6681
As discussed with @brson on IRC:
This lets us use #ifdefs to determine which stage of the build we happen
to be in, which is useful in the event we need to make changes to rustrt
that are incompatible with the code generated by a stage0 rustc.
Example of the _RUST_STAGEN flag in action here: https://gist.github.com/thomaslee/5641890
I'm not sure what tests for this change should look like, so please advise if I need to do some work around that.
There's currently a function in the lexer that rejects a line comment that is all slashes from being a doc comment. I think the intention was that you could draw boxes,
/////////////
// like so //
/////////////
Since a line doc comment split up over multiple paragraphs will have a "blank" line that is just /// between the paragraphs, that would get mistaken for a box segment, lexed as a regular comment, and go missing from the sequence of doc comment attributes before they were reassembled by rustdoc into markdown input.
I figure the best plan here is to just declare that a comment that is exactly `///` is a doc comment after all, and to only omit comments with four slashes or more, which is what this commit implements. Can't really draw boxes that narrow, anyway.
This lets us use #ifdefs to determine which stage of the build we happen
to be in, which is useful in the event we need to make changes to rustrt
that are incompatible with the code generated by stage0.
This should help pave the way to completing #6575, which will likely
require changes to type signatures for spawn_fn & glue_fn in rustrt.
Simple patch series to fix up all the warnings a rustc compile is giving at the moment. It also fixes a NOTE in `to_bytes.rs` to remove the `to_bytes::iter_bytes_<N>` functions.