Skip to content

Commit 6ca016d

Browse files
committed
---
yaml --- r: 47564 b: refs/heads/try c: fd271ad h: refs/heads/master v: v3
1 parent f6071b8 commit 6ca016d

File tree

24 files changed

+839
-641
lines changed

24 files changed

+839
-641
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3bbcac322669cff3abde5be937cc4ec3860f3985
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
5-
refs/heads/try: ceeccf8aeafbae7387c5b69743ff0ca8bfe86dd7
5+
refs/heads/try: fd271adc75799435a920f1afaa0488e43badc749
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ CFG_PATH_MUNGE_arm-unknown-android := true
239239
CFG_LDPATH_arm-unknown-android :=
240240
CFG_RUN_arm-unknown-android=
241241
CFG_RUN_TARG_arm-unknown-android=
242-
RUSTC_FLAGS_arm-unknown-android :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
242+
RUSTC_FLAGS_arm-unknown-android :=--android-cross-path='$(CFG_ANDROID_CROSS_PATH)'
243243

244244
# i686-pc-mingw32 configuration
245245
CC_i686-pc-mingw32=$(CC)

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
408408
--rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
409409
--aux-base $$(S)src/test/auxiliary/ \
410410
--stage-id stage$(1)-$(2) \
411-
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CFG_RUSTC_FLAGS) --target=$(2)" \
411+
--rustcflags "$$(CFG_RUSTC_FLAGS) --target=$(2)" \
412412
$$(CTEST_TESTARGS)
413413

414414
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)

branches/try/src/libcore/at_vec.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,18 @@ use vec;
2323
/// Code for dealing with @-vectors. This is pretty incomplete, and
2424
/// contains a bunch of duplication from the code for ~-vectors.
2525
26-
#[abi = "cdecl"]
27-
pub extern mod rustrt {
28-
pub unsafe fn vec_reserve_shared_actual(++t: *sys::TypeDesc,
29-
++v: **vec::raw::VecRepr,
30-
++n: libc::size_t);
26+
pub mod rustrt {
27+
use libc;
28+
use sys;
29+
use vec;
30+
31+
#[abi = "cdecl"]
32+
#[link_name = "rustrt"]
33+
pub extern {
34+
pub unsafe fn vec_reserve_shared_actual(++t: *sys::TypeDesc,
35+
++v: **vec::raw::VecRepr,
36+
++n: libc::size_t);
37+
}
3138
}
3239

3340
/// Returns the number of elements the vector can hold without reallocating

branches/try/src/libcore/cast.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[abi = "rust-intrinsic"]
12-
extern mod rusti {
13-
fn forget<T>(-x: T);
14-
fn reinterpret_cast<T, U>(&&e: T) -> U;
11+
pub mod rusti {
12+
#[abi = "rust-intrinsic"]
13+
#[link_name = "rusti"]
14+
pub extern {
15+
fn forget<T>(-x: T);
16+
fn reinterpret_cast<T, U>(&&e: T) -> U;
17+
}
1518
}
1619

1720
/// Casts the value at `src` to U. The two types must have the same length.

branches/try/src/libcore/cleanup.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,14 @@ pub unsafe fn annihilate() {
218218
}
219219

220220
/// Bindings to the runtime
221-
extern mod rustrt {
222-
#[rust_stack]
223-
// FIXME (#4386): Unable to make following method private.
224-
pub unsafe fn rust_get_task() -> *c_void;
221+
pub mod rustrt {
222+
use libc::c_void;
223+
224+
#[link_name = "rustrt"]
225+
pub extern {
226+
#[rust_stack]
227+
// FIXME (#4386): Unable to make following method private.
228+
pub unsafe fn rust_get_task() -> *c_void;
229+
}
225230
}
226231

branches/try/src/libcore/flate.rs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@ use vec;
2121

2222
#[cfg(test)] use rand;
2323

24-
extern mod rustrt {
25-
unsafe fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
26-
src_buf_len: size_t,
27-
pout_len: *size_t,
28-
flags: c_int) -> *c_void;
24+
pub mod rustrt {
25+
use libc::{c_int, c_void, size_t};
2926

30-
unsafe fn tinfl_decompress_mem_to_heap(psrc_buf: *const c_void,
31-
src_buf_len: size_t,
32-
pout_len: *size_t,
33-
flags: c_int) -> *c_void;
27+
#[link_name = "rustrt"]
28+
pub extern {
29+
unsafe fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
30+
src_buf_len: size_t,
31+
pout_len: *size_t,
32+
flags: c_int)
33+
-> *c_void;
34+
35+
unsafe fn tinfl_decompress_mem_to_heap(psrc_buf: *const c_void,
36+
src_buf_len: size_t,
37+
pout_len: *size_t,
38+
flags: c_int)
39+
-> *c_void;
40+
}
3441
}
3542

3643
const lz_none : c_int = 0x0; // Huffman-coding only.

branches/try/src/libcore/gc.rs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,30 @@ use sys;
4848
pub use stackwalk::Word;
4949

5050
// Mirrors rust_stack.h stk_seg
51-
struct StackSegment {
51+
pub struct StackSegment {
5252
prev: *StackSegment,
5353
next: *StackSegment,
5454
end: uintptr_t,
5555
// And other fields which we don't care about...
5656
}
5757

58-
extern mod rustrt {
59-
#[rust_stack]
60-
pub unsafe fn rust_call_tydesc_glue(root: *Word,
61-
tydesc: *Word,
62-
field: size_t);
58+
pub mod rustrt {
59+
use libc::size_t;
60+
use stackwalk::Word;
61+
use super::StackSegment;
6362

64-
#[rust_stack]
65-
pub unsafe fn rust_gc_metadata() -> *Word;
63+
#[link_name = "rustrt"]
64+
pub extern {
65+
#[rust_stack]
66+
pub unsafe fn rust_call_tydesc_glue(root: *Word,
67+
tydesc: *Word,
68+
field: size_t);
6669

67-
pub unsafe fn rust_get_stack_segment() -> *StackSegment;
70+
#[rust_stack]
71+
pub unsafe fn rust_gc_metadata() -> *Word;
72+
73+
pub unsafe fn rust_get_stack_segment() -> *StackSegment;
74+
}
6875
}
6976

7077
unsafe fn bump<T, U>(ptr: *T, count: uint) -> *U {

branches/try/src/libcore/io.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,16 @@ use vec;
3232
#[allow(non_camel_case_types)] // not sure what to do about this
3333
pub type fd_t = c_int;
3434

35-
#[abi = "cdecl"]
36-
extern mod rustrt {
37-
unsafe fn rust_get_stdin() -> *libc::FILE;
38-
unsafe fn rust_get_stdout() -> *libc::FILE;
39-
unsafe fn rust_get_stderr() -> *libc::FILE;
35+
pub mod rustrt {
36+
use libc;
37+
38+
#[abi = "cdecl"]
39+
#[link_name = "rustrt"]
40+
pub extern {
41+
unsafe fn rust_get_stdin() -> *libc::FILE;
42+
unsafe fn rust_get_stdout() -> *libc::FILE;
43+
unsafe fn rust_get_stderr() -> *libc::FILE;
44+
}
4045
}
4146

4247
// Reading

0 commit comments

Comments
 (0)