Skip to content

Commit 38b0b05

Browse files
committed
---
yaml --- r: 140667 b: refs/heads/try2 c: c2bf9bf h: refs/heads/master i: 140665: d82170f 140663: 54c83c2 v: v3
1 parent a5a4820 commit 38b0b05

File tree

137 files changed

+1120
-1547
lines changed

Some content is hidden

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

137 files changed

+1120
-1547
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 6da2c989ba88dc4e6b49ddd086699404bf93916f
8+
refs/heads/try2: c2bf9bf9fed8de0c399125feba8252ad263a71fc
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,12 @@ AR_mips-unknown-linux-gnu=mips-linux-gnu-ar
247247
CFG_LIB_NAME_mips-unknown-linux-gnu=lib$(1).so
248248
CFG_LIB_GLOB_mips-unknown-linux-gnu=lib$(1)-*.so
249249
CFG_LIB_DSYM_GLOB_mips-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
250-
CFG_GCCISH_CFLAGS_mips-unknown-linux-gnu := -Wall -g -fPIC -mips32r2 -msoft-float -mabi=32
250+
CFG_GCCISH_CFLAGS_mips-unknown-linux-gnu := -Wall -g -fPIC -mips32r2 -msoft-float -mabi=32 -mno-compact-eh
251251
CFG_GCCISH_CXXFLAGS_mips-unknown-linux-gnu := -fno-rtti
252252
CFG_GCCISH_LINK_FLAGS_mips-unknown-linux-gnu := -shared -fPIC -g -mips32r2 -msoft-float -mabi=32
253253
CFG_GCCISH_DEF_FLAG_mips-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
254254
CFG_GCCISH_PRE_LIB_FLAGS_mips-unknown-linux-gnu := -Wl,-whole-archive
255-
CFG_GCCISH_POST_LIB_FLAGS_mips-unknown-linux-gnu := -Wl,-no-whole-archive -Wl,-znoexecstack
255+
CFG_GCCISH_POST_LIB_FLAGS_mips-unknown-linux-gnu := -Wl,-no-whole-archive
256256
CFG_DEF_SUFFIX_mips-unknown-linux-gnu := .linux.def
257257
CFG_INSTALL_NAME_mips-unknown-linux-gnu =
258258
CFG_LIBUV_LINK_FLAGS_mips-unknown-linux-gnu =

