Commit Graph

44386 Commits

Author SHA1 Message Date
bors
320bd6f874 Auto merge of #26759 - dotdash:drop_dst, r=pnkfelix
Fixes #26709
2015-07-03 13:59:42 +00:00
Björn Steinbrink
eaeede2126 Fix ICE caused by Drop implementations for unsized types
Fixes #26709
2015-07-03 14:44:51 +02:00
Kagami Sascha Rosylight
f24089cfd1 MYSY2 -> MSYS2 2015-07-03 17:16:13 +09:00
bors
f3b97a74aa Auto merge of #26752 - frewsxcv:patch-25, r=alexcrichton 2015-07-03 07:13:57 +00:00
Corey Farwell
e2b6b02e3a Fix 'Relaaxed' typo in code comment 2015-07-03 00:13:02 -07:00
Nick Cameron
f3ba950a34 Refactor how the parser looks for sub-modules
This makes the functionality usable from outside the parser
2015-07-03 17:29:24 +12:00
bors
4c246ecb64 Auto merge of #26740 - steveklabnik:gh26737, r=gankro
Fixes #26737.
2015-07-03 02:32:27 +00:00
bors
4a217759ad Auto merge of #26610 - aturon:fix_make_unique, r=alexcrichton
This commit resolves the race condition in the `get_mut` and
`make_unique` functions, which arose through interaction with weak
pointers. The basic strategy is to "lock" the weak pointer count when
trying to establish uniqueness, by reusing the field as a simple
spinlock. The overhead for normal use of `Arc` is expected to be minimal
-- it will be *none* when only strong pointers are used, and only
requires a move from atomic increment to CAS for usage of weak pointers.

The commit also removes the `unsafe` and deprecated status of these functions.

Closes #24880

r? @alexcrichton 

cc @metajack @SimonSapin @Ms2ger
2015-07-03 01:00:31 +00:00
bors
f234a6beaa Auto merge of #26733 - nhowell:update-jquery, r=steveklabnik
r? @steveklabnik
2015-07-02 23:28:20 +00:00
bors
d1e31f396c Auto merge of #26725 - tshepang:patch-2, r=bluss 2015-07-02 21:56:28 +00:00
Aaron Turon
d77c4b0fa6 Fix race condition in Arc's get_mut and make_unqiue
This commit resolves the race condition in the `get_mut` and
`make_unique` functions, which arose through interaction with weak
pointers. The basic strategy is to "lock" the weak pointer count when
trying to establish uniqueness, by reusing the field as a simple
spinlock. The overhead for normal use of `Arc` is expected to be minimal
-- it will be *none* when only strong pointers are used, and only
requires a move from atomic increment to CAS for usage of weak pointers.

The commit also removes the `unsafe` and deprecated status of these
functions.

Along the way, the commit also improves several memory orderings, and
adds commentary about why various orderings suffice.
2015-07-02 13:58:38 -07:00
bors
b4abed6476 Auto merge of #26738 - dotdash:trans_args, r=luqmana
The current split between create_datums_for_fn_args, copy_args_to_allocas and
store_arg involves a detour via rvalue datums which cause additional work in
form of insertvalue/extractvalue pairs for fat pointer arguments, and an extra
alloca and memcpy for tupled args in rust-call functions.

By merging those three functions into just one that actually covers the whole
process of creating the final argument datums, we can skip all that.  Also,
this allows to easily merge in the handling of rust-call functions, allowing to
make create_datum_for_fn_args_under_call_abi obsolete.

