Skip to content

Commit 0e3c885

Browse files
committed
---
yaml --- r: 7360 b: refs/heads/master c: e631df3 h: refs/heads/master v: v3
1 parent dc74fe0 commit 0e3c885

File tree

20 files changed

+389
-972
lines changed

20 files changed

+389
-972
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: ba41342279a7949d746f9de0d7211efc5070929a
2+
refs/heads/master: e631df3429a3edbb8baf27a7a4ba157e08ebded4

trunk/configure

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,6 @@ then
363363
err "either clang or gcc is required"
364364
fi
365365

366-
if [ ! -z "$CFG_PERF" ]
367-
then
368-
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
369-
if [ -z "$HAVE_PERF_LOGFD" ];
370-
then
371-
CFG_PERF_WITH_LOGFD=1
372-
putvar CFG_PERF_WITH_LOGFD
373-
fi
374-
fi
375-
376366
step_msg "making directories"
377367

378368
for i in \

trunk/mk/platform.mk

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ ifneq ($(findstring linux,$(CFG_OSTYPE)),)
5858
CFG_LDENV := LD_LIBRARY_PATH
5959
CFG_DEF_SUFFIX := .linux.def
6060
ifdef CFG_PERF
61-
ifneq ($(CFG_PERF_WITH_LOGFD),)
62-
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3 --log-fd 2
63-
else
64-
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3
65-
endif
61+
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3
6662
else
6763
ifdef CFG_VALGRIND
6864
CFG_PERF_TOOL :=\

trunk/src/comp/front/attr.rs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ export get_meta_item_name;
2020
export get_meta_item_value_str;
2121
export get_meta_item_value_str_by_name;
2222
export get_meta_item_list;
23-
export meta_item_value_from_list;
24-
export meta_item_list_from_list;
25-
export name_value_str_pair;
2623
export mk_name_value_item_str;
2724
export mk_name_value_item;
2825
export mk_list_item;
@@ -220,53 +217,6 @@ fn native_abi(attrs: [ast::attribute]) -> either::t<str, ast::native_abi> {
220217
};
221218
}
222219

223-
fn meta_item_from_list(
224-
items: [@ast::meta_item],
225-
name: str
226-
) -> option<@ast::meta_item> {
227-
let items = attr::find_meta_items_by_name(items, name);
228-
vec::last(items)
229-
}
230-
231-
fn meta_item_value_from_list(
232-
items: [@ast::meta_item],
233-
name: str
234-
) -> option<str> {
235-
alt meta_item_from_list(items, name) {
236-
some(item) {
237-
alt attr::get_meta_item_value_str(item) {
238-
some(value) { some(value) }
239-
none. { none }
240-
}
241-
}
242-
none. { none }
243-
}
244-
}
245-
246-
fn meta_item_list_from_list(
247-
items: [@ast::meta_item],
248-
name: str
249-
) -> option<[@ast::meta_item]> {
250-
alt meta_item_from_list(items, name) {
251-
some(item) {
252-
attr::get_meta_item_list(item)
253-
}
254-
none. { none }
255-
}
256-
}
257-
258-
fn name_value_str_pair(
259-
item: @ast::meta_item
260-
) -> option<(str, str)> {
261-
alt attr::get_meta_item_value_str(item) {
262-
some(value) {
263-
let name = attr::get_meta_item_name(item);
264-
some((name, value))
265-
}
266-
none. { none }
267-
}
268-
}
269-
270220
fn span<T: copy>(item: T) -> ast::spanned<T> {
271221
ret {node: item, span: ast_util::dummy_sp()};
272222
}

trunk/src/libcore/box.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
/*
2-
Module: box
3-
*/
4-
5-
61
export ptr_eq;
72

8-
/*
9-
Function: ptr_eq
10-
11-
Determine if two shared boxes point to the same object
12-
*/
3+
#[doc(
4+
brief = "Determine if two shared boxes point to the same object"
5+
)]
136
pure fn ptr_eq<T>(a: @T, b: @T) -> bool {
147
// FIXME: ptr::addr_of
158
unsafe {

trunk/src/libcore/char.rs

Lines changed: 40 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
/*
2-
Module: char
3-
4-
Utilities for manipulating the char type
5-
*/
1+
#[doc = "Utilities for manipulating the char type"];
62

73
/*
84
Lu Uppercase_Letter an uppercase letter
@@ -47,50 +43,40 @@ import is_alphabetic = unicode::derived_property::Alphabetic;
4743
import is_XID_start = unicode::derived_property::XID_Start;
4844
import is_XID_continue = unicode::derived_property::XID_Continue;
4945

50-
/*
51-
Function: is_lowercase
5246

53-
Indicates whether a character is in lower case, defined in terms of the
54-
Unicode General Category 'Ll'.
55-
*/
47+
#[doc(
48+
brief = "Indicates whether a character is in lower case, defined \
49+
in terms of the Unicode General Category 'Ll'."
50+
)]
5651
pure fn is_lowercase(c: char) -> bool {
5752
ret unicode::general_category::Ll(c);
5853
}
5954

