Skip to content

Commit 93079e5

Browse files
committed
---
yaml --- r: 139817 b: refs/heads/try2 c: 7cd6816 h: refs/heads/master i: 139815: 13c0309 v: v3
1 parent e726777 commit 93079e5

File tree

118 files changed

+4132
-4500
lines changed

Some content is hidden

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

118 files changed

+4132
-4500
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 68dea752967fa2c7e0c4b82f476086457c93fff7
8+
refs/heads/try2: 7cd681684f96c0f59468346384f6f5c5a04a7ff5
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/AUTHORS.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Bilal Husain <[email protected]>
3131
Bill Fallon <[email protected]>
3232
Brendan Eich <[email protected]>
3333
Brendan Zabarauskas <[email protected]>
34-
Brett Cannon <[email protected]>
3534
Brian Anderson <[email protected]>
3635
Brian J. Burg <[email protected]>
3736
Brian Leibig <[email protected]>
@@ -51,7 +50,6 @@ Dave Herman <[email protected]>
5150
David Forsythe <[email protected]>
5251
David Klein <[email protected]>
5352
David Rajchenbach-Teller <[email protected]>
54-
Diggory Hardy <[email protected]>
5553
Dimitri Krassovski <[email protected]>
5654
Donovan Preston <[email protected]>
5755
Drew Willcoxon <[email protected]>
@@ -78,11 +76,9 @@ Ian D. Bollinger <[email protected]>
7876
Ilyong Cho <[email protected]>
7977
Isaac Aggrey <[email protected]>
8078
Ivano Coppola <[email protected]>
81-
Jack Moffitt <[email protected]>
8279
Jacob Harris Cryer Kragh <[email protected]>
8380
Jacob Parker <[email protected]>
8481
Jakub Wieczorek <[email protected]>
85-
James Miller <[email protected]>
8682
Jason Orendorff <[email protected]>
8783
Jed Davis <[email protected]>
8884
Jeff Balogh <[email protected]>

branches/try2/RELEASES.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
Version 0.7 (July 2013)
2-
-----------------------
3-
4-
* ??? changes, numerous bugfixes
5-
6-
* Semantic changes
7-
* The `self` parameter no longer implicitly means `&'self self`, and can be explicitly marked
8-
with a lifetime.
9-
10-
* Libraries
11-
* New `core::iterator` module for external iterator objects
12-
131
Version 0.6 (April 2013)
14-
------------------------
2+
---------------------------
153

164
* ~2100 changes, numerous bugfixes
175

branches/try2/mk/rt.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ RUNTIME_CXXS_$(1) := \
7676
rt/boxed_region.cpp \
7777
rt/arch/$$(HOST_$(1))/context.cpp \
7878
rt/arch/$$(HOST_$(1))/gpr.cpp \
79-
rt/rust_android_dummy.cpp
79+
rt/rust_android_dummy.cpp \
80+
rt/rust_test_helpers.cpp
8081

8182
RUNTIME_CS_$(1) := rt/linenoise/linenoise.c rt/linenoise/utf8.c
8283

branches/try2/src/compiletest/errors.rs

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,36 @@ pub fn load_errors(testfile: &Path) -> ~[ExpectedError] {
3030
}
3131