branches/try2/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ fn _arm_exec_compiled_test(config: config, props: TestProps,
764764
logv(config, fmt!("executing (%s) %s", config.target, cmdline));
765765
766766
// adb shell dose not forward stdout and stderr of internal result
767-
// to stdout and stderr separately but to stdout only
767+
// to stdout and stderr seperately but to stdout only
768768
let mut newargs_out = ~[];
769769
let mut newargs_err = ~[];
770770
let subargs = args.args;

branches/try2/src/libcore/at_vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn capacity<T>(v: @[T]) -> uint {
5252
* # Arguments
5353
*
5454
* * size - An initial size of the vector to reserve
55-
* * builder - A function that will construct the vector. It receives
55+
* * builder - A function that will construct the vector. It recieves
5656
* as an argument a function that will push an element
5757
* onto the vector being constructed.
5858
*/
@@ -70,7 +70,7 @@ pub fn build_sized<A>(size: uint, builder: &fn(push: &fn(v: A))) -> @[A] {
7070
*
7171
* # Arguments
7272
*
73-
* * builder - A function that will construct the vector. It receives
73+
* * builder - A function that will construct the vector. It recieves
7474
* as an argument a function that will push an element
7575
* onto the vector being constructed.
7676
*/
@@ -87,7 +87,7 @@ pub fn build<A>(builder: &fn(push: &fn(v: A))) -> @[A] {
8787
* # Arguments
8888
*
8989
* * size - An option, maybe containing initial size of the vector to reserve
90-
* * builder - A function that will construct the vector. It receives
90+
* * builder - A function that will construct the vector. It recieves
9191
* as an argument a function that will push an element
9292
* onto the vector being constructed.
9393
*/

branches/try2/src/libcore/cast.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,6 @@ pub mod rusti {
2424
}
2525

2626
/// Casts the value at `src` to U. The two types must have the same length.
27-
#[cfg(not(stage0))]
28-
pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
29-
let mut dest: U = unstable::intrinsics::uninit();
30-
{
31-
let dest_ptr: *mut u8 = rusti::transmute(&mut dest);
32-
let src_ptr: *u8 = rusti::transmute(src);
33-
unstable::intrinsics::memmove64(dest_ptr,
34-
src_ptr,
35-
sys::size_of::<U>() as u64);
36-
}
37-
dest
38-
}
39-
40-
#[cfg(stage0)]
4127
pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
4228
let mut dest: U = unstable::intrinsics::init();
4329
{

branches/try2/src/libcore/condition.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
use prelude::*;
1414
use task;
15-
use local_data::{local_data_pop, local_data_set};
15+
use task::local_data::{local_data_pop, local_data_set};
1616

1717
// helper for transmutation, shown below.
1818
type RustClosure = (int, int);
@@ -24,14 +24,14 @@ pub struct Handler<T, U> {
2424

2525
pub struct Condition<'self, T, U> {
2626
name: &'static str,
27-
key: local_data::LocalDataKey<'self, Handler<T, U>>
27+
key: task::local_data::LocalDataKey<'self, Handler<T, U>>
2828
}
2929

3030
pub impl<'self, T, U> Condition<'self, T, U> {
3131
fn trap(&'self self, h: &'self fn(T) -> U) -> Trap<'self, T, U> {
3232
unsafe {
3333
let p : *RustClosure = ::cast::transmute(&h);
34-
let prev = local_data::local_data_get(self.key);
34+
let prev = task::local_data::local_data_get(self.key);
3535
let h = @Handler { handle: *p, prev: prev };
3636
Trap { cond: self, handler: h }
3737
}

branches/try2/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ they contained the following prologue:
6060
// Don't link to core. We are core.
6161
#[no_core];
6262

63+
#[warn(vecs_implicitly_copyable)];
6364
#[deny(non_camel_case_types)];
6465
#[allow(deprecated_mutable_fields)];
6566

@@ -215,7 +216,6 @@ pub mod trie;
215216
pub mod task;
216217
pub mod comm;
217218
pub mod pipes;
218-
pub mod local_data;
219219

220220

221221
/* Runtime and platform support */

branches/try2/src/libcore/iter.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ breaking out of iteration. The adaptors in the module work with any such iterato
1717
tied to specific traits. For example:
1818
1919
~~~~
20-
println(iter::to_vec(|f| uint::range(0, 20, f)).to_str());
20+
use core::iter::iter_to_vec;
21+
println(iter_to_vec(|f| uint::range(0, 20, f)).to_str());
2122
~~~~
2223
2324
An external iterator object implementing the interface in the `iterator` module can be used as an
@@ -54,12 +55,12 @@ pub trait Times {
5455
*
5556
* ~~~
5657
* let xs = ~[1, 2, 3];
57-
* let ys = do iter::to_vec |f| { xs.each(|x| f(*x)) };
58+
* let ys = do iter_to_vec |f| { xs.each(|x| f(*x)) };
5859
* assert_eq!(xs, ys);
5960
* ~~~
6061
*/
6162
#[inline(always)]
62-
pub fn to_vec<T>(iter: &fn(f: &fn(T) -> bool)) -> ~[T] {
63+
pub fn iter_to_vec<T>(iter: &fn(f: &fn(T) -> bool)) -> ~[T] {
6364
let mut v = ~[];
6465
for iter |x| { v.push(x) }
6566
v
@@ -184,9 +185,9 @@ mod tests {
184185
use prelude::*;
185186

186187
#[test]
187-
fn test_to_vec() {
188+
fn test_iter_to_vec() {
188189
let xs = ~[1, 2, 3];
189-
let ys = do to_vec |f| { xs.each(|x| f(*x)) };
190+
let ys = do iter_to_vec |f| { xs.each(|x| f(*x)) };
190191
assert_eq!(xs, ys);
191192
}
192193

branches/try2/src/libcore/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ mod tests {
378378
#[test]
379379
fn test_counter_to_vec() {
380380
let mut it = Counter::new(0, 5).take(10);
381-
let xs = iter::to_vec(|f| it.advance(f));
381+
let xs = iter::iter_to_vec(|f| it.advance(f));
382382
assert_eq!(xs, ~[0, 5, 10, 15, 20, 25, 30, 35, 40, 45]);
383383
}
384384

branches/try2/src/libcore/libc.rs

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,17 @@ pub mod types {
268268
pub type ssize_t = i32;
269269
}
270270
pub mod posix01 {
271-
use libc::types::os::arch::c95::{c_short, c_long, time_t};
271+
use libc::types::os::arch::c95::{c_short, c_long, c_ulong, time_t};
272272
use libc::types::os::arch::posix88::{dev_t, gid_t, ino_t};
273273
use libc::types::os::arch::posix88::{mode_t, off_t};
274274
use libc::types::os::arch::posix88::{uid_t};
275275

276276
pub type nlink_t = u32;
277277
pub type blksize_t = i32;
278278
pub type blkcnt_t = i32;
279+
280+
#[cfg(target_arch = "x86")]
281+
#[cfg(target_arch = "arm")]
279282
pub struct stat {
280283
st_dev: dev_t,
281284
__pad1: c_short,
@@ -298,6 +301,30 @@ pub mod types {
298301
__unused4: c_long,
299302
__unused5: c_long,
300303
}
304+
305+
#[cfg(target_arch = "mips")]
306+
pub struct stat {
307+
st_dev: c_ulong,
308+
st_pad1: [c_long, ..3],
309+
st_ino: ino_t,
310+
st_mode: mode_t,
311+
st_nlink: nlink_t,
312+
st_uid: uid_t,
313+
st_gid: gid_t,
314+
st_rdev: c_ulong,
315+
st_pad2: [c_long, ..2],
316+
st_size: off_t,
317+
st_pad3: c_long,
318+
st_atime: time_t,
319+
st_atime_nsec: c_long,
320+
st_mtime: time_t,
321+
st_mtime_nsec: c_long,
322+
st_ctime: time_t,
323+
st_ctime_nsec: c_long,
324+
st_blksize: blksize_t,
325+
st_blocks: blkcnt_t,
326+
st_pad5: [c_long, ..14],
327+
}
301328
}
302329
pub mod posix08 {}
303330
pub mod bsd44 {}
@@ -963,6 +990,9 @@ pub mod consts {
963990
}
964991
pub mod c99 {
965992
}
993+
#[cfg(target_arch = "x86")]
994+
#[cfg(target_arch = "x86_64")]
995+
#[cfg(target_arch = "arm")]
966996
pub mod posix88 {
967997
pub static O_RDONLY : int = 0;
968998
pub static O_WRONLY : int = 1;
@@ -1007,6 +1037,51 @@ pub mod consts {
10071037
pub static SIGALRM : int = 14;
10081038
pub static SIGTERM : int = 15;
10091039
}
1040+
#[cfg(target_arch = "mips")]
1041+
pub mod posix88 {
1042+
pub static O_RDONLY : int = 0;
1043+
pub static O_WRONLY : int = 1;
1044+
pub static O_RDWR : int = 2;
1045+
pub static O_APPEND : int = 8;
1046+
pub static O_CREAT : int = 256;
1047+
pub static O_EXCL : int = 1024;
1048+
pub static O_TRUNC : int = 512;
1049+
pub static S_IFIFO : int = 4096;
1050+
pub static S_IFCHR : int = 8192;
1051+
pub static S_IFBLK : int = 24576;
1052+
pub static S_IFDIR : int = 16384;
1053+
pub static S_IFREG : int = 32768;
1054+
pub static S_IFMT : int = 61440;
1055+
pub static S_IEXEC : int = 64;
1056+
pub static S_IWRITE : int = 128;
1057+
pub static S_IREAD : int = 256;
1058+
pub static S_IRWXU : int = 448;
1059+
pub static S_IXUSR : int = 64;
1060+
pub static S_IWUSR : int = 128;
1061+
pub static S_IRUSR : int = 256;
1062+
pub static F_OK : int = 0;
1063+
pub static R_OK : int = 4;
1064+
pub static W_OK : int = 2;
1065+
pub static X_OK : int = 1;
1066+
pub static STDIN_FILENO : int = 0;
1067+
pub static STDOUT_FILENO : int = 1;
1068+
pub static STDERR_FILENO : int = 2;
1069+
pub static F_LOCK : int = 1;
1070+
pub static F_TEST : int = 3;
1071+
pub static F_TLOCK : int = 2;
1072+
pub static F_ULOCK : int = 0;
1073+
pub static SIGHUP : int = 1;
1074+
pub static SIGINT : int = 2;
1075+
pub static SIGQUIT : int = 3;
1076+
pub static SIGILL : int = 4;
1077+
pub static SIGABRT : int = 6;
1078+
pub static SIGFPE : int = 8;
1079+
pub static SIGKILL : int = 9;
1080+
pub static SIGSEGV : int = 11;
1081+
pub static SIGPIPE : int = 13;
1082+
pub static SIGALRM : int = 14;
1083+
pub static SIGTERM : int = 15;
1084+
}
10101085
pub mod posix01 {
10111086
pub static SIGTRAP : int = 5;
10121087

@@ -1026,11 +1101,20 @@ pub mod consts {
10261101
}
10271102
pub mod bsd44 {
10281103
}
1104+
#[cfg(target_arch = "x86")]
1105+
#[cfg(target_arch = "x86_64")]
1106+
#[cfg(target_arch = "arm")]
10291107
pub mod extra {
10301108
pub static O_RSYNC : int = 1052672;
10311109
pub static O_DSYNC : int = 4096;
10321110
pub static O_SYNC : int = 1052672;
10331111
}
1112+
#[cfg(target_arch = "mips")]
1113+
pub mod extra {
1114+
pub static O_RSYNC : int = 16400;
1115+
pub static O_DSYNC : int = 16;
1116+
pub static O_SYNC : int = 16400;
1117+
}
10341118
}
10351119

10361120
#[cfg(target_os = "freebsd")]

branches/try2/src/libcore/os.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ fn overridden_arg_key(_v: @OverriddenArgs) {}
12081208
12091209
pub fn args() -> ~[~str] {
12101210
unsafe {
1211-
match local_data::local_data_get(overridden_arg_key) {
1211+
match task::local_data::local_data_get(overridden_arg_key) {
12121212
None => real_args(),
12131213
Some(args) => copy args.val
12141214
}
@@ -1218,7 +1218,7 @@ pub fn args() -> ~[~str] {
12181218
pub fn set_args(new_args: ~[~str]) {
12191219
unsafe {
12201220
let overridden_args = @OverriddenArgs { val: copy new_args };
1221-
local_data::local_data_set(overridden_arg_key, overridden_args);
1221+
task::local_data::local_data_set(overridden_arg_key, overridden_args);
12221222
}
12231223
}
12241224

branches/try2/src/libcore/path.rs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ pub trait GenericPath {
122122
mod stat {
123123
#[cfg(target_arch = "x86")]
124124
#[cfg(target_arch = "arm")]
125-
#[cfg(target_arch = "mips")]
126125
pub mod arch {
127126
use libc;
128127

@@ -152,6 +151,36 @@ mod stat {
152151
}
153152
}
154153

154+
#[cfg(target_arch = "mips")]
155+
pub mod arch {
156+
use libc;
157+
158+
pub fn default_stat() -> libc::stat {
159+
libc::stat {
160+
st_dev: 0,
161+
st_pad1: [0, ..3],
162+
st_ino: 0,
163+
st_mode: 0,
164+
st_nlink: 0,
165+
st_uid: 0,
166+
st_gid: 0,
167+
st_rdev: 0,
168+
st_pad2: [0, ..2],
169+
st_size: 0,
170+
st_pad3: 0,
171+
st_atime: 0,
172+
st_atime_nsec: 0,
173+
st_mtime: 0,
174+
st_mtime_nsec: 0,
175+
st_ctime: 0,
176+
st_ctime_nsec: 0,
177+
st_blksize: 0,
178+
st_blocks: 0,
179+
st_pad5: [0, ..14],
180+
}
181+
}
182+
}
183+
155184
#[cfg(target_arch = "x86_64")]
156185
pub mod arch {
157186
use libc;

branches/try2/src/libcore/prelude.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ pub use io;
8181
pub use iter;
8282
pub use old_iter;
8383
pub use libc;
84-
pub use local_data;
8584
pub use num;
8685
pub use ops;
8786
pub use option;

branches/try2/src/libcore/rand.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,13 +836,13 @@ fn tls_rng_state(_v: @@mut IsaacRng) {}
836836
pub fn task_rng() -> @@mut IsaacRng {
837837
let r : Option<@@mut IsaacRng>;
838838
unsafe {
839-
r = local_data::local_data_get(tls_rng_state);
839+
r = task::local_data::local_data_get(tls_rng_state);
840840
}
841841
match r {
842842
None => {
843843
unsafe {
844844
let rng = @@mut IsaacRng::new_seeded(seed());
845-
local_data::local_data_set(tls_rng_state, rng);
845+
task::local_data::local_data_set(tls_rng_state, rng);
846846
rng
847847
}
848848
}

branches/try2/src/libcore/rt/io/extensions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Utility mixins that apply to all Readers and Writers
1212
1313
// XXX: Not sure how this should be structured
14-
// XXX: Iteration should probably be considered separately
14+
// XXX: Iteration should probably be considered seperately
1515

1616
pub trait ReaderUtil {
1717

0 commit comments

Comments
 (0)