Skip to content

Commit 4d459e5

Browse files
committed
---
yaml --- r: 72124 b: refs/heads/dist-snap c: f903ae9 h: refs/heads/master v: v3
1 parent 0adf2c2 commit 4d459e5

File tree

18 files changed

+619
-70
lines changed

18 files changed

+619
-70
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 1a36b0f17ef0b59411981fdd25ac9ce4ba7e20e0
10+
refs/heads/dist-snap: f903ae9e72ec02539373da22fd4d025422af7554
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libcore/libc.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,8 +1109,10 @@ pub mod funcs {
11091109
// Omitted: putc, putchar (might be macros).
11101110
unsafe fn puts(s: *c_char) -> c_int;
11111111
unsafe fn ungetc(c: c_int, stream: *FILE) -> c_int;
1112+
#[fast_ffi]
11121113
unsafe fn fread(ptr: *mut c_void, size: size_t,
11131114
nobj: size_t, stream: *FILE) -> size_t;
1115+
#[fast_ffi]
11141116
unsafe fn fwrite(ptr: *c_void, size: size_t,
11151117
nobj: size_t, stream: *FILE) -> size_t;
11161118
unsafe fn fseek(stream: *FILE, offset: c_long,
@@ -1144,9 +1146,13 @@ pub mod funcs {
11441146
-> c_long;
11451147
unsafe fn strtoul(s: *c_char, endp: **c_char, base: c_int)
11461148
-> c_ulong;
1149+
#[fast_ffi]
11471150
unsafe fn calloc(nobj: size_t, size: size_t) -> *c_void;
1151+
#[fast_ffi]
11481152
unsafe fn malloc(size: size_t) -> *c_void;
1153+
#[fast_ffi]
11491154
unsafe fn realloc(p: *c_void, size: size_t) -> *c_void;
1155+
#[fast_ffi]
11501156
unsafe fn free(p: *c_void);
11511157
unsafe fn abort() -> !;
11521158
unsafe fn exit(status: c_int) -> !;
@@ -1340,6 +1346,7 @@ pub mod funcs {
13401346
textmode: c_int) -> c_int;
13411347

13421348
#[link_name = "_read"]
1349+
#[fast_ffi]
13431350
unsafe fn read(fd: c_int, buf: *mut c_void, count: c_uint)
13441351
-> c_int;
13451352

@@ -1350,6 +1357,7 @@ pub mod funcs {
13501357
unsafe fn unlink(c: *c_char) -> c_int;
13511358

13521359
#[link_name = "_write"]
1360+
#[fast_ffi]
13531361
unsafe fn write(fd: c_int, buf: *c_void, count: c_uint)
13541362
-> c_int;
13551363
}
@@ -1502,6 +1510,7 @@ pub mod funcs {
15021510
unsafe fn pathconf(path: *c_char, name: c_int) -> c_long;
15031511
unsafe fn pause() -> c_int;
15041512
unsafe fn pipe(fds: *mut c_int) -> c_int;
1513+
#[fast_ffi]
15051514
unsafe fn read(fd: c_int, buf: *mut c_void,
15061515
count: size_t) -> ssize_t;
15071516
unsafe fn rmdir(path: *c_char) -> c_int;
@@ -1514,6 +1523,7 @@ pub mod funcs {
15141523
unsafe fn tcgetpgrp(fd: c_int) -> pid_t;
15151524
unsafe fn ttyname(fd: c_int) -> *c_char;
15161525
unsafe fn unlink(c: *c_char) -> c_int;
1526+
#[fast_ffi]
15171527
unsafe fn write(fd: c_int, buf: *c_void, count: size_t)
15181528
-> ssize_t;
15191529
}

branches/dist-snap/src/libcore/unstable/lang.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ pub mod rustrt {
3535

3636
#[rust_stack]
3737
unsafe fn rust_upcall_free(ptr: *c_char);
38+
39+
#[fast_ffi]
40+
unsafe fn rust_upcall_malloc_noswitch(td: *c_char,
41+
size: uintptr_t)
42+
-> *c_char;
43+
44+
#[fast_ffi]
45+
unsafe fn rust_upcall_free_noswitch(ptr: *c_char);
3846
}
3947
}
4048

@@ -81,7 +89,7 @@ pub unsafe fn exchange_free(ptr: *c_char) {
8189
#[lang="malloc"]
8290
#[inline(always)]
8391
pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
84-
return rustrt::rust_upcall_malloc(td, size);
92+
return rustrt::rust_upcall_malloc_noswitch(td, size);
8593
}
8694

8795
// NB: Calls to free CANNOT be allowed to fail, as throwing an exception from
@@ -90,7 +98,7 @@ pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
9098
#[lang="free"]
9199
#[inline(always)]
92100
pub unsafe fn local_free(ptr: *c_char) {
93-
rustrt::rust_upcall_free(ptr);
101+
rustrt::rust_upcall_free_noswitch(ptr);
94102
}
95103

96104
#[lang="borrow_as_imm"]

branches/dist-snap/src/libcore/vec.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ pub mod rustrt {
4343
pub extern {
4444
// These names are terrible. reserve_shared applies
4545
// to ~[] and reserve_shared_actual applies to @[].
46+
#[fast_ffi]
4647
unsafe fn vec_reserve_shared(++t: *sys::TypeDesc,
4748
++v: **raw::VecRepr,
4849
++n: libc::size_t);
50+
#[fast_ffi]
4951
unsafe fn vec_reserve_shared_actual(++t: *sys::TypeDesc,
5052
++v: **raw::VecRepr,
5153
++n: libc::size_t);

branches/dist-snap/src/librustc/driver/driver.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,13 @@ pub enum compile_upto {
172172

173173
// For continuing compilation after a parsed crate has been
174174
// modified
175-
pub fn compile_rest(sess: Session, cfg: ast::crate_cfg,
176-
upto: compile_upto, outputs: Option<@OutputFilenames>,
175+
#[fixed_stack_segment]
176+
pub fn compile_rest(sess: Session,
177+
cfg: ast::crate_cfg,
178+
upto: compile_upto,
179+
outputs: Option<@OutputFilenames>,
177180
curr: Option<@ast::crate>)
178-
-> (@ast::crate, Option<ty::ctxt>) {
181+
-> (@ast::crate, Option<ty::ctxt>) {
179182
let time_passes = sess.time_passes();
180183
let mut crate = curr.get();
181184

0 commit comments

Comments
 (0)