3232
fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
33-
let error_tag = ~"//~";
34-
let mut idx;
35-
match str::find_str(line, error_tag) {
36-
None => return ~[],
37-
Some(nn) => { idx = (nn as uint) + str::len(error_tag); }
38-
}
33+
unsafe {
34+
let error_tag = ~"//~";
35+
let mut idx;
36+
match str::find_str(line, error_tag) {
37+
None => return ~[],
38+
Some(nn) => { idx = (nn as uint) + str::len(error_tag); }
39+
}
3940

40-
// "//~^^^ kind msg" denotes a message expected
41-
// three lines above current line:
42-
let mut adjust_line = 0u;
43-
let len = str::len(line);
44-
while idx < len && line[idx] == ('^' as u8) {
45-
adjust_line += 1u;
46-
idx += 1u;
47-
}
41+
// "//~^^^ kind msg" denotes a message expected
42+
// three lines above current line:
43+
let mut adjust_line = 0u;
44+
let len = str::len(line);
45+
while idx < len && line[idx] == ('^' as u8) {
46+
adjust_line += 1u;
47+
idx += 1u;
48+
}
4849

49-
// Extract kind:
50-
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
51-
let start_kind = idx;
52-
while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
53-
let kind = str::to_lower(str::slice(line, start_kind, idx).to_owned());
50+
// Extract kind:
51+
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
52+
let start_kind = idx;
53+
while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
54+
let kind = str::to_lower(str::slice(line, start_kind, idx).to_owned());
5455

55-
// Extract msg:
56-
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
57-
let msg = str::slice(line, idx, len).to_owned();
56+
// Extract msg:
57+
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
58+
let msg = str::slice(line, idx, len).to_owned();
5859

59-
debug!("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
60+
debug!("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
6061

61-
return ~[ExpectedError{line: line_num - adjust_line, kind: kind,
62-
msg: msg}];
62+
return ~[ExpectedError{line: line_num - adjust_line, kind: kind,
63+
msg: msg}];
64+
}
6365
}

branches/try2/src/compiletest/header.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,16 @@ fn parse_name_directive(line: ~str, directive: ~str) -> bool {
171171

172172
fn parse_name_value_directive(line: ~str,
173173
directive: ~str) -> Option<~str> {
174-
let keycolon = directive + ~":";
175-
match str::find_str(line, keycolon) {
176-
Some(colon) => {
177-
let value = str::slice(line, colon + str::len(keycolon),
178-
str::len(line)).to_owned();
179-
debug!("%s: %s", directive, value);
180-
Some(value)
174+
unsafe {
175+
let keycolon = directive + ~":";
176+
match str::find_str(line, keycolon) {
177+
Some(colon) => {
178+
let value = str::slice(line, colon + str::len(keycolon),
179+
str::len(line)).to_owned();
180+
debug!("%s: %s", directive, value);
181+
Some(value)
182+
}
183+
None => None
181184
}
182-
None => None
183185
}
184186
}

branches/try2/src/etc/x86.supp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@
612612
llvm-optimization-reads-uninitialized-memory-9
613613
Memcheck:Cond
614614
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_foreign_fn*
615+
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_or_view_item*
615616
...
616617
}
617618

@@ -627,13 +628,15 @@
627628
llvm-optimization-reads-uninitialized-memory-12
628629
Memcheck:Cond
629630
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_struct*
631+
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_or_view_item*
630632
...
631633
}
632634

633635
{
634636
llvm-optimization-reads-uninitialized-memory-13
635637
Memcheck:Cond
636638
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_type*
639+
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_or_view_item*
637640
...
638641
}
639642

@@ -654,11 +657,3 @@
654657
fun:_ZN5visit30visit_struct_dtor_helper_*
655658
...
656659
}
657-
658-
{
659-
llvm-optimization-reads-uninitialized-memory-16
660-
Memcheck:Cond
661-
fun:_ZN7ast_map6map_fn*
662-
fun:_ZN5visit30visit_struct_dtor_helper*
663-
...
664-
}

branches/try2/src/libcore/at_vec.rs

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -277,49 +277,45 @@ pub mod raw {
277277
pub unsafe fn reserve_at_least<T>(v: &mut @[T], n: uint) {
278278
reserve(v, uint::next_power_of_two(n));
279279
}
280+
280281
}
281282

282-
#[cfg(test)]
283-
mod test {
284-
use super::*;
285-
use prelude::*;
286-
287-
#[test]
288-
fn test() {
289-
// Some code that could use that, then:
290-
fn seq_range(lo: uint, hi: uint) -> @[uint] {
291-
do build |push| {
292-
for uint::range(lo, hi) |i| {
293-
push(i);
294-
}
283+
#[test]
284+
pub fn test() {
285+
// Some code that could use that, then:
286+
fn seq_range(lo: uint, hi: uint) -> @[uint] {
287+
do build |push| {
288+
for uint::range(lo, hi) |i| {
289+
push(i);
295290
}
296291
}
297-
298-
assert_eq!(seq_range(10, 15), @[10, 11, 12, 13, 14]);
299-
assert!(from_fn(5, |x| x+1) == @[1, 2, 3, 4, 5]);
300-
assert!(from_elem(5, 3.14) == @[3.14, 3.14, 3.14, 3.14, 3.14]);
301292
}
302293

303-
#[test]
304-
fn append_test() {
305-
assert!(@[1,2,3] + @[4,5,6] == @[1,2,3,4,5,6]);
306-
}
294+
assert_eq!(seq_range(10, 15), @[10, 11, 12, 13, 14]);
295+
assert!(from_fn(5, |x| x+1) == @[1, 2, 3, 4, 5]);
296+
assert!(from_elem(5, 3.14) == @[3.14, 3.14, 3.14, 3.14, 3.14]);
297+
}
307298

308-
#[test]
309-
fn test_from_owned() {
310-
assert!(from_owned::<int>(~[]) == @[]);
311-
assert!(from_owned(~[true]) == @[true]);
312-
assert!(from_owned(~[1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
313-
assert!(from_owned(~[~"abc", ~"123"]) == @[~"abc", ~"123"]);
314-
assert!(from_owned(~[~[42]]) == @[~[42]]);
315-
}
299+
#[test]
300+
pub fn append_test() {
301+
assert!(@[1,2,3] + @[4,5,6] == @[1,2,3,4,5,6]);
302+
}
303+
304+
#[test]
305+
pub fn test_from_owned() {
306+
assert!(from_owned::<int>(~[]) == @[]);
307+
assert!(from_owned(~[true]) == @[true]);
308+
assert!(from_owned(~[1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
309+
assert!(from_owned(~[~"abc", ~"123"]) == @[~"abc", ~"123"]);
310+
assert!(from_owned(~[~[42]]) == @[~[42]]);
311+
}
312+
313+
#[test]
314+
pub fn test_from_slice() {
315+
assert!(from_slice::<int>([]) == @[]);
316+
assert!(from_slice([true]) == @[true]);
317+
assert!(from_slice([1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
318+
assert!(from_slice([@"abc", @"123"]) == @[@"abc", @"123"]);
319+
assert!(from_slice([@[42]]) == @[@[42]]);
320+
}
316321

317-
#[test]
318-
fn test_from_slice() {
319-
assert!(from_slice::<int>([]) == @[]);
320-
assert!(from_slice([true]) == @[true]);
321-
assert!(from_slice([1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
322-
assert!(from_slice([@"abc", @"123"]) == @[@"abc", @"123"]);
323-
assert!(from_slice([@[42]]) == @[@[42]]);
324-
}
325-
}

branches/try2/src/libcore/cast.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,16 @@ pub unsafe fn copy_lifetime_vec<'a,S,T>(_ptr: &'a [S], ptr: &T) -> &'a T {
111111
****************************************************************************/
112112

113113
#[cfg(test)]
114-
mod tests {
114+
pub mod tests {
115115
use cast::{bump_box_refcount, reinterpret_cast, transmute};
116116

117117
#[test]
118-
fn test_reinterpret_cast() {
118+
pub fn test_reinterpret_cast() {
119119
assert!(1u == unsafe { reinterpret_cast(&1) });
120120
}
121121

122122
#[test]
123-
fn test_bump_box_refcount() {
123+
pub fn test_bump_box_refcount() {
124124
unsafe {
125125
let box = @~"box box box"; // refcount 1
126126
bump_box_refcount(box); // refcount 2
@@ -135,7 +135,7 @@ mod tests {
135135
}
136136
137137
#[test]
138-
fn test_transmute() {
138+
pub fn test_transmute() {
139139
use managed::raw::BoxRepr;
140140
unsafe {
141141
let x = @100u8;
@@ -146,7 +146,7 @@ mod tests {
146146
}
147147
148148
#[test]
149-
fn test_transmute2() {
149+
pub fn test_transmute2() {
150150
unsafe {
151151
assert!(~[76u8, 0u8] == transmute(~"L"));
152152
}

branches/try2/src/libcore/comm.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,16 @@ impl<T: Owned> Peekable<T> for Port<T> {
188188
189189
#[inline(always)]
190190
fn port_peek<T:Owned>(self: &Port<T>) -> bool {
191-
let mut endp = None;
192-
endp <-> self.endp;
193-
let peek = match &endp {
194-
&Some(ref endp) => peek(endp),
195-
&None => fail!(~"peeking empty stream")
196-
};
197-
self.endp <-> endp;
198-
peek
191+
unsafe {
192+
let mut endp = None;
193+
endp <-> self.endp;
194+
let peek = match &endp {
195+
&Some(ref endp) => peek(endp),
196+
&None => fail!(~"peeking empty stream")
197+
};
198+
self.endp <-> endp;
199+
peek
200+
}
199201
}
200202
201203
impl<T: Owned> Selectable for Port<T> {
@@ -426,12 +428,12 @@ pub fn try_send_one<T: Owned>(chan: ChanOne<T>, data: T)
426428
}
427429
428430
#[cfg(test)]
429-
mod test {
431+
pub mod test {
430432
use either::Right;
431433
use super::{Chan, Port, oneshot, recv_one, stream};
432434
433435
#[test]
434-
fn test_select2() {
436+
pub fn test_select2() {
435437
let (p1, c1) = stream();
436438
let (p2, c2) = stream();
437439
@@ -446,7 +448,7 @@ mod test {
446448
}
447449

448450
#[test]
449-
fn test_oneshot() {
451+
pub fn test_oneshot() {
450452
let (c, p) = oneshot::init();
451453

452454
oneshot::client::send(c, ());

0 commit comments

Comments
 (0)