Commit Graph

18555 Commits

Author SHA1 Message Date
Brian Anderson
84d2695921 std::rt: Work around a dynamic borrowck bug 2013-06-10 17:46:49 -07:00
Brian Anderson
d4de99aa6c std::rt: Fix a race in the UvRemoteCallback dtor 2013-06-06 17:53:13 -07:00
Brian Anderson
d6ccc6bc99 std::rt: Fix stream test to be parallel 2013-06-06 17:53:13 -07:00
Brian Anderson
8afec77cb0 std::rt: Configure test threads with RUST_TEST_THREADS. Default is ncores x2 2013-06-06 17:53:13 -07:00
Brian Anderson
f9a5005f52 rt: Add rust_get_num_cpus 2013-06-06 17:53:13 -07:00
Brian Anderson
80849e78a8 std: Fix stage0 build
Conflicts:
	src/libstd/rt/comm.rs
2013-06-06 17:53:13 -07:00
Brian Anderson
ece38b3c7e core::rt: Add MegaPipe, an unbounded, multiple producer/consumer, lock-free queue 2013-06-05 22:07:40 -07:00
Brian Anderson
51d257fd9a core::rt: Add SharedPort 2013-06-05 22:07:40 -07:00
Brian Anderson
422f663a98 core::rt: Implement SharedChan 2013-06-05 22:07:39 -07:00
Brian Anderson
1507df87cc std::rt: Remove in incorrect assert 2013-06-05 21:38:58 -07:00
Brian Anderson
f7e242ab8a std::rt: Destroy the task start closure while in task context 2013-06-05 21:38:58 -07:00
Brian Anderson
2e6d51f9ce std::rt: Use AtomicUint instead of intrinsics in comm 2013-06-05 21:38:48 -07:00
Brian Anderson
e2bedb1b86 core: Make atomic methods public 2013-06-05 21:35:39 -07:00
Brian Anderson
ea633b42ae core::rt: deny(unused_imports, unused_mut, unused_variable) 2013-05-30 13:20:17 -07:00
Brian Anderson
053b38e7e1 core::rt: Fix two multithreading bugs and add a threadring test
This properly distributes the load now
2013-05-30 00:18:49 -07:00
Brian Anderson
8eb358bb00 core::rt: Begin recording scheduler metrics 2013-05-30 00:18:07 -07:00
Brian Anderson
ca2eebd5dd core::rt: Add some notes about optimizations 2013-05-29 21:03:21 -07:00
Brian Anderson
f4ed554ddb Merge remote-tracking branch 'brson/io' into incoming
Conflicts:
	src/libstd/rt/sched.rs
2013-05-29 18:22:28 -07:00
Brian Anderson
134bb0f3ee core::rt: Change the signature of context switching methods to avoid infinite recursion 2013-05-29 17:52:00 -07:00
Brian Anderson
f343e6172b core::rt: Fix an infinite recursion bug 2013-05-29 17:25:29 -07:00
Brian Anderson
a373dad74d core::rt: Outline the full multithreaded scheduling algo. Implement sleeping 2013-05-29 17:00:05 -07:00
Brian Anderson
5043ea269d core::rt: Add run_in_mt_newsched_task test function 2013-05-29 16:06:10 -07:00
bors
bd30285c84 auto merge of #6813 : pnkfelix/rust/fsk-issue-6805-ccache-support, r=catamorphism
Fix #6805: add --enable-ccache configure option to prefix compiler invocations with `ccache` to attempt to reuse common results, e.g. for LLVM (re)builds.

The information at developer [Note-ccache](../../wiki/Note-ccache) and at [ccache and clang concerns](http://petereisentraut.blogspot.fr/2011/09/ccache-and-clang-part-2.html) were what drove my introduction of the `-Qunused-arguments` and `CCACHE_CPP2` options.  (Though I did confirm first-hand that at least the first really is necessary.)

Yes, one certainly can re-route how `gcc` and `clang` are resolved in one's PATH and use that as a way to invoke `ccache`.  But I personally do not want to introduce that change to my own PATH, and this seems like a small enough change that it does not hurt to add it, at least for now.  (I don't know what form it would take when we move over to `rustpkg`.)
2013-05-29 15:10:42 -07:00
Felix S. Klock II
2b083373e4 Fix #6805: add --enable-ccache configure option to prefix compiler invocations with ccache to attempt to reuse common results, e.g. for LLVM (re)builds. 2013-05-29 23:18:09 +02:00
Brian Anderson
ed8c3594bc core::rt: Add SleeperList to Scheduler 2013-05-29 14:09:01 -07:00
bors
35655a0fb3 auto merge of #6803 : Thiez/rust/native_fmax_fmin, r=brson
Calls to the libc versions of fmin and fmax were relatively slow (perhaps because they could not be inlined?). This pull request provides f32 and f64 with fmin and fmax written in Rust, and shows a significant speed increase on my system; I used https://github.com/thiez/rustray as my benchmark, with --opt-level 3 it brings the ray-tracing time down from 10.8 seconds to about 9.2, which seemed significant to me.

r?
2013-05-29 13:29:06 -07:00
bors
d2957091c4 auto merge of #6733 : alexcrichton/rust/issue-2400, r=brson
Most of the relevant information can be found in the commit messages.

r? @brson - I just wanted to make sure the make changes aren't completely bogus

