Skip to content

Commit 0ea68bf

Browse files
committed
---
yaml --- r: 39567 b: refs/heads/incoming c: baa4379 h: refs/heads/master i: 39565: f70be89 39563: 5e20910 39559: 2a626e2 39551: e179219 v: v3
1 parent c50df57 commit 0ea68bf

File tree

31 files changed

+798
-435
lines changed

31 files changed

+798
-435
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: 197a1f9cfe7839bcff0020c54af3e90c4985174d
9+
refs/heads/incoming: baa4379e5aa0d810304577b41dbe2b59d3030c20
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/AUTHORS.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Drew Willcoxon <[email protected]>
4444
Elliott Slaughter <[email protected]>
4545
Elly Fong-Jones <[email protected]>
4646
Eric Holk <[email protected]>
47-
Eric Holmes <[email protected]>
4847
Erick Tryzelaar <[email protected]>
4948
Erik Rose <[email protected]>
5049
Evan McClanahan <[email protected]>
@@ -90,7 +89,6 @@ Magnus Auvinen <[email protected]>
9089
Mahmut Bulut <[email protected]>
9190
Margaret Meyerhofer <[email protected]>
9291
Marijn Haverbeke <[email protected]>
93-
Martin DeMello <[email protected]>
9492
Matt Brubeck <[email protected]>
9593
Matthew O'Connor <[email protected]>
9694
Max Penet <[email protected]>

branches/incoming/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ LIBRUSTI_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rusti)
154154

155155
# version-string calculation
156156
CFG_GIT_DIR := $(CFG_SRC_DIR).git
157-
CFG_RELEASE = 0.6
157+
CFG_RELEASE = 0.5
158158
CFG_VERSION = $(CFG_RELEASE)
159159

160160
ifneq ($(wildcard $(CFG_GIT)),)

branches/incoming/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ packages:
4242
Assuming you're on a relatively modern *nix system and have met the
4343
prerequisites, something along these lines should work.
4444

45-
$ wget http://static.rust-lang.org/dist/rust-0.5.tar.gz
45+
$ wget http://dl.rust-lang.org/dist/rust-0.5.tar.gz
4646
$ tar -xzf rust-0.5.tar.gz
4747
$ cd rust-0.5
4848
$ ./configure
@@ -59,8 +59,8 @@ When complete, `make install` will place several programs into
5959
API-documentation tool, and `cargo`, the Rust package manager.
6060

6161
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
62-
[tarball]: http://static.rust-lang.org/dist/rust-0.5.tar.gz
63-
[win-exe]: http://static.rust-lang.org/dist/rust-0.5-install.exe
62+
[tarball]: http://dl.rust-lang.org/dist/rust-0.5.tar.gz
63+
[win-exe]: http://dl.rust-lang.org/dist/rust-0.5-install.exe
6464

6565

6666
## License
@@ -74,4 +74,4 @@ See LICENSE.txt for details.
7474

7575
The [tutorial] is a good starting point.
7676

77-
[tutorial]: http://static.rust-lang.org/doc/tutorial.html
77+
[tutorial]: http://dl.rust-lang.org/doc/tutorial.html