cc #26600 -- The insertvalue instructions kicked us off of fast-isel.
2015-07-02 20:23:45 +00:00
bors
fb379ef05c Auto merge of #26682 - posix4e:netbsd, r=alexcrichton
This is dependent on https://github.com/rust-lang/rust-installer/pull/38. Once it is merged we most likely need to update the commit.
2015-07-02 18:50:46 +00:00
Steve Klabnik
57eed53041 Add more description for from_raw_parts's unsafety
Fixes #26737.
2015-07-02 14:05:57 -04:00
Alex Crichton
3e26e56a79 rustc_trans: Disable landing pads on 32-bit MSVC
This is currently quite buggy in LLVM from what I can tell, so just disable it
entirely. This commit also adds preliminary support, however, to actually
target 32-bit MSVC by making sure the `rust_try_msvc_32.ll` file exists and
wiring up exceptions to `_except_handler3` instead of `__C_specific_handler`
(which doesn't exist on 32-bit).
2015-07-02 10:45:13 -07:00
Alex Crichton
83ee47b054 windows: Don't link rust_builtin
This library has no shims which are actually needed on Windows now, so translate
that last easy one into Rust and then don't link it at all on Windows.
2015-07-02 10:44:40 -07:00
Björn Steinbrink
a04784f7f9 Directly construct lvalue datums for function arguments
The current split between create_datums_for_fn_args,
copy_args_to_allocas and store_arg involves a detour via rvalue datums
which cause additional work in form of insertvalue/extractvalue pairs
for fat pointer arguments, and an extra alloca and memcpy for tupled
args in rust-call functions.

By merging those three functions into just one that actually covers the
whole process of creating the final argument datums, we can skip all
that. Also, this allows to easily merge in the handling of rust-call
functions, allowing to make create_datum_for_fn_args_under_call_abi
obsolete.

cc #26600 -- The insertvalue instructions kicked us off of fast-isel.
2015-07-02 18:34:58 +02:00
Björn Steinbrink
6b5edd24f5 Avoid a needless vector copy in type_of_rust_fn 2015-07-02 18:34:57 +02:00
Björn Steinbrink
95c08e3787 Skip the pointless tupling/untupling of argument types in trans_closure
The tupling only happens for actual closures, same for the untupling.
The only code that actually sees the tupled types is some debugging
output for which it is actually rather confusing to have the types
tupled, because neither the function signature in Rust nor the
function signature for LLVM has them tupled.
2015-07-02 18:34:54 +02:00
bors
6809481896 Auto merge of #26724 - tshepang:patch-1, r=bluss
Also, the info is repeated in the following paragraph
2015-07-02 15:57:30 +00:00
bors
50cb22f8e0 Auto merge of #26713 - GuillaumeGomez:patch-3, r=Manishearth
r? @Manishearth
2015-07-02 14:23:02 +00:00
bors
71a6441361 Auto merge of #26715 - steveklabnik:gh26497, r=huonw
Add an example, plus some text that covers the buffering nature of
channels.

Fixes #26497
2015-07-02 12:28:11 +00:00
bors
99ca63fbd8 Auto merge of #26712 - GuillaumeGomez:patch-2, r=Manishearth
Part of #24407.
cc @michaelsproul
r? @Manishearth
2015-07-02 10:51:50 +00:00
bors
c4b4f07592 Auto merge of #26727 - remram44:coerceunsized-weak, r=eddyb
This is a simple addition, shouldn't change behavior.

Fixes #26704

I don't know if the coercion for `Rc` is tested, if it is this probably needs the same test with `Weak`.
2015-07-02 09:19:27 +00:00
bors
f635b2f0ad Auto merge of #26722 - arielb1:log-deadlock, r=eddyb
These are RefCell deadlocks that cause the rustc task to die with the stderr
lock held, causing a real deadlock.

Fixes #26717.

r? @eddyb
2015-07-02 07:47:29 +00:00
bors
969d6caaa1 Auto merge of #26718 - nham:test-8640, r=alexcrichton
This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR https://github.com/rust-lang/rust/pull/19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.

Closes #8640.
2015-07-02 06:14:54 +00:00
bors
dd8fee0ae6 Auto merge of #26691 - nrc:mem, r=alexcrichton
Reports the resident set size after each pass (linux-only).

r? @huonw or @alexcrichton
2015-07-02 04:42:50 +00:00
Nick Howell
b51aea3256 rustdoc: Update jQuery from 2.1.0 to 2.1.4 2015-07-01 23:54:55 -04:00
bors
560b1dab15 Auto merge of #26677 - jroesch:fulfillment-context-refactor, r=nrc
This patch implements the next chunk of flattening out the type checking context. In a series of patches I moved around the necessary state and logic in order to delete the `Typer` and `ClosureTyper` traits. My next goal is to clean the interfaces and start to move the normalization code behind them.

r? @nrc I hope my PR is coherent, doing this too late at night ;)
2015-07-02 03:10:25 +00:00
Jared Roesch
c64bda3227 Update librustc_driver/test.rs 2015-07-01 19:29:17 -07:00
Alex Newman
0b7c4f57f6 Add netbsd amd64 support 2015-07-01 19:09:14 -07:00
bors
1768b1090a Auto merge of #26688 - nrc:map-parent-2, r=manishearth
r? @Manishearth
2015-07-02 01:40:28 +00:00
Remi Rampin
3278e793b2 Implement CoerceUnsized for arc::Weak 2015-07-01 17:58:05 -04:00
Remi Rampin
50421827ae Add test to dst-coerce-rc.rs 2015-07-01 17:54:54 -04:00
Nick Cameron
7713e141b7 Report memory use in time-passes
Reports the resident set size after each pass (linux-only).
2015-07-02 09:36:32 +12:00
Tshepang Lekhonkhobe
b643a0b679 doc: add missing space 2015-07-01 23:08:50 +02:00
Tshepang Lekhonkhobe
5976355b67 doc: there is just one trait in here
Also, the info is repeated in the following paragraph
2015-07-01 23:05:06 +02:00
Nick Cameron
8261599e62 Refactoring 2015-07-02 08:56:55 +12:00
Ariel Ben-Yehuda
2fc8571861 Fix deadlocks with RUST_LOG=rustc::middle::ty
These are RefCell deadlocks that cause the rustc task to die with the stderr
lock held, causing a real deadlock.

