Skip to content

Commit 67d70f1

Browse files
committed
---
yaml --- r: 83179 b: refs/heads/auto c: 51709fc h: refs/heads/master i: 83177: 7c5f053 83175: 097e4c0 v: v3
1 parent 8deac32 commit 67d70f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+283
-299
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 34d376f3cf234dc714fcfab7639affd3967dc16d
16+
refs/heads/auto: 51709fcedcc264056587ece3759b3b591c268d0e
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/Makefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
440440
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
441441
$$(HBIN$(1)_H_$(3))/rustpkg$$(X_$(3)) \
442442
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
443-
$$(HBIN$(1)_H_$(3))/rusti$$(X_$(3)) \
444443
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)) \
445444
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
446445
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \

branches/auto/doc/po/ja/rust.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ msgid ""
18421842
"The type parameters can also be explicitly supplied in a trailing [path]"
18431843
"(#paths) component after the function name. This might be necessary if there "
18441844
"is not sufficient context to determine the type parameters. For example, "
1845-
"`mem::size_of::<u32>() == 4`."
1845+
"`sys::size_of::<u32>() == 4`."
18461846
msgstr ""
18471847

18481848
#. type: Plain text

branches/auto/doc/po/ja/tutorial-ffi.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ msgid ""
327327
"impl<T: Send> Unique<T> {\n"
328328
" pub fn new(value: T) -> Unique<T> {\n"
329329
" unsafe {\n"
330-
" let ptr = malloc(std::mem::size_of::<T>() as size_t) as *mut T;\n"
330+
" let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;\n"
331331
" assert!(!ptr::is_null(ptr));\n"
332332
" // `*ptr` is uninitialized, and `*ptr = value` would attempt to destroy it\n"
333333
" intrinsics::move_val_init(&mut *ptr, value);\n"

branches/auto/doc/po/rust.md.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ msgid ""
18421842
"The type parameters can also be explicitly supplied in a trailing [path]"
18431843
"(#paths) component after the function name. This might be necessary if there "
18441844
"is not sufficient context to determine the type parameters. For example, "
1845-
"`mem::size_of::<u32>() == 4`."
1845+
"`sys::size_of::<u32>() == 4`."
18461846
msgstr ""
18471847

18481848
#. type: Plain text

branches/auto/doc/po/tutorial-ffi.md.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ msgid ""
327327
"impl<T: Send> Unique<T> {\n"
328328
" pub fn new(value: T) -> Unique<T> {\n"
329329
" unsafe {\n"
330-
" let ptr = malloc(std::mem::size_of::<T>() as size_t) as *mut T;\n"
330+
" let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;\n"
331331
" assert!(!ptr::is_null(ptr));\n"
332332
" // `*ptr` is uninitialized, and `*ptr = value` would attempt to destroy it\n"
333333
" intrinsics::move_val_init(&mut *ptr, value);\n"

branches/auto/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ with `int`, and require the closure parameter to have type
975975
The type parameters can also be explicitly supplied in a trailing
976976
[path](#paths) component after the function name. This might be necessary
977977
if there is not sufficient context to determine the type parameters. For
978-
example, `mem::size_of::<u32>() == 4`.
978+
example, `sys::size_of::<u32>() == 4`.
979979

980980
Since a parameter type is opaque to the generic function, the set of
981981
operations that can be performed on it is limited. Values of parameter

branches/auto/doc/tutorial-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ impl<T: Send> Unique<T> {
300300
#[inline(never)];
301301
302302
unsafe {
303-
let ptr = malloc(std::mem::size_of::<T>() as size_t) as *mut T;
303+
let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;
304304
assert!(!ptr::is_null(ptr));
305305
// `*ptr` is uninitialized, and `*ptr = value` would attempt to destroy it
306306
intrinsics::move_val_init(&mut *ptr, value);

branches/auto/src/libextra/arena.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use std::cast::{transmute, transmute_mut, transmute_mut_region};
4242
use std::cast;
4343
use std::num;
4444
use std::ptr;
45-
use std::mem;
45+
use std::sys;
4646
use std::uint;
4747
use std::vec;
4848
use std::unstable::intrinsics;
@@ -123,7 +123,7 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
123123
let (tydesc, is_done) = un_bitpack_tydesc_ptr(*tydesc_data);
124124
let (size, align) = ((*tydesc).size, (*tydesc).align);
125125

126-
let after_tydesc = idx + mem::size_of::<*TyDesc>();
126+
let after_tydesc = idx + sys::size_of::<*TyDesc>();
127127

128128
let start = round_up_to(after_tydesc, align);
129129

@@ -134,7 +134,7 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
134134
}
135135

136136
// Find where the next tydesc lives
137-
idx = round_up_to(start + size, mem::pref_align_of::<*TyDesc>());
137+
idx = round_up_to(start + size, sys::pref_align_of::<*TyDesc>());
138138
}
139139
}
140140