branches/incoming/doc/tutorial-ffi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern mod crypto {
2222
2323
fn as_hex(data: ~[u8]) -> ~str {
2424
let mut acc = ~"";
25-
for data.each |&byte| { acc += fmt!("%02x", byte as uint); }
25+
for data.each |byte| { acc += fmt!("%02x", byte as uint); }
2626
return acc;
2727
}
2828
@@ -33,8 +33,8 @@ fn sha1(data: ~str) -> ~str unsafe {
3333
return as_hex(vec::from_buf(hash, 20));
3434
}
3535
36-
fn main() {
37-
io::println(sha1(core::os::args()[1]));
36+
fn main(args: ~[~str]) {
37+
io::println(sha1(args[1]));
3838
}
3939
~~~~
4040

branches/incoming/doc/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ If you've fulfilled those prerequisites, something along these lines
9999
should work.
100100

101101
~~~~ {.notrust}
102-
$ curl -O http://static.rust-lang.org/dist/rust-0.5.tar.gz
102+
$ curl -O http://dl.rust-lang.org/dist/rust-0.5.tar.gz
103103
$ tar -xzf rust-0.5.tar.gz
104104
$ cd rust-0.5
105105
$ ./configure
@@ -118,8 +118,8 @@ API-documentation tool, `cargo`, the Rust package manager,
118118
and `rusti`, the Rust REPL.
119119

120120
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
121-
[tarball]: http://static.rust-lang.org/dist/rust-0.5.tar.gz
122-
[win-exe]: http://static.rust-lang.org/dist/rust-0.5-install.exe
121+
[tarball]: http://dl.rust-lang.org/dist/rust-0.5.tar.gz
122+
[win-exe]: http://dl.rust-lang.org/dist/rust-0.5-install.exe
123123

124124
## Compiling your first program
125125

@@ -2419,10 +2419,10 @@ these two files:
24192419
pub fn explore() -> &str { "world" }
24202420
~~~~
24212421

2422-
~~~~
2422+
~~~~ {.xfail-test}
24232423
// main.rs
24242424
extern mod world;
2425-
fn main() { io::println(~"hello " + world::explore()); }
2425+
fn main() { io::println("hello " + world::explore()); }
24262426
~~~~
24272427

24282428
Now compile and run like this (adjust to your platform if necessary):

branches/incoming/src/compiletest/compiletest.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#[allow(deprecated_mode)];
1919
#[allow(deprecated_pattern)];
2020

21-
extern mod core(vers = "0.6");
22-
extern mod std(vers = "0.6");
21+
extern mod core(vers = "0.5");
22+
extern mod std(vers = "0.5");
2323

2424
use core::*;
2525

branches/incoming/src/driver/driver.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
// except according to those terms.
1010

1111
#[no_core];
12-
extern mod core(vers = "0.6");
12+
extern mod core(vers = "0.5");
1313

1414
#[cfg(cargo)]
15-
extern mod self(name = "cargo", vers = "0.6");
15+
extern mod self(name = "cargo", vers = "0.5");
1616

1717
#[cfg(fuzzer)]
18-
extern mod self(name = "fuzzer", vers = "0.6");
18+
extern mod self(name = "fuzzer", vers = "0.5");
1919

2020
#[cfg(rustdoc)]
21-
extern mod self(name = "rustdoc", vers = "0.6");
21+
extern mod self(name = "rustdoc", vers = "0.5");
2222

2323
#[cfg(rusti)]
24-
extern mod self(name = "rusti", vers = "0.6");
24+
extern mod self(name = "rusti", vers = "0.5");
2525

2626
#[cfg(rustc)]
27-
extern mod self(name = "rustc", vers = "0.6");
27+
extern mod self(name = "rustc", vers = "0.5");
2828

2929
fn main() { self::main() }

branches/incoming/src/etc/vim/after/syntax/rust.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ if exists('g:rust_conceal_mod_path')
77
syn match rustNiceOperator "::" conceal cchar=
88
endif
99

10+
syn match rustLeftArrowHead contained "-" conceal cchar= 
11+
syn match rustLeftArrowTail contained "<" conceal cchar=
12+
syn match rustNiceOperator "<-" contains=rustLeftArrowHead,rustLeftArrowTail
13+
1014
syn match rustRightArrowHead contained ">" conceal cchar= 
1115
syn match rustRightArrowTail contained "-" conceal cchar=
1216
syn match rustNiceOperator "->" contains=rustRightArrowHead,rustRightArrowTail

branches/incoming/src/libcargo/cargo.rc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// End:
2121

2222
#[link(name = "cargo",
23-
vers = "0.6",
23+
vers = "0.5",
2424
uuid = "9ff87a04-8fed-4295-9ff8-f99bb802650b",
2525
url = "https://github.com/mozilla/rust/tree/master/src/cargo")];
2626

@@ -37,10 +37,10 @@
3737
#[allow(deprecated_mode)];
3838
#[allow(deprecated_pattern)];
3939

40-
extern mod core(vers = "0.6");
41-
extern mod std(vers = "0.6");
42-
extern mod rustc(vers = "0.6");
43-
extern mod syntax(vers = "0.6");
40+
extern mod core(vers = "0.5");
41+
extern mod std(vers = "0.5");
42+
extern mod rustc(vers = "0.5");
43+
extern mod syntax(vers = "0.5");
4444

