Commit Graph

46656 Commits

Author SHA1 Message Date
Andrea Canciani
9aa1289a67 Add a comment to explain the #[inline(never)] annotation
and regenerate the platform intrinsics source files.
2015-09-12 17:05:29 +02:00
christopherdumas
d09ba5d3ce Compiler test manual 2015-09-12 08:02:01 -07:00
Tobias Bucher
d0426fd316 Stop a private method on SipHasher from shadowing Hasher::write 2015-09-12 15:25:39 +01:00
bors
b858f218da Auto merge of #28372 - killercup:docs/nomicon-markup-fixes, r=steveklabnik
The style `[name][]` does not work with Pandoc, whereas `[name]` does. I hope hoedown accepts this as well.

r? @steveklabnik
2015-09-12 13:44:44 +00:00
Pascal Hertleif
4828c88af6 Nomicon: Fix Links
The style `[name][]` does not work with Pandoc, whereas `[name]` does.
I hope hoedown accepts this as well.
2015-09-12 12:13:24 +02:00
Pascal Hertleif
39f97cfcf8 TRPL: Fix Headlines, Links in "Error Handling"
- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC
2015-09-12 12:09:59 +02:00
Andrea Canciani
9ef62a4490 Fix generator.py to avoid pathological inlining
Commit 9104a902c0 fixed the generated
files, but that change would be lost (or require additional manual
intervention) if they are re-generated of if new architectures are
added.

cc #28273
2015-09-12 09:28:53 +02:00
bors
d89a10b0a6 Auto merge of #28340 - brson:configure, r=alexcrichton
Redirect stdout on the python bogosity detector. This is printing
pwd to the terminal currently.