60-
/*
61-
Function: is_uppercase
62-
63-
Indicates whether a character is in upper case, defined in terms of the
64-
Unicode General Category 'Lu'.
65-
*/
55+
#[doc(
56+
brief = "Indicates whether a character is in upper case, defined \
57+
in terms of the Unicode General Category 'Lu'."
58+
)]
6659
pure fn is_uppercase(c: char) -> bool {
6760
ret unicode::general_category::Lu(c);
6861
}
6962

70-
/*
71-
Function: is_whitespace
72-
73-
Indicates whether a character is whitespace, defined in terms of
74-
the Unicode General Categories 'Zs', 'Zl', 'Zp' and the additional
75-
'Cc'-category control codes in the range [0x09, 0x0d].
76-
77-
*/
63+
#[doc(
64+
brief = "Indicates whether a character is whitespace, defined in \
65+
terms of the Unicode General Categories 'Zs', 'Zl', 'Zp' \
66+
additional 'Cc'-category control codes in the range [0x09, 0x0d]"
67+
)]
7868
pure fn is_whitespace(c: char) -> bool {
7969
ret ('\x09' <= c && c <= '\x0d')
8070
|| unicode::general_category::Zs(c)
8171
|| unicode::general_category::Zl(c)
8272
|| unicode::general_category::Zp(c);
8373
}
8474

85-
/*
86-
Function: is_alphanumeric
87-
88-
Indicates whether a character is alphanumeric, defined in terms of
89-
the Unicode General Categories 'Nd', 'Nl', 'No' and the Derived
90-
Core Property 'Alphabetic'.
91-
92-
*/
93-
75+
#[doc(
76+
brief = "Indicates whether a character is alphanumeric, defined \
77+
in terms of the Unicode General Categories 'Nd', \
78+
'Nl', 'No' and the Derived Core Property 'Alphabetic'."
79+
)]
9480
pure fn is_alphanumeric(c: char) -> bool {
9581
ret unicode::derived_property::Alphabetic(c) ||
9682
unicode::general_category::Nd(c) ||
@@ -99,34 +85,24 @@ pure fn is_alphanumeric(c: char) -> bool {
9985
}
10086

10187

102-
/*
103-
Function: to_digit
104-
105-
Convert a char to the corresponding digit.
106-
107-
Parameters:
108-
c - a char, either '0' to '9', 'a' to 'z' or 'A' to 'Z'
109-
110-
Returns:
111-
If `c` is between '0' and '9', the corresponding value between 0 and 9.
112-
If `c` is 'a' or 'A', 10. If `c` is 'b' or 'B', 11, etc.
113-
114-
Safety note:
115-
This function fails if `c` is not a valid char
116-
*/
88+
#[doc(
89+
brief = "Convert a char to the corresponding digit. \
90+
Safety note: This function fails if `c` is not a valid char",
91+
return = "If `c` is between '0' and '9', the corresponding value \
92+
between 0 and 9. If `c` is 'a' or 'A', 10. If `c` is \
93+
'b' or 'B', 11, etc."
94+
)]
11795
pure fn to_digit(c: char) -> u8 unsafe {
11896
alt maybe_digit(c) {
11997
option::some(x) { x }
12098
option::none. { fail; }
12199
}
122100
}
123101

124-
/*
125-
Function: maybe_digit
126-
127-
Convert a char to the corresponding digit. Returns none when the
128-
character is not a valid hexadecimal digit.
129-
*/
102+
#[doc(
103+
brief = "Convert a char to the corresponding digit. Returns none when \
104+
character is not a valid hexadecimal digit."
105+
)]
130106
pure fn maybe_digit(c: char) -> option::t<u8> {
131107
alt c {
132108
'0' to '9' { option::some(c as u8 - ('0' as u8)) }
@@ -137,12 +113,11 @@ pure fn maybe_digit(c: char) -> option::t<u8> {
137113
}
138114

139115
/*
140-
Function: to_lower
141-
142-
Convert a char to the corresponding lower case.
143-
144116
FIXME: works only on ASCII
145117
*/
118+
#[doc(
119+
brief = "Convert a char to the corresponding lower case."
120+
)]
146121
pure fn to_lower(c: char) -> char {
147122
alt c {
148123
'A' to 'Z' { ((c as u8) + 32u8) as char }
@@ -151,31 +126,22 @@ pure fn to_lower(c: char) -> char {
151126
}
152127

153128
/*
154-
Function: to_upper
155-
156-
Convert a char to the corresponding upper case.
157-
158129
FIXME: works only on ASCII
159130
*/
131+
#[doc(
132+
brief = "Convert a char to the corresponding upper case."
133+
)]
160134
pure fn to_upper(c: char) -> char {
161135
alt c {
162136
'a' to 'z' { ((c as u8) - 32u8) as char }
163137
_ { c }
164138
}
165139
}
166140

167-
/*
168-
Function: cmp
169-
170-
Compare two chars.
171-
172-
Parameters:
173-
a - a char
174-
b - a char
175-
176-
Returns:
177-
-1 if a<b, 0 if a==b, +1 if a>b
178-
*/
141+
#[doc(
142+
brief = "Compare two chars.",
143+
return = "-1 if a&lt;b, 0 if a==b, +1 if a>b"
144+
)]
179145
pure fn cmp(a: char, b: char) -> int {
180146
ret if b > a { -1 }
181147
else if b < a { 1 }

0 commit comments

Comments
 (0)