Skip to content

Commit faf1971

Browse files
committed
---
yaml --- r: 44815 b: refs/heads/master c: 2f858de h: refs/heads/master i: 44813: cb52c7f 44811: 1c14ef8 44807: df0646b 44799: f781b7c v: v3
1 parent b8ede29 commit faf1971

Some content is hidden

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

48 files changed

+765
-1123
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d0a12347dec3045eaf8dcded7add914d4491276f
2+
refs/heads/master: 2f858de1c39f3fd8bdc77a6517e12a6458c54f03
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/src/libcore/cleanup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ fn debug_mem() -> bool {
154154
#[cfg(notest)]
155155
#[lang="annihilate"]
156156
pub unsafe fn annihilate() {
157-
use rt::rt_free;
157+
use rt::local_free;
158158
use io::WriterUtil;
159159
use io;
160160
use libc;
@@ -192,7 +192,7 @@ pub unsafe fn annihilate() {
192192
stats.n_bytes_freed +=
193193
(*((*box).header.type_desc)).size
194194
+ sys::size_of::<BoxRepr>();
195-
rt_free(transmute(box));
195+
local_free(transmute(box));
196196
}
197197
}
198198

trunk/src/libcore/rt.rs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,60 +36,54 @@ pub extern mod rustrt {
3636
unsafe fn rust_upcall_free(ptr: *c_char);
3737
}
3838

39-
#[rt(fail_)]
4039
#[lang="fail_"]
41-
pub fn rt_fail_(expr: *c_char, file: *c_char, line: size_t) -> ! {
40+
pub fn fail_(expr: *c_char, file: *c_char, line: size_t) -> ! {
4241
sys::begin_unwind_(expr, file, line);
4342
}
4443

45-
#[rt(fail_bounds_check)]
4644
#[lang="fail_bounds_check"]
47-
pub unsafe fn rt_fail_bounds_check(file: *c_char, line: size_t,
48-
index: size_t, len: size_t) {
45+
pub unsafe fn fail_bounds_check(file: *c_char, line: size_t,
46+
index: size_t, len: size_t) {
4947
let msg = fmt!("index out of bounds: the len is %d but the index is %d",
5048
len as int, index as int);
5149
do str::as_buf(msg) |p, _len| {
52-
rt_fail_(p as *c_char, file, line);
50+
fail_(p as *c_char, file, line);
5351
}
5452
}
5553

56-
pub unsafe fn rt_fail_borrowed() {
54+
pub unsafe fn fail_borrowed() {
5755
let msg = "borrowed";
5856
do str::as_buf(msg) |msg_p, _| {
5957
do str::as_buf("???") |file_p, _| {
60-
rt_fail_(msg_p as *c_char, file_p as *c_char, 0);
58+
fail_(msg_p as *c_char, file_p as *c_char, 0);
6159
}
6260
}
6361
}
6462

6563
// FIXME #4942: Make these signatures agree with exchange_alloc's signatures
66-
#[rt(exchange_malloc)]
6764
#[lang="exchange_malloc"]
68-
pub unsafe fn rt_exchange_malloc(td: *c_char, size: uintptr_t) -> *c_char {
65+
pub unsafe fn exchange_malloc(td: *c_char, size: uintptr_t) -> *c_char {
6966
transmute(exchange_alloc::malloc(transmute(td), transmute(size)))
7067
}
7168

7269
// NB: Calls to free CANNOT be allowed to fail, as throwing an exception from
7370
// inside a landing pad may corrupt the state of the exception handler. If a
7471
// problem occurs, call exit instead.
75-
#[rt(exchange_free)]
7672
#[lang="exchange_free"]
77-
pub unsafe fn rt_exchange_free(ptr: *c_char) {
73+
pub unsafe fn exchange_free(ptr: *c_char) {
7874
exchange_alloc::free(transmute(ptr))
7975
}
8076

81-
#[rt(malloc)]
8277
#[lang="malloc"]
83-
pub unsafe fn rt_malloc(td: *c_char, size: uintptr_t) -> *c_char {
78+
pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
8479
return rustrt::rust_upcall_malloc(td, size);
8580
}
8681

8782
// NB: Calls to free CANNOT be allowed to fail, as throwing an exception from
8883
// inside a landing pad may corrupt the state of the exception handler. If a
8984
// problem occurs, call exit instead.
90-
#[rt(free)]
9185
#[lang="free"]
92-
pub unsafe fn rt_free(ptr: *c_char) {
86+
pub unsafe fn local_free(ptr: *c_char) {
9387
rustrt::rust_upcall_free(ptr);
9488
}
9589

@@ -112,7 +106,7 @@ pub unsafe fn return_to_mut(a: *u8) {
112106
pub unsafe fn check_not_borrowed(a: *u8) {
113107
let a: *mut BoxRepr = transmute(a);
114108
if ((*a).header.ref_count & FROZEN_BIT) != 0 {
115-
rt_fail_borrowed();
109+
fail_borrowed();
116110
}
117111
}
118112

trunk/src/librustc/front/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,14 @@ fn is_bench_fn(i: @ast::item) -> bool {
200200
vec::len(attr::find_attrs_by_name(i.attrs, ~"bench")) > 0u;
201201

202202
fn has_test_signature(i: @ast::item) -> bool {
203-
match i.node {
204-
ast::item_fn(ref decl, _, ref generics, _) => {
203+
match /*bad*/copy i.node {
204+
ast::item_fn(decl, _, tps, _) => {
205205
let input_cnt = vec::len(decl.inputs);
206206
let no_output = match decl.output.node {
207207
ast::ty_nil => true,
208208
_ => false
209209
};
210-
let tparm_cnt = generics.ty_params.len();
210+
let tparm_cnt = vec::len(tps);
211211
// NB: inadequate check, but we're running
212212
// well before resolve, can't get too deep.
213213
input_cnt == 1u

0 commit comments

Comments
 (0)