Skip to content

Commit 5c1e475

Browse files
committed
---
yaml --- r: 52199 b: refs/heads/dist-snap c: 61210e0 h: refs/heads/master i: 52197: 6afc807 52195: 8f91c8e 52191: 09c4b89 v: v3
1 parent d46e565 commit 5c1e475

File tree

3 files changed

+31
-113
lines changed

3 files changed

+31
-113
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: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 360982f24ffa306b294e61c6a4d9ec57e8a780ca
10+
refs/heads/dist-snap: 61210e01f97c304dece415c915458c3ad5db8973
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libstd/bigint.rs

Lines changed: 28 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ pub impl BigUint {
481481
}
482482
}
483483

484-
#[cfg(target_arch = "x86_64")]
485484
priv pure fn get_radix_base(radix: uint) -> (uint, uint) {
486485
assert 1 < radix && radix <= 16;
487486
match radix {
@@ -504,30 +503,6 @@ priv pure fn get_radix_base(radix: uint) -> (uint, uint) {
504503
}
505504
}
506505

507-
#[cfg(target_arch = "arm")]
508-
#[cfg(target_arch = "x86")]
509-
priv pure fn get_radix_base(radix: uint) -> (uint, uint) {
510-
assert 1 < radix && radix <= 16;
511-
match radix {
512-
2 => (65536, 16),
513-
3 => (59049, 10),
514-
4 => (65536, 8),
515-
5 => (15625, 6),
516-
6 => (46656, 6),
517-
7 => (16807, 5),
518-
8 => (32768, 5),
519-
9 => (59049, 5),
520-
10 => (10000, 4),
521-
11 => (14641, 4),
522-
12 => (20736, 4),
523-
13 => (28561, 4),
524-
14 => (38416, 4),
525-
15 => (50625, 4),
526-
16 => (65536, 4),
527-
_ => fail
528-
}
529-
}
530-
531506
/// A Sign is a BigInt's composing element.
532507
pub enum Sign { Minus, Zero, Plus }
533508

@@ -878,6 +853,8 @@ mod biguint_tests {
878853
}
879854
880855
#[test]
856+
#[ignore(cfg(target_arch = "x86"))]
857+
#[ignore(cfg(target_arch = "arm"))]
881858
fn test_shl() {
882859
fn check(v: ~[BigDigit], shift: uint, ans: ~[BigDigit]) {
883860
assert BigUint::new(v) << shift == BigUint::new(ans);
@@ -888,34 +865,10 @@ mod biguint_tests {
888865
check(~[1 << (BigDigit::bits - 2)], 2, ~[0, 1]);
889866
check(~[1 << (BigDigit::bits - 2)], 3, ~[0, 2]);
890867
check(~[1 << (BigDigit::bits - 2)], 3 + BigDigit::bits, ~[0, 0, 2]);
891-
892-
test_shl_bits();
893-
894-
#[cfg(target_arch = "x86_64")]
895-
fn test_shl_bits() {
896-
check(~[0x7654_3210, 0xfedc_ba98,
897-
0x7654_3210, 0xfedc_ba98], 4,
898-
~[0x6543_2100, 0xedcb_a987,
899-
0x6543_210f, 0xedcb_a987, 0xf]);
900-
check(~[0x2222_1111, 0x4444_3333,
901-
0x6666_5555, 0x8888_7777], 16,
902-
~[0x1111_0000, 0x3333_2222,
903-
0x5555_4444, 0x7777_6666, 0x8888]);
904-
}
905-
906-
#[cfg(target_arch = "arm")]
907-
#[cfg(target_arch = "x86")]
908-
fn test_shl_bits() {
909-
check(~[0x3210, 0x7654, 0xba98, 0xfedc,
910-
0x3210, 0x7654, 0xba98, 0xfedc], 4,
911-
~[0x2100, 0x6543, 0xa987, 0xedcb,
912-
0x210f, 0x6543, 0xa987, 0xedcb, 0xf]);
913-
check(~[0x1111, 0x2222, 0x3333, 0x4444,
914-
0x5555, 0x6666, 0x7777, 0x8888], 16,
915-
~[0x0000, 0x1111, 0x2222, 0x3333,
916-
0x4444, 0x5555, 0x6666, 0x7777, 0x8888]);
917-
}
918-
868+
check(~[0x7654_3210, 0xfedc_ba98, 0x7654_3210, 0xfedc_ba98], 4,
869+
~[0x6543_2100, 0xedcb_a987, 0x6543_210f, 0xedcb_a987, 0xf]);
870+
check(~[0x2222_1111, 0x4444_3333, 0x6666_5555, 0x8888_7777], 16,
871+
~[0x1111_0000, 0x3333_2222, 0x5555_4444, 0x7777_6666, 0x8888]);
919872
}
920873

921874
#[test]
@@ -932,32 +885,11 @@ mod biguint_tests {
932885
check(~[1 << 2], 2, ~[1]);
933886
check(~[1, 2], 3, ~[1 << (BigDigit::bits - 2)]);
934887
check(~[1, 1, 2], 3 + BigDigit::bits, ~[1 << (BigDigit::bits - 2)]);
935-
test_shr_bits();
936-
937-
#[cfg(target_arch = "x86_64")]
938-
fn test_shr_bits() {
939-
check(~[0x6543_2100, 0xedcb_a987,
940-
0x6543_210f, 0xedcb_a987, 0xf], 4,
941-
~[0x7654_3210, 0xfedc_ba98,
942-
0x7654_3210, 0xfedc_ba98]);
943-
check(~[0x1111_0000, 0x3333_2222,
944-
0x5555_4444, 0x7777_6666, 0x8888], 16,
945-
~[0x2222_1111, 0x4444_3333,
946-
0x6666_5555, 0x8888_7777]);
947-
}
948-
949-
#[cfg(target_arch = "arm")]
950-
#[cfg(target_arch = "x86")]
951-
fn test_shr_bits() {
952-
check(~[0x2100, 0x6543, 0xa987, 0xedcb,
953-
0x210f, 0x6543, 0xa987, 0xedcb, 0xf], 4,
954-
~[0x3210, 0x7654, 0xba98, 0xfedc,
955-
0x3210, 0x7654, 0xba98, 0xfedc]);
956-
check(~[0x0000, 0x1111, 0x2222, 0x3333,
957-
0x4444, 0x5555, 0x6666, 0x7777, 0x8888], 16,
958-
~[0x1111, 0x2222, 0x3333, 0x4444,
959-
0x5555, 0x6666, 0x7777, 0x8888]);
960-
}
888+
check(~[0x6543_2100, 0xedcb_a987, 0x6543_210f, 0xedcb_a987, 0xf], 4,
889+
~[0x7654_3210, 0xfedc_ba98, 0x7654_3210, 0xfedc_ba98]);
890+
check(~[0x1111_0000, 0x3333_2222, 0x5555_4444, 0x7777_6666, 0x8888],
891+
16,
892+
~[0x2222_1111, 0x4444_3333, 0x6666_5555, 0x8888_7777]);
961893
}
962894

963895
#[test]
@@ -1122,7 +1054,6 @@ mod biguint_tests {
11221054
}
11231055

11241056
fn to_str_pairs() -> ~[ (BigUint, ~[(uint, ~str)]) ] {
1125-
let bits = BigDigit::bits;
11261057
~[( Zero::zero(), ~[
11271058
(2, ~"0"), (3, ~"0")
11281059
]), ( BigUint::from_slice([ 0xff ]), ~[
@@ -1146,39 +1077,24 @@ mod biguint_tests {
11461077
(4, ~"333333"),
11471078
(16, ~"fff")
11481079
]), ( BigUint::from_slice([ 1, 2 ]), ~[
1149-
(2,
1150-
~"10" +
1151-
str::from_chars(vec::from_elem(bits - 1, '0')) + "1"),
1152-
(4,
1153-
~"2" +
1154-
str::from_chars(vec::from_elem(bits / 2 - 1, '0')) + "1"),
1155-
(10, match bits {
1156-
32 => ~"8589934593", 16 => ~"131073", _ => fail
1157-
}),
1158-
(16,
1159-
~"2" +
1160-
str::from_chars(vec::from_elem(bits / 4 - 1, '0')) + "1")
1161-
]), ( BigUint::from_slice([ 1, 2, 3 ]), ~[
1162-
(2,
1163-
~"11" +
1164-
str::from_chars(vec::from_elem(bits - 2, '0')) + "10" +
1165-
str::from_chars(vec::from_elem(bits - 1, '0')) + "1"),
1166-
(4,
1167-
~"3" +
1168-
str::from_chars(vec::from_elem(bits / 2 - 1, '0')) + "2" +
1169-
str::from_chars(vec::from_elem(bits / 2 - 1, '0')) + "1"),
1170-
(10, match bits {
1171-
32 => ~"55340232229718589441",
1172-
16 => ~"12885032961",
1173-
_ => fail
1174-
}),
1175-
(16, ~"3" +
1176-
str::from_chars(vec::from_elem(bits / 4 - 1, '0')) + "2" +
1177-
str::from_chars(vec::from_elem(bits / 4 - 1, '0')) + "1")
1178-
]) ]
1080+
(2, ~"10" + str::from_chars(vec::from_elem(31, '0')) + "1"),
1081+
(4, ~"2" + str::from_chars(vec::from_elem(15, '0')) + "1"),
1082+
(10, ~"8589934593"),
1083+
(16, ~"2" + str::from_chars(vec::from_elem(7, '0')) + "1")
1084+
]), (BigUint::from_slice([ 1, 2, 3 ]), ~[
1085+
(2, ~"11" + str::from_chars(vec::from_elem(30, '0')) + "10" +
1086+
str::from_chars(vec::from_elem(31, '0')) + "1"),
1087+
(4, ~"3" + str::from_chars(vec::from_elem(15, '0')) + "2" +
1088+
str::from_chars(vec::from_elem(15, '0')) + "1"),
1089+
(10, ~"55340232229718589441"),
1090+
(16, ~"3" + str::from_chars(vec::from_elem(7, '0')) + "2" +
1091+
str::from_chars(vec::from_elem(7, '0')) + "1")
1092+
])]
11791093
}
11801094

11811095
#[test]
1096+
#[ignore(cfg(target_arch = "x86"))]
1097+
#[ignore(cfg(target_arch = "arm"))]
11821098
fn test_to_str_radix() {
11831099
for to_str_pairs().each |num_pair| {
11841100
let &(n, rs) = num_pair;
@@ -1190,6 +1106,8 @@ mod biguint_tests {
11901106
}
11911107

11921108
#[test]
1109+
#[ignore(cfg(target_arch = "x86"))]
1110+
#[ignore(cfg(target_arch = "arm"))]
11931111
fn test_from_str_radix() {
11941112
for to_str_pairs().each |num_pair| {
11951113
let &(n, rs) = num_pair;

branches/dist-snap/src/test/run-pass/export-non-interference2.rs

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

1111
mod foo {
1212
mod bar {
13-
pub fn y() { ::foo::x(); }
13+
pub fn y() { super::super::foo::x(); }
1414
}
1515

1616
pub fn x() { debug!("x"); }
1717
}
1818

19-
fn main() { foo::bar::y(); }
19+
fn main() { self::foo::bar::y(); }

0 commit comments

Comments
 (0)