4545
#[legacy_exports]
4646
mod pgp;

branches/incoming/src/libcargo/pgp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ fn verify(root: &Path, data: &Path, sig: &Path) -> bool {
102102
let path = root.push("gpg");
103103
let res = gpgv(~[~"--homedir", path.to_str(),
104104
~"--keyring", ~"pubring.gpg",
105-
~"--verbose",
105+
~"--verify",
106106
sig.to_str(), data.to_str()]);
107107
if res.status != 0 {
108108
return false;

branches/incoming/src/libcore/core.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Implicitly, all crates behave as if they included the following prologue:
3636

3737

3838
#[link(name = "core",
39-
vers = "0.6",
39+
vers = "0.5",
4040
uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8",
4141
url = "https://github.com/mozilla/rust/tree/master/src/libcore")];
4242

@@ -103,7 +103,7 @@ pub mod owned;
103103
#[cfg(notest)] pub mod cmp;
104104

105105
// Make core testable by not duplicating lang items. See #2912
106-
#[cfg(test)] extern mod realcore(name = "core", vers = "0.6");
106+
#[cfg(test)] extern mod realcore(name = "core", vers = "0.5");
107107
#[cfg(test)] pub use kinds = realcore::kinds;
108108
#[cfg(test)] pub use ops = realcore::ops;
109109
#[cfg(test)] pub use cmp = realcore::cmp;
@@ -249,7 +249,7 @@ mod core {
249249
// Similar to above. Some magic to make core testable.
250250
#[cfg(test)]
251251
mod std {
252-
extern mod std(vers = "0.6");
252+
extern mod std(vers = "0.5");
253253
pub use std::std::test;
254254
}
255255

branches/incoming/src/libcore/float.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,9 @@ pub fn test_from_str() {
466466
assert from_str(~".e-1") == Some(0.);
467467
assert from_str(~"5.") == Some(5.);
468468
assert from_str(~".5") == Some(0.5);
469-
assert from_str(~"0.6") == Some(0.5);
470-
assert from_str(~"0.6") == Some(0.5);
471-
assert from_str(~"0.6") == Some(0.5);
469+
assert from_str(~"0.5") == Some(0.5);
470+
assert from_str(~"0.5") == Some(0.5);
471+
assert from_str(~"0.5") == Some(0.5);
472472
assert from_str(~"-.5") == Some(-0.5);
473473
assert from_str(~"-.5") == Some(-0.5);
474474
assert from_str(~"-5") == Some(-5.);

branches/incoming/src/libcore/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl<T, E> Result<T, E> {
234234
pure fn unwrap(self) -> T { unwrap(self) }
235235

236236
#[inline(always)]
237-
pure fn unwrap_err(self) -> E { unwrap_err(self) }
237+
pure fn unwrap_err(self) -> T { unwrap(self) }
238238

239239
#[inline(always)]
240240
pure fn chain<U>(self, op: fn(T) -> Result<U,E>) -> Result<U,E> {

branches/incoming/src/libfuzzer/fuzzer.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
#[link(name = "fuzzer",
14-
vers = "0.6",
14+
vers = "0.5",
1515
uuid = "d6418797-2736-4833-bd82-d3c684b7c1b0",
1616
url = "https://github.com/mozilla/rust/tree/master/src/libfuzzer")];
1717

@@ -28,9 +28,9 @@
2828
#[allow(deprecated_mode)];
2929
#[allow(deprecated_pattern)];
3030

31-
extern mod core(vers = "0.6");
32-
extern mod std(vers = "0.6");
33-
extern mod syntax(vers = "0.6");
31+
extern mod core(vers = "0.5");
32+
extern mod std(vers = "0.5");
33+
extern mod syntax(vers = "0.5");
3434

3535
use core::*;
3636

branches/incoming/src/librustc/middle/trans/base.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,6 +2396,30 @@ fn declare_intrinsics(llmod: ModuleRef) -> HashMap<~str, ValueRef> {
23962396
T_fn(~[T_f32()], T_f32()));
23972397
let truncf64 = decl_cdecl_fn(llmod, ~"llvm.trunc.f64",
23982398
T_fn(~[T_f64()], T_f64()));
2399+
let ctpop8 = decl_cdecl_fn(llmod, ~"llvm.ctpop.i8",
2400+
T_fn(~[T_i8()], T_i8()));
2401+
let ctpop16 = decl_cdecl_fn(llmod, ~"llvm.ctpop.i16",
2402+
T_fn(~[T_i16()], T_i16()));
2403+
let ctpop32 = decl_cdecl_fn(llmod, ~"llvm.ctpop.i32",
2404+
T_fn(~[T_i32()], T_i32()));
2405+
let ctpop64 = decl_cdecl_fn(llmod, ~"llvm.ctpop.i64",
2406+
T_fn(~[T_i64()], T_i64()));
2407+
let ctlz8 = decl_cdecl_fn(llmod, ~"llvm.ctlz.i8",
2408+
T_fn(~[T_i8(), T_i1()], T_i8()));
2409+
let ctlz16 = decl_cdecl_fn(llmod, ~"llvm.ctlz.i16",
2410+
T_fn(~[T_i16(), T_i1()], T_i16()));
2411+
let ctlz32 = decl_cdecl_fn(llmod, ~"llvm.ctlz.i32",
2412+
T_fn(~[T_i32(), T_i1()], T_i32()));
2413+
let ctlz64 = decl_cdecl_fn(llmod, ~"llvm.ctlz.i64",
2414+
T_fn(~[T_i64(), T_i1()], T_i64()));
2415+
let cttz8 = decl_cdecl_fn(llmod, ~"llvm.cttz.i8",
2416+
T_fn(~[T_i8(), T_i1()], T_i8()));
2417+
let cttz16 = decl_cdecl_fn(llmod, ~"llvm.cttz.i16",
2418+
T_fn(~[T_i16(), T_i1()], T_i16()));
2419+
let cttz32 = decl_cdecl_fn(llmod, ~"llvm.cttz.i32",
2420+
T_fn(~[T_i32(), T_i1()], T_i32()));
2421+
let cttz64 = decl_cdecl_fn(llmod, ~"llvm.cttz.i64",
2422+
T_fn(~[T_i64(), T_i1()], T_i64()));
23992423

24002424
let intrinsics = HashMap();
24012425
intrinsics.insert(~"llvm.gcroot", gcroot);
@@ -2436,6 +2460,18 @@ fn declare_intrinsics(llmod: ModuleRef) -> HashMap<~str, ValueRef> {
24362460
intrinsics.insert(~"llvm.ceil.f64", ceilf64);
24372461
intrinsics.insert(~"llvm.trunc.f32", truncf32);
24382462
intrinsics.insert(~"llvm.trunc.f64", truncf64);
2463+
intrinsics.insert(~"llvm.ctpop.i8", ctpop8);
2464+
intrinsics.insert(~"llvm.ctpop.i16", ctpop16);
2465+
intrinsics.insert(~"llvm.ctpop.i32", ctpop32);
2466+
intrinsics.insert(~"llvm.ctpop.i64", ctpop64);
2467+
intrinsics.insert(~"llvm.ctlz.i8", ctlz8);
2468+
intrinsics.insert(~"llvm.ctlz.i16", ctlz16);
2469+
intrinsics.insert(~"llvm.ctlz.i32", ctlz32);
2470+
intrinsics.insert(~"llvm.ctlz.i64", ctlz64);
2471+
intrinsics.insert(~"llvm.cttz.i8", cttz8);
2472+
intrinsics.insert(~"llvm.cttz.i16", cttz16);
2473+
intrinsics.insert(~"llvm.cttz.i32", cttz32);
2474+
intrinsics.insert(~"llvm.cttz.i64", cttz64);
24392475

24402476
return intrinsics;
24412477
}

branches/incoming/src/librustc/middle/trans/foreign.rs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,74 @@ fn trans_intrinsic(ccx: @crate_ctxt, decl: ValueRef, item: @ast::foreign_item,
11941194
let truncf = ccx.intrinsics.get(~"llvm.trunc.f64");
11951195
Store(bcx, Call(bcx, truncf, ~[x]), fcx.llretptr);
11961196
}
1197+
~"ctpop8" => {
1198+
let x = get_param(decl, first_real_arg);
1199+
let ctpop = ccx.intrinsics.get(~"llvm.ctpop.i8");
1200+
Store(bcx, Call(bcx, ctpop, ~[x]), fcx.llretptr)
1201+
}
1202+
~"ctpop16" => {
1203+
let x = get_param(decl, first_real_arg);
1204+
let ctpop = ccx.intrinsics.get(~"llvm.ctpop.i16");
1205+
Store(bcx, Call(bcx, ctpop, ~[x]), fcx.llretptr)
1206+
}
1207+
~"ctpop32" => {
1208+
let x = get_param(decl, first_real_arg);
1209+
let ctpop = ccx.intrinsics.get(~"llvm.ctpop.i32");
1210+
Store(bcx, Call(bcx, ctpop, ~[x]), fcx.llretptr)
1211+
}
1212+
~"ctpop64" => {
1213+
let x = get_param(decl, first_real_arg);
1214+
let ctpop = ccx.intrinsics.get(~"llvm.ctpop.i64");
1215+
Store(bcx, Call(bcx, ctpop, ~[x]), fcx.llretptr)
1216+
}
1217+
~"ctlz8" => {
1218+
let x = get_param(decl, first_real_arg);
1219+
let y = C_bool(false);
1220+
let ctlz = ccx.intrinsics.get(~"llvm.ctlz.i8");
1221+
Store(bcx, Call(bcx, ctlz, ~[x, y]), fcx.llretptr)
1222+
}
1223+
~"ctlz16" => {
1224+
let x = get_param(decl, first_real_arg);
1225+
let y = C_bool(false);
1226+
let ctlz = ccx.intrinsics.get(~"llvm.ctlz.i16");
1227+
Store(bcx, Call(bcx, ctlz, ~[x, y]), fcx.llretptr)
1228+
}
1229+
~"ctlz32" => {
1230+
let x = get_param(decl, first_real_arg);
1231+
let y = C_bool(false);
1232+
let ctlz = ccx.intrinsics.get(~"llvm.ctlz.i32");
1233+
Store(bcx, Call(bcx, ctlz, ~[x, y]), fcx.llretptr)
1234+
}
1235+
~"ctlz64" => {
1236+
let x = get_param(decl, first_real_arg);
1237+
let y = C_bool(false);
1238+
let ctlz = ccx.intrinsics.get(~"llvm.ctlz.i64");
1239+
Store(bcx, Call(bcx, ctlz, ~[x, y]), fcx.llretptr)
1240+
}
1241+
~"cttz8" => {
1242+
let x = get_param(decl, first_real_arg);
1243+
let y = C_bool(false);
1244+
let cttz = ccx.intrinsics.get(~"llvm.cttz.i8");
1245+
Store(bcx, Call(bcx, cttz, ~[x, y]), fcx.llretptr)
1246+
}
1247+
~"cttz16" => {
1248+
let x = get_param(decl, first_real_arg);
1249+
let y = C_bool(false);
1250+
let cttz = ccx.intrinsics.get(~"llvm.cttz.i16");
1251+
Store(bcx, Call(bcx, cttz, ~[x, y]), fcx.llretptr)
1252+
}
1253+
~"cttz32" => {
1254+
let x = get_param(decl, first_real_arg);
1255+
let y = C_bool(false);
1256+
let cttz = ccx.intrinsics.get(~"llvm.cttz.i32");
1257+
Store(bcx, Call(bcx, cttz, ~[x, y]), fcx.llretptr)
1258+
}
1259+
~"cttz64" => {
1260+
let x = get_param(decl, first_real_arg);
1261+
let y = C_bool(false);
1262+
let cttz = ccx.intrinsics.get(~"llvm.cttz.i64");
1263+
Store(bcx, Call(bcx, cttz, ~[x, y]), fcx.llretptr)
1264+
}
11971265
_ => {
11981266
// Could we make this an enum rather than a string? does it get
11991267
// checked earlier?

0 commit comments

Comments
 (0)