Fixes #26717.
2015-07-01 23:08:40 +03:00
Jared Roesch
ce089e50a4 Address nits 2015-07-01 13:08:25 -07:00
Remi Rampin
8bf4651e2c Implement CoerceUnsized for rc::Weak
Fixes #26704
2015-07-01 15:51:17 -04:00
bors
d2cf9f9632 Auto merge of #26658 - alexcrichton:windows-net-no-inherit, r=aturon
This was added after Windows 7 SP1, so it's not always available. Instead use
the `SetHandleInformation` function to flag a socket as not inheritable. This is
not atomic with respect to creating new processes, but it mirrors what Unix does
with respect to possibly using the atomic option in the future.

Closes #26543
2015-07-01 19:28:15 +00:00
bors
8a599c8cef Auto merge of #26034 - Gankro:deprecate-bits, r=alexcrichton
I've mirrored them out to crates (bit-vec and bit-set) that build on stable.

(not sure if this actually correctly deprecates them in std)
2015-07-01 17:55:20 +00:00
Alexis Beingessner
7850c8d0aa fallout of bitvec/bitset deprecation 2015-07-01 10:30:14 -07:00
Nick Hamann
c9c5ea7c13 Add a regression test for #8640.
This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR #19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.

Closes #8640.
2015-07-01 12:22:42 -05:00
Guillaume Gomez
28d2b39f45 Add E0277 error explanation 2015-07-01 19:15:53 +02:00
Guillaume Gomez
0ca7699837 Add examples in error explanation E0267 and E0268 2015-07-01 19:14:27 +02:00
Alex Crichton
18c39e126a msvc: Fix the link name for the lgamma
The function is apparently just called lgamma on MSVC
2015-07-01 09:35:55 -07:00
Alex Crichton
407fb293db msvc: Ignore extern-pass-empty on MSVC
The MSVC compiler doesn't like empty structs, so this test won't link on MSVC,
so it's ignored.
2015-07-01 09:35:55 -07:00
Alex Crichton
ae0eb675db msvc: Fix TLS destructors
Just like the original article our Windows TLS support is based on predicted,
this symbol must be linked in on MSVC to pull in the necessary support for TLS
variables. This commit fixes a number of unit tests which require that TLS
destructors are run.
2015-07-01 09:35:55 -07:00