Skip to content

Commit 40b016b

Browse files
committed
---
yaml --- r: 152779 b: refs/heads/try2 c: 87f3741 h: refs/heads/master i: 152777: f8cb647 152775: 0190563 v: v3
1 parent a553cfe commit 40b016b

File tree

106 files changed

+2129
-1140
lines changed

Some content is hidden

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

106 files changed

+2129
-1140
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: 85467b6b41e4294f3956a425535a3245904625f0
8+
refs/heads/try2: 87f3741fdf6356d57d22f8154cf6069a83dec8d7
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: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,36 @@ CFG_RUN_TARG_arm-unknown-linux-gnueabi=$(call CFG_RUN_arm-unknown-linux-gnueabi,
374374
RUSTC_FLAGS_arm-unknown-linux-gnueabi :=
375375
RUSTC_CROSS_FLAGS_arm-unknown-linux-gnueabi :=
376376

377+
# mipsel-linux configuration
378+
CC_mipsel-linux=mipsel-linux-gcc
379+
CXX_mipsel-linux=mipsel-linux-g++
380+
CPP_mipsel-linux=mipsel-linux-gcc
381+
AR_mipsel-linux=mipsel-linux-ar
382+
CFG_LIB_NAME_mipsel-linux=lib$(1).so
383+
CFG_STATIC_LIB_NAME_mipsel-linux=lib$(1).a
384+
CFG_LIB_GLOB_mipsel-linux=lib$(1)-*.so
385+
CFG_LIB_DSYM_GLOB_mipsel-linux=lib$(1)-*.dylib.dSYM
386+
CFG_CFLAGS_mipsel-linux := -mips32 -mabi=32 $(CFLAGS)
387+
CFG_GCCISH_CFLAGS_mipsel-linux := -Wall -g -fPIC -mips32 -mabi=32 $(CFLAGS)
388+
CFG_GCCISH_CXXFLAGS_mipsel-linux := -fno-rtti $(CXXFLAGS)
389+
CFG_GCCISH_LINK_FLAGS_mipsel-linux := -shared -fPIC -g -mips32
390+
CFG_GCCISH_DEF_FLAG_mipsel-linux := -Wl,--export-dynamic,--dynamic-list=
391+
CFG_GCCISH_PRE_LIB_FLAGS_mipsel-linux := -Wl,-whole-archive
392+
CFG_GCCISH_POST_LIB_FLAGS_mipsel-linux := -Wl,-no-whole-archive
393+
CFG_DEF_SUFFIX_mipsel-linux := .linux.def
394+
CFG_LLC_FLAGS_mipsel-linux :=
395+
CFG_INSTALL_NAME_mipsel-linux =
396+
CFG_LIBUV_LINK_FLAGS_mipsel-linux =
397+
CFG_EXE_SUFFIX_mipsel-linux :=
398+
CFG_WINDOWSY_mipsel-linux :=
399+
CFG_UNIXY_mipsel-linux := 1
400+
CFG_PATH_MUNGE_mipsel-linux := true
401+
CFG_LDPATH_mipsel-linux :=
402+
CFG_RUN_mipsel-linux=
403+
CFG_RUN_TARG_mipsel-linux=
404+
RUSTC_FLAGS_mipsel-linux := -C target-cpu=mips32 -C target-feature="+mips32,+o32"
405+
406+
377407
# mips-unknown-linux-gnu configuration
378408
CC_mips-unknown-linux-gnu=mips-linux-gnu-gcc
379409
CXX_mips-unknown-linux-gnu=mips-linux-gnu-g++
@@ -612,7 +642,7 @@ define CFG_MAKE_TOOLCHAIN
612642
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
613643
$$(call CFG_INSTALL_NAME_$(1),$$(4))
614644

615-
ifeq ($$(findstring $(HOST_$(1)),arm mips),)
645+
ifeq ($$(findstring $(HOST_$(1)),arm mips mipsel),)
616646

617647
# We're using llvm-mc as our assembler because it supports
618648
# .cfi pseudo-ops on mac

branches/try2/src/doc/guide-unsafe.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ in the same format as a C:
451451

452452
```
453453
#![no_std]
454+
#![feature(lang_items)]
454455
455456
// Pull in the system libc library for what crt0.o likely requires
456457
extern crate libc;
@@ -477,6 +478,7 @@ compiler's name mangling too:
477478
```ignore
478479
#![no_std]
479480
#![no_main]
481+
#![feature(lang_items)]
480482
481483
extern crate libc;
482484
@@ -528,6 +530,7 @@ vectors provided from C, using idiomatic Rust practices.
528530
```
529531
#![no_std]
530532
#![feature(globs)]
533+
#![feature(lang_items)]
531534
532535
# extern crate libc;
533536
extern crate core;
@@ -619,6 +622,9 @@ perform efficient pointer arithmetic, one would import those functions
619622
via a declaration like
620623

621624
```
625+
# #![feature(intrinsics)]
626+
# fn main() {}
627+
622628
extern "rust-intrinsic" {
623629
fn transmute<T, U>(x: T) -> U;
624630
@@ -647,6 +653,7 @@ sugar for dynamic allocations via `malloc` and `free`:
647653

648654
```
649655
#![no_std]
656+
#![feature(lang_items)]
650657
651658
extern crate libc;
652659

branches/try2/src/doc/rust.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ block_comment_body : [block_comment | character] * ;
160160
line_comment : "//" non_eol * ;
161161
~~~~
162162

163-
Comments in Rust code follow the general C++ style of line and block-comment forms.
163+
Comments in Rust code follow the general C++ style of line and block-comment forms.
164164
Nested block comments are supported.
165165

166166
Line comments beginning with exactly _three_ slashes (`///`), and block
@@ -3004,7 +3004,7 @@ ten_times(|j| println!("hello, {}", j));
30043004
### While loops
30053005

30063006
~~~~ {.ebnf .gram}
3007-
while_expr : "while" expr '{' block '}' ;
3007+
while_expr : "while" no_struct_literal_expr '{' block '}' ;
30083008
~~~~
30093009

30103010
A `while` loop begins by evaluating the boolean loop conditional expression.
@@ -3071,7 +3071,7 @@ A `continue` expression is only permitted in the body of a loop.
30713071
### For expressions
30723072

30733073
~~~~ {.ebnf .gram}
3074-
for_expr : "for" pat "in" expr '{' block '}' ;
3074+
for_expr : "for" pat "in" no_struct_literal_expr '{' block '}' ;
30753075
~~~~
30763076

30773077
A `for` expression is a syntactic construct for looping over elements
@@ -3105,7 +3105,7 @@ for i in range(0u, 256) {
31053105
### If expressions
31063106

31073107
~~~~ {.ebnf .gram}
3108-
if_expr : "if" expr '{' block '}'
3108+
if_expr : "if" no_struct_literal_expr '{' block '}'
31093109
else_tail ? ;
31103110
31113111
else_tail : "else" [ if_expr
@@ -3126,7 +3126,7 @@ then any `else` block is executed.
31263126
### Match expressions
31273127

31283128
~~~~ {.ebnf .gram}
3129-
match_expr : "match" expr '{' match_arm * '}' ;
3129+
match_expr : "match" no_struct_literal_expr '{' match_arm * '}' ;
31303130
31313131
match_arm : attribute * match_pat "=>" [ expr "," | '{' block '}' ] ;
31323132
@@ -3563,10 +3563,11 @@ There are four varieties of pointer in Rust:
35633563

35643564
* Raw pointers (`*`)
35653565
: Raw pointers are pointers without safety or liveness guarantees.
3566-
Raw pointers are written `*content`,
3567-
for example `*int` means a raw pointer to an integer.
3568-
Copying or dropping a raw pointer has no effect on the lifecycle of any other value.
3569-
Dereferencing a raw pointer or converting it to any other pointer type is an [`unsafe` operation](#unsafe-functions).
3566+
Raw pointers are written as `*const T` or `*mut T`,
3567+
for example `*const int` means a raw pointer to an integer.
3568+
Copying or dropping a raw pointer has no effect on the lifecycle of any
3569+
other value. Dereferencing a raw pointer or converting it to any other
3570+
pointer type is an [`unsafe` operation](#unsafe-functions).
35703571
Raw pointers are generally discouraged in Rust code;
35713572
they exist to support interoperability with foreign code,
35723573
and writing performance-critical or low-level functions.

branches/try2/src/doc/tutorial.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,7 +2522,7 @@ fn sendable_foo(f: Box<Foo + Send>) { /* ... */ }
25222522
fn shareable_bar<T: Share>(b: &Bar<T> + Share) { /* ... */ }
25232523
~~~
25242524

2525-
When no colon is specified (such as the type `~Foo`), it is inferred that the
2525+
When no colon is specified (such as the type `Box<Foo>`), it is inferred that the
25262526
value ascribes to no bounds. They must be added manually if any bounds are
25272527
necessary for usage.
25282528

@@ -2579,17 +2579,18 @@ fn radius_times_area<T: Circle>(c: T) -> f64 {
25792579

25802580
Likewise, supertrait methods may also be called on trait objects.
25812581

2582-
~~~ {.ignore}
2582+
~~~
25832583
use std::f64::consts::PI;
25842584
# trait Shape { fn area(&self) -> f64; }
25852585
# trait Circle : Shape { fn radius(&self) -> f64; }
25862586
# struct Point { x: f64, y: f64 }
25872587
# struct CircleStruct { center: Point, radius: f64 }
25882588
# impl Circle for CircleStruct { fn radius(&self) -> f64 { (self.area() / PI).sqrt() } }
25892589
# impl Shape for CircleStruct { fn area(&self) -> f64 { PI * square(self.radius) } }
2590+
# fn square(x: f64) -> f64 { x * x }
25902591
2591-
let concrete = ~CircleStruct{center:Point{x:3.0,y:4.0},radius:5.0};
2592-
let mycircle: ~Circle = concrete as ~Circle;
2592+
let concrete = box CircleStruct{center:Point{x:3.0,y:4.0},radius:5.0};
2593+
let mycircle: Box<Circle> = concrete as Box<Circle>;
25932594
let nonsense = mycircle.radius() * mycircle.area();
25942595
~~~
25952596

branches/try2/src/etc/2014-06-rewrite-bytes-macros.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/env python
1+
#!/usr/bin/env python
22
#
33
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
44
# file at the top-level directory of this distribution and at

branches/try2/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ syn keyword rustKeyword unsafe virtual while
3030
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
3131
" FIXME: Scoped impl's name is also fallen in this category
3232
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
33-
syn keyword rustStorage mut ref static
34-
syn keyword rustObsoleteStorage const
33+
syn keyword rustStorage mut ref static const
3534

3635
syn keyword rustInvalidBareKeyword crate
3736

branches/try2/src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
html_root_url = "http://doc.rust-lang.org/")]
7070

7171
#![no_std]
72-
#![feature(phase, unsafe_destructor)]
72+
#![feature(lang_items, phase, unsafe_destructor)]
7373
#![allow(unknown_features)] // NOTE: remove after a stage0 snap
7474

7575
#[phase(plugin, link)]

branches/try2/src/libarena/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
#![feature(unsafe_destructor)]
3232
#![allow(missing_doc)]
33-
#![allow(unknown_features)] // NOTE: remove after a stage0 snap
3433

3534
use std::cell::{Cell, RefCell};
3635
use std::cmp;

branches/try2/src/libcollections/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#![feature(macro_rules, managed_boxes, default_type_params, phase, globs)]
2525
#![feature(unsafe_destructor)]
2626
#![no_std]
27-
#![allow(unknown_features)] // NOTE: remove after a stage0 snap
2827

2928
#[phase(plugin, link)] extern crate core;
3029
extern crate alloc;

branches/try2/src/libcore/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@
5555
html_playground_url = "http://play.rust-lang.org/")]
5656

5757
#![no_std]
58-
#![feature(globs, macro_rules, managed_boxes, phase, simd, unsafe_destructor)]
58+
#![feature(globs, intrinsics, lang_items, macro_rules, managed_boxes, phase)]
59+
#![feature(simd, unsafe_destructor)]
5960
#![deny(missing_doc)]
60-
#![allow(unknown_features)] // NOTE: remove after a stage0 snap
61+
#![allow(unknown_features)] // NOTE: remove after stage0 snapshot
6162

6263
#[cfg(test)] extern crate realcore = "core";
6364
#[cfg(test)] extern crate libc;

branches/try2/src/libcore/mem.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ mod tests {
404404
#[cfg(target_arch = "x86")]
405405
#[cfg(target_arch = "arm")]
406406
#[cfg(target_arch = "mips")]
407+
#[cfg(target_arch = "mipsel")]
407408
fn size_of_32() {
408409
assert_eq!(size_of::<uint>(), 4u);
409410
assert_eq!(size_of::<*uint>(), 4u);
@@ -435,6 +436,7 @@ mod tests {
435436
#[cfg(target_arch = "x86")]
436437
#[cfg(target_arch = "arm")]
437438
#[cfg(target_arch = "mips")]
439+
#[cfg(target_arch = "mipsel")]
438440
fn align_of_32() {
439441
assert_eq!(align_of::<uint>(), 4u);
440442
assert_eq!(align_of::<*uint>(), 4u);

branches/try2/src/libgreen/context.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,15 @@ fn initialize_call_frame(regs: &mut Registers, fptr: InitFn, arg: uint,
268268
}
269269

270270
#[cfg(target_arch = "mips")]
271+
#[cfg(target_arch = "mipsel")]
271272
type Registers = [uint, ..32];
272273

273274
#[cfg(target_arch = "mips")]
275+
#[cfg(target_arch = "mipsel")]
274276
fn new_regs() -> Box<Registers> { box {[0, .. 32]} }
275277

276278
#[cfg(target_arch = "mips")]
279+
#[cfg(target_arch = "mipsel")]
277280
fn initialize_call_frame(regs: &mut Registers, fptr: InitFn, arg: uint,
278281
procedure: raw::Procedure, sp: *mut uint) {
279282
let sp = align_down(sp);

branches/try2/src/liblibc/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ pub mod types {
463463
#[cfg(target_arch = "x86")]
464464
#[cfg(target_arch = "arm")]
465465
#[cfg(target_arch = "mips")]
466+
#[cfg(target_arch = "mipsel")]
466467
pub mod arch {
467468
pub mod c95 {
468469
pub type c_char = i8;
@@ -491,6 +492,7 @@ pub mod types {
491492
}
492493
#[cfg(target_arch = "x86")]
493494
#[cfg(target_arch = "mips")]
495+
#[cfg(target_arch = "mipsel")]
494496
pub mod posix88 {
495497
pub type off_t = i32;
496498
pub type dev_t = u64;
@@ -599,6 +601,7 @@ pub mod types {
599601
}
600602
}
601603
#[cfg(target_arch = "mips")]
604+
#[cfg(target_arch = "mipsel")]
602605
pub mod posix01 {
603606
use types::os::arch::c95::{c_long, c_ulong, time_t};
604607
use types::os::arch::posix88::{gid_t, ino_t};
@@ -2209,6 +2212,7 @@ pub mod consts {
22092212
}
22102213

22112214
#[cfg(target_arch = "mips")]
2215+
#[cfg(target_arch = "mipsel")]
22122216
pub mod posix88 {
22132217
use types::os::arch::c95::c_int;
22142218
use types::common::c95::c_void;
@@ -2483,6 +2487,7 @@ pub mod consts {
24832487
pub static PTHREAD_STACK_MIN: size_t = 16384;
24842488

24852489
#[cfg(target_arch = "mips", target_os = "linux")]
2490+
#[cfg(target_arch = "mipsel", target_os = "linux")]
24862491
pub static PTHREAD_STACK_MIN: size_t = 131072;
24872492

24882493
pub static CLOCK_REALTIME: c_int = 0;
@@ -2536,6 +2541,7 @@ pub mod consts {
25362541
pub static SHUT_RDWR: c_int = 2;
25372542
}
25382543
#[cfg(target_arch = "mips")]
2544+
#[cfg(target_arch = "mipsel")]
25392545
pub mod bsd44 {
25402546
use types::os::arch::c95::c_int;
25412547

@@ -2604,6 +2610,7 @@ pub mod consts {
26042610
pub static MAP_STACK : c_int = 0x020000;
26052611
}
26062612
#[cfg(target_arch = "mips")]
2613+
#[cfg(target_arch = "mipsel")]
26072614
pub mod extra {
26082615
use types::os::arch::c95::c_int;
26092616

@@ -2976,6 +2983,7 @@ pub mod consts {
29762983
pub static PTHREAD_STACK_MIN: size_t = 4096;
29772984

29782985
#[cfg(target_arch = "mips")]
2986+
#[cfg(target_arch = "mipsel")]
29792987
#[cfg(target_arch = "x86")]
29802988
#[cfg(target_arch = "x86_64")]
29812989
pub static PTHREAD_STACK_MIN: size_t = 2048;

branches/try2/src/libnative/io/c_unix.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,26 @@ use libc;
2323
#[cfg(target_os = "ios")]
2424
#[cfg(target_os = "freebsd")]
2525
pub static FIONBIO: libc::c_ulong = 0x8004667e;
26-
#[cfg(target_os = "linux", not(target_arch = "mips"))]
26+
#[cfg(target_os = "linux", target_arch = "x86")]
27+
#[cfg(target_os = "linux", target_arch = "x86_64")]
28+
#[cfg(target_os = "linux", target_arch = "arm")]
2729
#[cfg(target_os = "android")]
2830
pub static FIONBIO: libc::c_ulong = 0x5421;
2931
#[cfg(target_os = "linux", target_arch = "mips")]
32+
#[cfg(target_os = "linux", target_arch = "mipsel")]
3033
pub static FIONBIO: libc::c_ulong = 0x667e;
3134

3235
#[cfg(target_os = "macos")]
3336
#[cfg(target_os = "ios")]
3437
#[cfg(target_os = "freebsd")]
3538
pub static FIOCLEX: libc::c_ulong = 0x20006601;
36-
#[cfg(target_os = "linux", not(target_arch = "mips"))]
39+
#[cfg(target_os = "linux", target_arch = "x86")]
40+
#[cfg(target_os = "linux", target_arch = "x86_64")]
41+
#[cfg(target_os = "linux", target_arch = "arm")]
3742
#[cfg(target_os = "android")]
3843
pub static FIOCLEX: libc::c_ulong = 0x5451;
3944
#[cfg(target_os = "linux", target_arch = "mips")]
45+
#[cfg(target_os = "linux", target_arch = "mipsel")]
4046
pub static FIOCLEX: libc::c_ulong = 0x6601;
4147

4248
#[cfg(target_os = "macos")]
@@ -109,7 +115,9 @@ mod select {
109115
}
110116
}
111117

112-
#[cfg(target_os = "linux", not(target_arch = "mips"))]
118+
#[cfg(target_os = "linux", target_arch = "x86")]
119+
#[cfg(target_os = "linux", target_arch = "x86_64")]
120+
#[cfg(target_os = "linux", target_arch = "arm")]
113121
#[cfg(target_os = "android")]
114122
mod signal {
115123
use libc;
@@ -153,6 +161,7 @@ mod signal {
153161
}
154162

155163
#[cfg(target_os = "linux", target_arch = "mips")]
164+
#[cfg(target_os = "linux", target_arch = "mipsel")]
156165
mod signal {
157166
use libc;
158167

0 commit comments

Comments
 (0)