Reformat the bogus python/cmake messages so they format correctly.
echo does not always escape newlines (it doesn't here), and multiline
strings don't whitespace munch.

r? @alexcrichton
2015-09-12 02:57:01 +00:00
christopherdumas
3f86602e00 Added useful links section 2015-09-11 18:24:11 -07:00
bors
33f0920d0e Auto merge of #28350 - dotdash:llvm_fix, r=eddyb 2015-09-11 23:03:47 +00:00
Brian Anderson
2662a72537 configure cleanup on windows
Redirect stdout on the python bogosity detector. This is printing
pwd to the terminal currently.

Reformat the bogus python/cmake messages so they format correctly.
echo does not always escape newlines (it doesn't here), and multiline
strings don't whitespace munch.
2015-09-11 14:33:29 -07:00
Brian Anderson
ec3ec1073b Add release dates for all releases 2015-09-11 13:29:53 -07:00
bors
c8ded9a14f Auto merge of #28306 - alexcrichton:less-rt, r=brson
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
2015-09-11 19:42:19 +00:00
christopherdumas
175a6421b2 Fixed test 2015-09-11 11:53:45 -07:00
Alex Crichton
f4be2026df std: Internalize almost all of std::rt
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
2015-09-11 11:19:20 -07:00
bors
eda85fede0 Auto merge of #28348 - petrochenkov:novirt, r=alexcrichton
Noticed these yesterday while reading libsyntax
2015-09-11 17:58:59 +00:00
Alex Crichton
f0b1326dc7 std: Stabilize/deprecate features for 1.4
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the
libs team decision for all library features this cycle.

Stabilized APIs:

* `<Box<str>>::into_string`
* `Arc::downgrade`
* `Arc::get_mut`
* `Arc::make_mut`
* `Arc::try_unwrap`
* `Box::from_raw`
* `Box::into_raw`
* `CStr::to_str`
* `CStr::to_string_lossy`
* `CString::from_raw`
* `CString::into_raw`
* `IntoRawFd::into_raw_fd`
* `IntoRawFd`
* `IntoRawHandle::into_raw_handle`
* `IntoRawHandle`
* `IntoRawSocket::into_raw_socket`
* `IntoRawSocket`
* `Rc::downgrade`
* `Rc::get_mut`
* `Rc::make_mut`
* `Rc::try_unwrap`
* `Result::expect`
* `String::into_boxed_slice`
* `TcpSocket::read_timeout`
* `TcpSocket::set_read_timeout`
* `TcpSocket::set_write_timeout`
* `TcpSocket::write_timeout`
* `UdpSocket::read_timeout`
* `UdpSocket::set_read_timeout`
* `UdpSocket::set_write_timeout`
* `UdpSocket::write_timeout`
* `Vec::append`
* `Vec::split_off`
* `VecDeque::append`
* `VecDeque::retain`
* `VecDeque::split_off`
* `rc::Weak::upgrade`
* `rc::Weak`
* `slice::Iter::as_slice`
* `slice::IterMut::into_slice`
* `str::CharIndices::as_str`
* `str::Chars::as_str`
* `str::split_at_mut`
* `str::split_at`
* `sync::Weak::upgrade`
* `sync::Weak`
* `thread::park_timeout`
* `thread::sleep`

Deprecated APIs

* `BTreeMap::with_b`
* `BTreeSet::with_b`
* `Option::as_mut_slice`
* `Option::as_slice`
* `Result::as_mut_slice`
* `Result::as_slice`
* `f32::from_str_radix`
* `f64::from_str_radix`

Closes #27277
Closes #27718
Closes #27736
Closes #27764
Closes #27765
Closes #27766
Closes #27767
Closes #27768
Closes #27769
Closes #27771
Closes #27773
Closes #27775
Closes #27776
Closes #27785
Closes #27792
Closes #27795
Closes #27797
2015-09-11 09:48:48 -07:00
Simon Mazur
15d5c0878d some code improvements in libfmt_macros 2015-09-11 19:44:06 +03:00
Simon Mazur
69092ffdf2 Changed libfmt_macros Parse iterator to Peekable 2015-09-11 19:44:05 +03:00
Björn Steinbrink
e8c398d05c Update LLVM to fix nightly build failures 2015-09-11 17:40:37 +02:00
bors
fbeef72163 Auto merge of #28354 - dotdash:slow_plat, r=eddyb
When the inliner has to decided if it wants to inline a function A into an
internal function B, it first checks whether it would be more profitable
to inline B into its callees instead. This means that it has to analyze
B, which involves checking the assumption cache. Building the assumption
cache requires scanning the whole function, and because inlining
currently clears the assumption cache, this scan happens again and
again, getting even slower as the function grows from inlining.

As inlining the huge find functions isn't really useful anyway, we can
mark them as noinline, which skips the cost analysis and reduces compile
times by as much as 70%.

cc #28273
2015-09-11 14:45:32 +00:00
Björn Steinbrink
9104a902c0 Avoid triggering a pathological case in the LLVM inliner
When the inliner has to decided if it wants to inline a function A into an
internal function B, it first checks whether it would be more profitable
to inline B into its callees instead. This means that it has to analyze
B, which involves checking the assumption cache. Building the assumption
cache requires scanning the whole function, and because inlining
currently clears the assumption cache, this scan happens again and
again, getting even slower as the function grows from inlining.

As inlining the huge find functions isn't really useful anyway, we can
mark them as noinline, which skips the cost analysis and reduces compile
times by as much as 70%.

cc #28273
2015-09-11 16:43:05 +02:00
bors
1a1e6b85f6 Auto merge of #28338 - erickt:str-cmp, r=bluss
llvm seems to be having some trouble optimizing the iterator-based string comparsion method into some equivalent to memcmp. This explicitly calls out to the memcmp intrinisic in order to allow llvm to generate better code. In some manual benchmarking, this memcmp-based approach is 20 times faster than the iterator approach.
2015-09-11 10:33:02 +00:00
Jonas Schievink
f3308b9c9d Don't print duplicate macro backtrace frames 2015-09-11 11:48:44 +02:00
bors
883b5cf9a9 Auto merge of #28255 - nrc:fmt4, r=pnkfelix
r? @pnkfelix
2015-09-11 08:42:31 +00:00
Nick Cameron
309ee934a6 manual fixups 2015-09-11 20:41:09 +12:00
Nick Cameron
1831bf8fb5 rustfmt libgraphviz 2015-09-11 20:41:08 +12:00
Vadim Petrochenkov
9f1f4c16aa Remove some remains of virtual structs from the parser 2015-09-11 10:09:22 +03:00
bors
01024c9f61 Auto merge of #28328 - tshepang:unusual, r=brson 2015-09-11 06:28:17 +00:00
bors
8e52875026 Auto merge of #28312 - GuillaumeGomez:privacy, r=Manishearth
r? @Manishearth
2015-09-11 04:23:40 +00:00
christopherdumas
0276068255 Added test 2015-09-10 20:44:03 -07:00
bors
f6d64219a4 Auto merge of #28337 - apasel422:tests, r=alexcrichton
Closes #17994.
2015-09-11 01:18:19 +00:00
christopherdumas
ddb46aaf88 Fix ICE per #28172 2015-09-10 17:11:51 -07:00
Erick Tryzelaar
fbd91a732b Optimize string comparison by using memcmp
llvm seems to be having some trouble optimizing the iterator-based
string comparsion method into some equivalent to memcmp. This
explicitly calls out to the memcmp intrinisic in order to allow
llvm to generate better code. In some manual benchmarking, this
memcmp-based approach is 20 times faster than the iterator approach.
2015-09-10 16:46:59 -07:00
bors
5c56887903 Auto merge of #28331 - semarie:openbsd-configure-egcc, r=alexcrichton
under OpenBSD, it could be have present multiples versions of gcc compiler:
  - gcc-4.2 (with patchs) : c/c++ compiler present in `/usr/bin`. It is unusable to build recent LLVM (so rustc too).
  - gcc/g++ -4.9 : c/c++ compiler, installed as third-party with "ports" mechanism. The compiler is installed in `/usr/local` as `egcc` (and `eg++`).

this PR adds probing for `egcc` for `CFG_GCC`, if the first probed `gcc` is too old. It will set `CC` and `CXX` too, in order to pass the variables to LLVM configure if builded.

please note this PR is a first step in order to build rustc under OpenBSD with unpatched tree.

r? @alexcrichton

cc @brson @dhuseby
2015-09-10 23:33:31 +00:00
bors
5ff55943a3 Auto merge of #28321 - nikomatsakis:issue-27616, r=pnkfelix
Fixes #27616.

r? @pnkfelix
2015-09-10 21:48:29 +00:00
Jonas Schievink
31fa44b18e Don't print the macro definition site in backtraces
This halves the backtrace length. The definition site wasn't very useful
anyways, since it may be invalid (for compiler expansions) or located in
another crate. Since the macro name is still printed, grepping for it is
still an easy way of finding the definition.
2015-09-10 22:25:28 +02:00
Andrew Paseltiner
254325cee0 Add test for #17994
Closes #17994.
2015-09-10 16:05:30 -04:00
bors
98eeded587 Auto merge of #28301 - christopherdumas:intergrate_error_burnstushi, r=steveklabnik
This was @steveklabnik's idea. Thanks @BurntSushi for the awesome blog post!
r? @steveklabnik
2015-09-10 20:03:30 +00:00
Jonas Schievink
49d8b0dcbe Make print_macro_backtrace non-recursive 2015-09-10 21:22:59 +02:00
bors
79c6a4d55c Auto merge of #28318 - dongz9:master, r=eddyb
Fix the following error when running configure with llvm 3.8svn:

configure: error: bad LLVM version: 3.8.0svn, need >=3.5
2015-09-10 18:18:45 +00:00
Sébastien Marie
9ac36f4665 disable jemalloc on OpenBSD
depending of the compiler used, jemalloc configure don't detect
correctly some parameters.
2015-09-10 18:52:19 +02:00
christopherdumas
e18122682b Adapted @BurtSushi's blog post for the error handling chapter, rewrite the case study. 2015-09-10 09:48:04 -07:00
bors
250679e20d Auto merge of #28332 - apasel422:tests, r=alexcrichton
Closes #22638.
Closes #22872.
Closes #23024.
Closes #23046.
2015-09-10 16:29:49 +00:00
Andrew Paseltiner
a33532b1b7 Add tests for #22638, #22872, #23024, #23046
Closes #22638.
Closes #22872.
Closes #23024.
Closes #23046.
2015-09-10 11:31:23 -04:00
bors
9577e42682 Auto merge of #28329 - tshepang:comfort, r=steveklabnik 2015-09-10 13:44:48 +00:00
Guillaume Gomez
0477976867 Add error code for private struct field issue 2015-09-10 14:19:01 +02:00
Aleksey Kladov
c87a58fe4b libsyntax: minor clean up
Escape `{` in format strings as `{{`, instead of using a substitution
2015-09-10 15:14:24 +03:00
Sébastien Marie
90043cbbf0 openbsd: probe CFG_GCC egcc
if default CFG_GCC is too old, probe also egcc (which is gcc from
ports).

set CC/CXX too, in order to pass them to LLVM
2015-09-10 11:59:01 +02:00
bors
5f9f0b7cc3 Auto merge of #28266 - jackwilsonv:patch-4, r=steveklabnik
r? @steveklabnik
2015-09-10 07:39:50 +00:00