This would close #2400, #6517, and #6489 (although a run through incoming-full on linux would have to confirm the latter two)
2013-05-29 12:13:49 -07:00
Matthijs Hofstra
3141acf674 Changed to a more efficient implementation. 2013-05-29 20:21:04 +02:00
bors
562069c12f auto merge of #6800 : june0cho/rust/issue5984, r=pcwalton
Fix #5984.
Resolve the problem which exists in #6780.
2013-05-29 10:55:53 -07:00
Matthijs Hofstra
6cc9a26a2d Replaced calls to external fmin/fmax by a Rust implementation. 2013-05-29 18:26:50 +02:00
bors
a037fa4da3 auto merge of #6796 : sfackler/rust/FromBase64-type-fix, r=bstrie
Previously, FromBase64 was only implemented on ~[u8] and ~str when
any pointer would do. The implementations of FromBase64 are now
consistent with the implementations of ToBase64.
2013-05-29 08:49:53 -07:00
bors
844b5cff36 auto merge of #6794 : thestinger/rust/align_zero, r=pcwalton
This is unlikely to alter optimized codegen much but there's no point in downgrading the known alignment to 1.
2013-05-29 07:32:06 -07:00
bors
e3e55c5c04 auto merge of #6793 : graydon/rust/drop-ast-before-llvm, r=Aatch 2013-05-29 00:52:47 -07:00
bors
149960e0cf auto merge of #6789 : luqmana/rust/compiletest-fix, r=thestinger
Can be removed after a snapshot I believe.
2013-05-28 23:34:48 -07:00
june0cho
14d59af0a3 Fix vec::mut_slice 2013-05-29 15:04:34 +09:00
bors
d80642b519 auto merge of #6784 : nikomatsakis/rust/moves-into-borrowck, r=pcwalton
Move the computation of what data is moved out of `liveness` and into `borrowck`. The resulting code is cleaner, since before we had a split distribution of responsibilities, and also this avoids having multiple implementations of the dataflow code. Liveness is still used to report warnings about useless writes. This will go away when we get the control-flow graph code landed (working on that).

Also adds borrow checker documentation.

Fixes #4384.
Required to support once fns and to properly fix closures (#2202).
First step to generalize our treatment of moves somewhat as well.
2013-05-28 22:16:50 -07:00
bors
e946b4fa3f auto merge of #6778 : Aatch/rust/pass-refactor, r=graydon
Refactor the optimization passes to explicitly use the passes. This commit just re-implements the same passes as were already being run.

It also adds an option (behind `-Z`) to run the LLVM lint pass on the unoptimized IR.

This should close #2812. It is also the first step towards #2396

----------------

This is pretty much just an initial "get it out there" PR. With finer control over the optimization passes coming later. I also just blindly copied the passes we were already doing, so there could almost certainly be some more work in paring it down.

The other thing is the addition of the `mergefunctions` pass, which is currently enabled at `--opt-level=3` and does have a small impact on the code size. However the fact that it is at the end of the optimization pipeline is probably not ideal, so some more experimentation is in order.
2013-05-28 21:01:53 -07:00
James Miller
4ad0b8ac58 Remove extraneous defs from export file 2013-05-29 15:15:42 +12:00
bors
e0d6486ed6 auto merge of #6780 : june0cho/rust/issue5984, r=brson
Fix #5984. Also, I found a problem on type inference and left a comment.
2013-05-28 19:58:52 -07:00
Alex Crichton
ba33472f9f Un-ignore rusti/rustpkg tests on i686 2013-05-28 21:23:42 -05:00
Alex Crichton
ff86830c9c Define rustc's host triple at compile time
This way a cross-compiled rustc's answer to host_triple() is correct. The return
value of host_triple() reflects the actual host triple that the compiler was
build for, not the triple the compiler is being built on
2013-05-28 21:23:42 -05:00
James Miller
6861d542a2 Remove now-unused import 2013-05-29 14:16:49 +12:00
James Miller
998e2ce4ff Remove passes that were causing bad optmizations 2013-05-29 14:16:49 +12:00
James Miller
4988c89e86 Move the initial dead prototype removal pass 2013-05-29 14:16:49 +12:00
James Miller
a5b87d71e0 Fix pass creation typo 2013-05-29 14:16:49 +12:00
James Miller
d694e283b3 Refactor optimization pass handling.
Refactor the optimization passes to explicitly use the passes. This commit
just re-implements the same passes as were already being run.

It also adds an option (behind `-Z`) to run the LLVM lint pass on the
unoptimized IR.
2013-05-29 14:16:49 +12:00
Steven Fackler
b1e7d49b11 Generalized implementation of FromBase64
Previously, FromBase64 was only implemented on ~[u8] and ~str when
any pointer would do. The implementations of FromBase64 are now
consistent with the implementations of ToBase64.
2013-05-28 18:41:05 -07:00
Brian Anderson
dec9db10da core::rt: Add SleeperList
Just a simple place to stuff handles to sleeping schedulers.
2013-05-28 18:39:52 -07:00
bors
c8c60f063f auto merge of #6740 : Aatch/rust/atomic-types, r=brson
This is a follow up to #6732. Makes everything a little more sound.

r? @brson
2013-05-28 18:34:51 -07:00
bors
e3d0c1eb0e auto merge of #6731 : thomaslee/rust/issue-6575, r=pcwalton
Fix for #6575. In the trans phase, rustc emits code for a function parameter that goes completely unused in the event the return type of the function in question happens to be an immediate.

This patch modifies rustc & parts of rustrt to ensure that the vestigial parameter is no longer present in compiled code.
2013-05-28 17:37:57 -07:00