Eric Reed
7e022c590f
added a function to convert C's ipv4 data structure into the Rust ipv4 data structure.
2013-06-17 12:33:10 -07:00
Eric Reed
b51d1885be
Added a RtioUdpStream trait
2013-06-17 12:32:21 -07:00
Eric Reed
9687437d45
added wrappers about uv_ip{4,6}_{port,name}
2013-06-17 12:31:30 -07:00
Eric Reed
a7f92c92ed
Added a UdpWatcher and UdpSendRequest with associated callbacks
2013-06-14 12:04:11 -07:00
Eric Reed
03fe59aefa
added bindings to extract udp handle from udp send requests
2013-06-14 11:54:56 -07:00
Eric Reed
5393e43b53
Corrected libuv UDP bindings.
2013-06-13 12:51:32 -07:00
Eric Reed
39a575fb43
Added libuv UDP function bindings.
2013-06-12 16:01:50 -07:00
Eric Reed
eb11274919
Removing redundant libuv bindings
2013-06-12 14:15:44 -07:00
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
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
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
Matthijs Hofstra
3141acf674
Changed to a more efficient implementation.
2013-05-29 20:21:04 +02:00
Matthijs Hofstra
6cc9a26a2d
Replaced calls to external fmin/fmax by a Rust implementation.
2013-05-29 18:26:50 +02:00
june0cho
14d59af0a3
Fix vec::mut_slice
2013-05-29 15:04:34 +09: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
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
Alex Crichton
b04c40bb1c
Silence various warnings throughout test modules
2013-05-28 15:27:35 -05:00
bors
24784e8030
auto merge of #6771 : thestinger/rust/highlight, r=luqmana
...
This works with pandoc linked against highlighting-kate >= 0.5.3.8. It seems to just be a no-op with earlier versions, because I successfully ran this through `try`.
This also fixes some consistency issues (like making `Example`/`Examples` always a header and always using three tildes).
2013-05-28 04:02:02 -07:00
Junyoung Cho
56a2e5dc22
core::vec is missing methods for mutable slices
2013-05-28 10:29:35 +09:00
bors
dbc57584bd
auto merge of #6724 : thestinger/rust/swap_fast, r=thestinger
...
Passing higher alignment values gives the optimization passes more freedom since it can copy in larger chunks. This change results in rustc outputting the same post-optimization IR as clang for swaps and most copies excluding the lack of information about padding.
Code snippet:
```rust
#[inline(never)]
fn swap<T>(x: &mut T, y: &mut T) {
util::swap(x, y);
}
```
Original IR (for `int`):
```llvm
define internal fastcc void @_ZN9swap_283417_a71830ca3ed2d65d3_00E(i64*, i64*) #1 {
static_allocas:
%2 = icmp eq i64* %0, %1
br i1 %2, label %_ZN4util9swap_283717_a71830ca3ed2d65d3_00E.exit, label %3
; <label>:3 ; preds = %static_allocas
%4 = load i64* %0, align 1
%5 = load i64* %1, align 1
store i64 %5, i64* %0, align 1
store i64 %4, i64* %1, align 1
br label %_ZN4util9swap_283717_a71830ca3ed2d65d3_00E.exit
_ZN4util9swap_283717_a71830ca3ed2d65d3_00E.exit: ; preds = %3, %static_allocas
ret void
}
```
After #6710 :
```llvm
define internal fastcc void @_ZN9swap_283017_a71830ca3ed2d65d3_00E(i64* nocapture, i64* nocapture) #1 {
static_allocas:
%2 = load i64* %0, align 1
%3 = load i64* %1, align 1
store i64 %3, i64* %0, align 1
store i64 %2, i64* %1, align 1
ret void
}
```
After this change:
```llvm
define internal fastcc void @_ZN9swap_283017_a71830ca3ed2d65d3_00E(i64* nocapture, i64* nocapture) #1 {
static_allocas:
%2 = load i64* %0, align 8
%3 = load i64* %1, align 8
store i64 %3, i64* %0, align 8
store i64 %2, i64* %1, align 8
ret void
}
```
Another example:
```rust
#[inline(never)]
fn set<T>(x: &mut T, y: T) {
*x = y;
}
```
Before, with `(int, int)` (align 1):
```llvm
define internal fastcc void @_ZN8set_282517_8fa972e3f9e451983_00E({ i64, i64 }* nocapture, { i64, i64 }* nocapture) #1 {
static_allocas:
%2 = bitcast { i64, i64 }* %1 to i8*
%3 = bitcast { i64, i64 }* %0 to i8*
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 16, i32 1, i1 false)
ret void
}
```
After, with `(int, int)` (align 8):
```llvm
define internal fastcc void @_ZN8set_282617_8fa972e3f9e451983_00E({ i64, i64 }* nocapture, { i64, i64 }* nocapture) #1 {
static_allocas:
%2 = bitcast { i64, i64 }* %1 to i8*
%3 = bitcast { i64, i64 }* %0 to i8*
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 16, i32 8, i1 false)
ret void
}
```
2013-05-27 15:56:08 -07:00
Daniel Micay
e6c04dea03
fix casts on 32-bit
2013-05-27 18:14:00 -04:00
bors
b0f3686515
auto merge of #6703 : sanxiyn/rust/allocation-lint, r=sanxiyn
...
Fix #6145 . In particular, handle operator overloading.
2013-05-27 12:38:12 -07:00
Daniel Micay
0d5fdce82e
syntax highlight code examples in docstrings
2013-05-27 14:47:21 -04:00
Seo Sanghyeon
8f80323f09
Remove unnecessary allocations flagged by lint
2013-05-28 03:14:44 +09:00
Lindsey Kuper
beec6e4b21
Get rid of no-longer-needed #[doc(hidden)] attributes.
...
There were several old `#[doc(hidden)]` attributes in libstd and
libextra, left over from when rustdoc didn't hide private
definitions, tagged with `FIXME #3538`.
Since #3538 is now closed, I removed the `#[doc(hidden)]` attributes
as well as the FIXMEs, but I left `#[doc(hidden)]` in
libstd/task/spawn.rs and libstd/task/rt.rs since those two are
apparently `pub`, as well as in libextra/std.rc since std/extra is
`pub`.
2013-05-27 13:29:48 -04:00
bors
3941f78a1b
auto merge of #6763 : steveklabnik/rust/core_to_std, r=thestinger
...
When I submitted #6748 yesterday, I used the old name.
r? @thestinger
2013-05-27 07:08:04 -07:00
Steve Klabnik
e2fcb92a6d
Fix docs to use std instead of core.
...
When I submitted #6748 yesterday, I used the old name.
2013-05-27 08:19:57 -05:00
gareth
04a39359f8
Rename unwrap_input/unwrap_output as suggested by
...
@brson. Also fix a few documentation bugs.
2013-05-27 13:50:33 +01:00
gareth
49a1ab8745
Make test_change_working_directory change the current
...
directory to be the parent of the current-current directory,
instead of changing to the tmp directory, which was causing
issues with OS X and its /tmp => /private/tmp symlink.
2013-05-27 13:50:33 +01:00
gareth
76c31217be
Refactor core::run in order to address many of the issues
...
mentioned in #2625 .
This change makes the module more oriented around
Process values instead of having to deal with process ids
directly.
Apart from issues mentioned in #2625 , other changes include:
- Changing the naming to be more consistent - Process/process
is now used instead of a mixture of Program/program and
Process/process.
- More docs/tests.
Some io/scheduler related issues remain (mentioned in #2625 ).
2013-05-27 13:50:33 +01:00
bors
f5d4ea84f5
auto merge of #6748 : steveklabnik/rust/bool_docs, r=thestinger
...
There was some before, but now we have a big header, as well as
lots of individual bits of documentation.
2013-05-26 10:32:02 -07:00
Steve Klabnik
9bb8077c18
Add documentation for libstd/bool.rs.
...
There was some before, but now we have a big header, as well as
lots of individual bits of documentation.
2013-05-26 09:39:55 -05:00
Daniel Micay
14846613bb
inline bump_box_refcount
2013-05-26 10:26:04 -04:00
Daniel Micay
b25c520102
make transmute_copy use memcpy, and inline it
2013-05-26 10:26:04 -04:00
Daniel Micay
f6023a01d4
use uninit for cast::transmute_copy
2013-05-26 10:26:03 -04:00