@@ -220,7 +220,7 @@ impl Arena {
220220
let head = transmute_mut_region(&mut self.head);
221221

222222
tydesc_start = head.fill;
223-
after_tydesc = head.fill + mem::size_of::<*TyDesc>();
223+
after_tydesc = head.fill + sys::size_of::<*TyDesc>();
224224
start = round_up_to(after_tydesc, align);
225225
end = start + n_bytes;
226226
}
@@ -230,7 +230,7 @@ impl Arena {
230230
}
231231

232232
let head = transmute_mut_region(&mut self.head);
233-
head.fill = round_up_to(end, mem::pref_align_of::<*TyDesc>());
233+
head.fill = round_up_to(end, sys::pref_align_of::<*TyDesc>());
234234

235235
//debug2!("idx = {}, size = {}, align = {}, fill = {}",
236236
// start, n_bytes, align, head.fill);

branches/auto/src/librustdoc/html/format.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,7 @@ impl fmt::Default for clean::Path {
115115
fn resolved_path(w: &mut io::Writer, id: ast::NodeId, p: &clean::Path,
116116
print_all: bool) {
117117
path(w, p, print_all,
118-
|_cache, loc| {
119-
match p.segments[0].name.as_slice() {
120-
"super" => Some("../".repeat(loc.len() - 1)),
121-
_ => Some("../".repeat(loc.len())),
122-
}
123-
},
118+
|_cache, loc| { Some("../".repeat(loc.len())) },
124119
|cache| {
125120
match cache.paths.find(&id) {
126121
None => None,

branches/auto/src/librustdoc/html/render.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ use std::rt::io::file::{FileInfo, DirectoryInfo};
4444
use std::rt::io::file;
4545
use std::rt::io;
4646
use std::rt::io::Reader;
47+
use std::os;
4748
use std::str;
4849
use std::task;
4950
use std::unstable::finally::Finally;
@@ -686,7 +687,15 @@ impl Context {
686687
Process(Context, clean::Item),
687688
}
688689
enum Progress { JobNew, JobDone }
689-
static WORKERS: int = 10;
690+
691+
let workers = match os::getenv("RUSTDOC_WORKERS") {
692+
Some(s) => {
693+
match from_str::<uint>(s) {
694+
Some(n) => n, None => fail2!("{} not a number", s)
695+
}
696+
}
697+
None => 10,
698+
};
690699

691700
let mut item = match crate.module.take() {
692701
Some(i) => i,
@@ -706,7 +715,7 @@ impl Context {
706715
// using the same channel/port. Through this, the crate is recursed on
707716
// in a hierarchical fashion, and parallelization is only achieved if
708717
// one node in the hierarchy has more than one child (very common).
709-
for i in range(0, WORKERS) {
718+
for i in range(0, workers) {
710719
let port = port.clone();
711720
let chan = chan.clone();
712721
let prog_chan = prog_chan.clone();
@@ -761,7 +770,7 @@ impl Context {
761770
if jobs == 0 { break }
762771
}
763772

764-
for _ in range(0, WORKERS) {
773+
for _ in range(0, workers) {
765774
chan.send(Die);
766775
}
767776
}

branches/auto/src/libstd/at_vec.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use clone::Clone;
1414
use container::Container;
1515
use iter::Iterator;
1616
use option::{Option, Some, None};
17-
use mem;
17+
use sys;
1818
use unstable::raw::Repr;
1919
use vec::{ImmutableVector, OwnedVector};
2020

@@ -26,7 +26,7 @@ use vec::{ImmutableVector, OwnedVector};
2626
pub fn capacity<T>(v: @[T]) -> uint {
2727
unsafe {
2828
let box = v.repr();
29-
(*box).data.alloc / mem::size_of::<T>()
29+
(*box).data.alloc / sys::size_of::<T>()
3030
}
3131
}
3232

@@ -160,7 +160,7 @@ pub mod raw {
160160
use cast::{transmute, transmute_copy};
161161
use libc;
162162
use ptr;
163-
use mem;
163+
use sys;
164164
use uint;
165165
use unstable::intrinsics::{move_val_init, TyDesc};
166166
use unstable::intrinsics;
@@ -176,7 +176,7 @@ pub mod raw {
176176
#[inline]
177177
pub unsafe fn set_len<T>(v: &mut @[T], new_len: uint) {
178178
let repr: *mut Box<Vec<T>> = cast::transmute_copy(v);
179-
(*repr).data.fill = new_len * mem::size_of::<T>();
179+
(*repr).data.fill = new_len * sys::size_of::<T>();
180180
}
181181

182182
/**
@@ -199,7 +199,7 @@ pub mod raw {
199199
unsafe fn push_fast<T>(v: &mut @[T], initval: T) {
200200
let repr: *mut Box<Vec<T>> = cast::transmute_copy(v);
201201
let amt = v.len();
202-
(*repr).data.fill += mem::size_of::<T>();
202+
(*repr).data.fill += sys::size_of::<T>();
203203
let p = ptr::offset(&(*repr).data.data as *T, amt as int) as *mut T;
204204
move_val_init(&mut(*p), initval);
205205
}
@@ -236,7 +236,7 @@ pub mod raw {
236236
unsafe {
237237
if n > (**ptr).data.alloc / (*ty).size {
238238
let alloc = n * (*ty).size;
239-
let total_size = alloc + mem::size_of::<Vec<()>>();
239+
let total_size = alloc + sys::size_of::<Vec<()>>();
240240
if alloc / (*ty).size != n || total_size < alloc {
241241
fail2!("vector size is too large: {}", n);
242242
}

branches/auto/src/libstd/cast.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Unsafe casting functions
1212
1313
use ptr::RawPtr;
14-
use mem;
14+
use sys;
1515
use unstable::intrinsics;
1616

1717
/// Casts the value at `src` to U. The two types must have the same length.
@@ -21,7 +21,7 @@ pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
2121
let mut dest: U = intrinsics::uninit();
2222
let dest_ptr: *mut u8 = transmute(&mut dest);
2323
let src_ptr: *u8 = transmute(src);
24-
intrinsics::memcpy32(dest_ptr, src_ptr, mem::size_of::<U>() as u32);
24+
intrinsics::memcpy32(dest_ptr, src_ptr, sys::size_of::<U>() as u32);
2525
dest
2626
}
2727

@@ -32,7 +32,7 @@ pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
3232
let mut dest: U = intrinsics::uninit();
3333
let dest_ptr: *mut u8 = transmute(&mut dest);
3434
let src_ptr: *u8 = transmute(src);
35-
intrinsics::memcpy64(dest_ptr, src_ptr, mem::size_of::<U>() as u64);
35+
intrinsics::memcpy64(dest_ptr, src_ptr, sys::size_of::<U>() as u64);
3636
dest
3737
}
3838

branches/auto/src/libstd/cleanup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn debug_mem() -> bool {
6868
/// Destroys all managed memory (i.e. @ boxes) held by the current task.
6969
pub unsafe fn annihilate() {
7070
use rt::local_heap::local_free;
71-
use mem;
71+
use sys;
7272
use managed;
7373

7474
let mut stats = AnnihilateStats {
@@ -115,7 +115,7 @@ pub unsafe fn annihilate() {
115115
if !uniq {
116116
stats.n_bytes_freed +=
117117
(*((*box).type_desc)).size
118-
+ mem::size_of::<raw::Box<()>>();
118+
+ sys::size_of::<raw::Box<()>>();
119119
local_free(box as *i8);
120120
}
121121
true

0 commit comments

Comments
 (0)