Skip to content

Commit 6ae3eed

Browse files
committed
---
yaml --- r: 83183 b: refs/heads/auto c: 82f5f65 h: refs/heads/master i: 83181: e650c48 83179: 67d70f1 83175: 097e4c0 83167: 6c836a8 v: v3
1 parent 3ee5a57 commit 6ae3eed

File tree

6 files changed

+43
-70
lines changed

6 files changed

+43
-70
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 737413d72a714e55ff53e591e8190b490c194a53
16+
refs/heads/auto: 82f5f65076e604ec70a6e09cdbe8dddb8b3b7c44
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 22 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<keyword>u64</keyword>
8686
<keyword>f32</keyword>
8787
<keyword>f64</keyword>
88+
<keyword>float</keyword>
8889
<keyword>char</keyword>
8990
<keyword>str</keyword>
9091
<keyword>Either</keyword>
@@ -204,36 +205,16 @@
204205
</include>
205206
</context>
206207

207-
<define-regex id="int_suffix" extended="true">
208-
(i8|i16|i32|i64|i|u8|u16|u32|u64|u)
209-
</define-regex>
210-
211-
<define-regex id="exponent" extended="true">
212-
([eE][+-]?[0-9_]+)
213-
</define-regex>
214-
215-
<define-regex id="float_suffix" extended="true">
216-
(\%{exponent}?(f32|f64)?)|(\.[0-9][0-9_]*\%{exponent}?)?(f32|f64)?|\.
217-
</define-regex>
218-
219-
<define-regex id="num_suffix" extended="true">
220-
\%{int_suffix}|\%{float_suffix}
221-
</define-regex>
222-
223-
<define-regex id="hex_digit" extended="true">
224-
[0-9a-fA-F]
225-
</define-regex>
226-
227208
<context id="number" style-ref="number">
228209
<match extended="true">
229-
((?&lt;=\.\.)|(?&lt;![\w\.]))
210+
(?&lt;![\w\.])
230211
(
231-
[1-9][0-9_]*\%{num_suffix}?|
232-
0[0-9_]*\%{num_suffix}?|
233-
0b[01_]+\%{int_suffix}?|
234-
0x(\%{hex_digit}|_)+\%{int_suffix}?
212+
0x[0-9a-fA-F_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?|
213+
0b[0-1_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?|
214+
[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?|
215+
[0-9][0-9_]*(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?
235216
)
236-
((?![\w\.].)|(?=\.\.))
217+
(?![\w\.])
237218
</match>
238219
</context>
239220

@@ -253,37 +234,32 @@
253234
</match>
254235
</context>
255236

256-
<define-regex id="common_escape" extended="true">
257-
'|"|
258-
\\|n|r|t|
259-
x\%{hex_digit}{2}|
260-
u\%{hex_digit}{4}|
261-
U\%{hex_digit}{8}
262-
</define-regex>
263-
264-
<context id="string_escape" style-ref="def:special-char">
265-
<match>\\\%{common_escape}</match>
266-
</context>
267-
268237
<context id="string" style-ref="string" class="string" class-disabled="no-spell-check">
269238
<start>"</start>
270239
<end>"</end>
271240
<include>
272-
<context ref="string_escape"/>
241+
<context ref="def:escape"/>
273242
<context ref="def:line-continue"/>
274243
</include>
275244
</context>
276245

277-
<context id="char" style-ref="char">
278-
<match extended="true">'([^\\']|\\\%{common_escape})'</match>
246+
<define-regex id="hex_digit" extended="true">
247+
[0-9a-fA-F]
248+
</define-regex>
249+
250+
<define-regex id="common_escape" extended="true">
251+
(n|r|t)|
252+
x\%{hex_digit}{2}|
253+
u\%{hex_digit}{4}|
254+
U\%{hex_digit}{8}
255+
</define-regex>
256+
257+
<context id="char" style-ref="char" class="char">
258+
<match extended="true">'([^\\]|\\\%{common_escape})'</match>
279259
</context>
280260

281261
<context id="attribute" style-ref="attribute" class="attribute">
282-
<start extended="true">\#\[</start>
283-
<end>\]</end>
284-
<include>
285-
<context ref="def:in-comment"/>
286-
</include>
262+
<match extended="true">\#\[[^\]]+\]</match>
287263
</context>
288264

289265
<context id="rust" class="no-spell-check">

branches/auto/src/libstd/managed.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ use ptr::to_unsafe_ptr;
1717
pub static RC_MANAGED_UNIQUE : uint = (-2) as uint;
1818
pub static RC_IMMORTAL : uint = 0x77777777;
1919

20+
/// Returns the refcount of a shared box (as just before calling this)
21+
#[inline]
22+
pub fn refcount<T>(t: @T) -> uint {
23+
use unstable::raw::Repr;
24+
unsafe { (*t.repr()).ref_count }
25+
}
26+
2027
/// Determine if two shared boxes point to the same object
2128
#[inline]
2229
pub fn ptr_eq<T>(a: @T, b: @T) -> bool {

branches/auto/src/libstd/sys.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,12 @@
1313
#[allow(missing_doc)];
1414

1515
use c_str::ToCStr;
16-
use cast;
1716
use libc::size_t;
1817
use libc;
1918
use repr;
2019
use rt::task;
2120
use str;
2221

23-
/// Returns the refcount of a shared box (as just before calling this)
24-
#[inline]
25-
pub fn refcount<T>(t: @T) -> uint {
26-
unsafe {
27-
let ref_ptr: *uint = cast::transmute_copy(&t);
28-
*ref_ptr - 1
29-
}
30-
}
31-
3222
pub fn log_str<T>(t: &T) -> ~str {
3323
use rt::io;
3424
use rt::io::Decorator;

branches/auto/src/test/run-pass/match-pattern-drop.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
enum t { make_t(@int), clam, }
1515

1616
fn foo(s: @int) {
17-
info2!("{:?}", ::std::sys::refcount(s));
18-
let count = ::std::sys::refcount(s);
17+
info2!("{:?}", ::std::managed::refcount(s));
18+
let count = ::std::managed::refcount(s);
1919
let x: t = make_t(s); // ref up
20-
assert_eq!(::std::sys::refcount(s), count + 1u);
21-
info2!("{:?}", ::std::sys::refcount(s));
20+
assert_eq!(::std::managed::refcount(s), count + 1u);
21+
info2!("{:?}", ::std::managed::refcount(s));
2222

2323
match x {
2424
make_t(y) => {
@@ -27,19 +27,19 @@ fn foo(s: @int) {
2727
}
2828
_ => { info2!("?"); fail2!(); }
2929
}
30-
info2!("{:?}", ::std::sys::refcount(s));
31-
assert_eq!(::std::sys::refcount(s), count + 1u);
32-
let _ = ::std::sys::refcount(s); // don't get bitten by last-use.
30+
info2!("{:?}", ::std::managed::refcount(s));
31+
assert_eq!(::std::managed::refcount(s), count + 1u);
32+
let _ = ::std::managed::refcount(s); // don't get bitten by last-use.
3333
}
3434

3535
pub fn main() {
3636
let s: @int = @0; // ref up
3737

38-
let count = ::std::sys::refcount(s);
38+
let count = ::std::managed::refcount(s);
3939

4040
foo(s); // ref up then down
4141

42-
info2!("{}", ::std::sys::refcount(s));
43-
let count2 = ::std::sys::refcount(s);
42+
info2!("{}", ::std::managed::refcount(s));
43+
let count2 = ::std::managed::refcount(s);
4444
assert_eq!(count, count2);
4545
}

branches/auto/src/test/run-pass/unique-copy-box.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
#[allow(unused_variable)];
1212

13-
use std::sys;
13+
use std::managed;
1414

1515
pub fn main() {
1616
let i = ~@1;
1717
let j = ~@2;
18-
let rc1 = sys::refcount(*i);
18+
let rc1 = managed::refcount(*i);
1919
let j = i.clone();
20-
let rc2 = sys::refcount(*i);
20+
let rc2 = managed::refcount(*i);
2121
error2!("rc1: {} rc2: {}", rc1, rc2);
2222
assert_eq!(rc1 + 1u, rc2);
2323
}

0 commit comments

Comments
 (0)