Skip to content

Commit 64ec78d

Browse files
committed
---
yaml --- r: 94957 b: refs/heads/dist-snap c: 32911f6 h: refs/heads/master i: 94955: 31a7e2e v: v3
1 parent cde908b commit 64ec78d

File tree

138 files changed

+1242
-7451
lines changed

Some content is hidden

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

138 files changed

+1242
-7451
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: c4866341182503b1343934e2663f2b0cc1d7c5ac
9+
refs/heads/dist-snap: 32911f6df5e49126f83d3289479405e37f3df94a
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*.cpp rust
55
*.h rust
66
*.rs rust
7-
src/etc/pkg/rust-logo.ico binary
87
src/rt/msvc/* -whitespace
98
src/rt/vg/* -whitespace
109
src/rt/linenoise/* -whitespace

branches/dist-snap/RELEASES.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Version 0.8 (September 2013)
1+
Version 0.8 (October 2013)
22
--------------------------
33

4-
* ~2200 changes, numerous bugfixes
4+
* ~2100 changes, numerous bugfixes
55

66
* Language
77
* The `for` loop syntax has changed to work with the `Iterator` trait.

branches/dist-snap/configure

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ do
684684
isaac linenoise sync test \
685685
arch/i386 arch/x86_64 arch/arm arch/mips \
686686
libuv libuv/src/ares libuv/src/eio libuv/src/ev \
687-
jemalloc sundown/src sundown/html
687+
jemalloc
688688
do
689689
make_dir $t/rt/stage$s/$i
690690
done
@@ -848,8 +848,6 @@ do
848848
# Disable term-info, linkage of which comes in multiple forms,
849849
# making our snapshots incompatible (#9334)
850850
LLVM_OPTS="$LLVM_OPTS --disable-terminfo"
851-
# Try to have LLVM pull in as few dependencies as possible (#9397)
852-
LLVM_OPTS="$LLVM_OPTS --disable-zlib --disable-libffi"
853851

854852
case "$CFG_C_COMPILER" in
855853
("ccache clang")

branches/dist-snap/mk/rt.mk

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,7 @@ RUNTIME_CXXS_$(1)_$(2) := \
8282
rt/rust_android_dummy.cpp \
8383
rt/rust_test_helpers.cpp
8484

85-
RUNTIME_CS_$(1)_$(2) := rt/linenoise/linenoise.c \
86-
rt/linenoise/utf8.c \
87-
rt/sundown/src/autolink.c \
88-
rt/sundown/src/buffer.c \
89-
rt/sundown/src/stack.c \
90-
rt/sundown/src/markdown.c \
91-
rt/sundown/html/houdini_href_e.c \
92-
rt/sundown/html/houdini_html_e.c \
93-
rt/sundown/html/html_smartypants.c \
94-
rt/sundown/html/html.c
85+
RUNTIME_CS_$(1)_$(2) := rt/linenoise/linenoise.c rt/linenoise/utf8.c
9586

9687
RUNTIME_S_$(1)_$(2) := rt/arch/$$(HOST_$(1))/_context.S \
9788
rt/arch/$$(HOST_$(1))/ccall.S \
@@ -126,8 +117,6 @@ RUNTIME_DEF_$(1)_$(2) := $$(RT_OUTPUT_DIR_$(1))/rustrt$$(CFG_DEF_SUFFIX_$(1))
126117
RUNTIME_INCS_$(1)_$(2) := -I $$(S)src/rt -I $$(S)src/rt/isaac -I $$(S)src/rt/uthash \
127118
-I $$(S)src/rt/arch/$$(HOST_$(1)) \
128119
-I $$(S)src/rt/linenoise \
129-
-I $$(S)src/rt/sundown/src \
130-
-I $$(S)src/rt/sundown/html \
131120
-I $$(S)src/libuv/include
132121
RUNTIME_OBJS_$(1)_$(2) := $$(RUNTIME_CXXS_$(1)_$(2):rt/%.cpp=$$(RT_BUILD_DIR_$(1)_$(2))/%.o) \
133122
$$(RUNTIME_CS_$(1)_$(2):rt/%.c=$$(RT_BUILD_DIR_$(1)_$(2))/%.o) \

branches/dist-snap/mk/tests.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,8 @@ ALL_CS := $(wildcard $(S)src/rt/*.cpp \
227227
$(S)src/rt/*/*/*.cpp \
228228
$(S)src/rustllvm/*.cpp)
229229
ALL_CS := $(filter-out $(S)src/rt/miniz.cpp \
230-
$(wildcard $(S)src/rt/linenoise/*.c) \
231-
$(wildcard $(S)src/rt/sundown/src/*.c) \
232-
$(wildcard $(S)src/rt/sundown/html/*.c) \
230+
$(S)src/rt/linenoise/linenoise.c \
231+
$(S)src/rt/linenoise/utf8.c \
233232
,$(ALL_CS))
234233
ALL_HS := $(wildcard $(S)src/rt/*.h \
235234
$(S)src/rt/*/*.h \
@@ -242,8 +241,6 @@ ALL_HS := $(filter-out $(S)src/rt/vg/valgrind.h \
242241
$(S)src/rt/msvc/inttypes.h \
243242
$(S)src/rt/linenoise/linenoise.h \
244243
$(S)src/rt/linenoise/utf8.h \
245-
$(wildcard $(S)src/rt/sundown/src/*.h) \
246-
$(wildcard $(S)src/rt/sundown/html/*.h) \
247244
,$(ALL_HS))
248245

249246
# Run the tidy script in multiple parts to avoid huge 'echo' commands
-2 Bytes
Binary file not shown.

branches/dist-snap/src/libextra/arc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* In this example, a large vector of floats is shared between several tasks.
1818
* With simple pipes, without Arc, a copy would have to be made for each task.
1919
*
20-
* ```rust
20+
* ~~~ {.rust}
2121
* extern mod std;
2222
* use extra::arc;
2323
* let numbers=vec::from_fn(100, |ind| (ind as float)*rand::random());
@@ -34,7 +34,7 @@
3434
* // Work with the local numbers
3535
* }
3636
* }
37-
* ```
37+
* ~~~
3838
*/
3939

4040
#[allow(missing_doc)];
@@ -440,7 +440,7 @@ impl<T:Freeze + Send> RWArc<T> {
440440
*
441441
* # Example
442442
*
443-
* ```rust
443+
* ~~~ {.rust}
444444
* do arc.write_downgrade |mut write_token| {
445445
* do write_token.write_cond |state, condvar| {
446446
* ... exclusive access with mutable state ...
@@ -450,7 +450,7 @@ impl<T:Freeze + Send> RWArc<T> {
450450
* ... shared access with immutable state ...
451451
* }
452452
* }
453-
* ```
453+
* ~~~
454454
*/
455455
pub fn write_downgrade<U>(&self, blk: &fn(v: RWWriteMode<T>) -> U) -> U {
456456
unsafe {

branches/dist-snap/src/libextra/base64.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ impl<'self> ToBase64 for &'self [u8] {
6262
*
6363
* # Example
6464
*
65-
* ```rust
65+
* ~~~ {.rust}
6666
* extern mod extra;
6767
* use extra::base64::{ToBase64, standard};
6868
*
6969
* fn main () {
7070
* let str = [52,32].to_base64(standard);
7171
* printfln!("%s", str);
7272
* }
73-
* ```
73+
* ~~~
7474
*/
7575
fn to_base64(&self, config: Config) -> ~str {
7676
let bytes = match config.char_set {
@@ -170,7 +170,7 @@ impl<'self> FromBase64 for &'self str {
170170
*
171171
* This converts a string literal to base64 and back.
172172
*
173-
* ```rust
173+
* ~~~ {.rust}
174174
* extern mod extra;
175175
* use extra::base64::{ToBase64, FromBase64, standard};
176176
* use std::str;
@@ -183,7 +183,7 @@ impl<'self> FromBase64 for &'self str {
183183
* let result_str = str::from_utf8(bytes);
184184
* printfln!("%s", result_str);
185185
* }
186-
* ```
186+
* ~~~
187187
*/
188188
fn from_base64(&self) -> Result<~[u8], ~str> {
189189
let mut r = ~[];

branches/dist-snap/src/libextra/bitv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ impl Bitv {
523523
* with the most significant bits of each byte coming first. Each
524524
* bit becomes true if equal to 1 or false if equal to 0.
525525
*/
526-
pub fn from_bytes(bytes: &[u8]) -> Bitv {
526+
pub fn from_utf8(bytes: &[u8]) -> Bitv {
527527
from_fn(bytes.len() * 8, |i| {
528528
let b = bytes[i / 8] as uint;
529529
let offset = i % 8;
@@ -1275,8 +1275,8 @@ mod tests {
12751275
}
12761276
12771277
#[test]
1278-
fn test_from_bytes() {
1279-
let bitv = from_bytes([0b10110110, 0b00000000, 0b11111111]);
1278+
fn test_from_utf8() {
1279+
let bitv = from_utf8([0b10110110, 0b00000000, 0b11111111]);
12801280
let str = ~"10110110" + "00000000" + "11111111";
12811281
assert_eq!(bitv.to_str(), str);
12821282
}
@@ -1302,7 +1302,7 @@ mod tests {
13021302
#[test]
13031303
fn test_to_bools() {
13041304
let bools = ~[false, false, true, false, false, true, true, false];
1305-
assert_eq!(from_bytes([0b00100110]).to_bools(), bools);
1305+
assert_eq!(from_utf8([0b00100110]).to_bools(), bools);
13061306
}
13071307
13081308
#[test]

branches/dist-snap/src/libextra/crypto/cryptoutil.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ mod test {
352352

353353
use cryptoutil::{add_bytes_to_bits, add_bytes_to_bits_tuple};
354354
use digest::Digest;
355-
use hex::FromHex;
356355

357356
/// Feed 1,000,000 'a's into the digest with varying input sizes and check that the result is
358357
/// correct.
@@ -373,10 +372,8 @@ mod test {
373372
}
374373

375374
let result_str = digest.result_str();
376-
let result_bytes = digest.result_bytes();
377375

378-
assert_eq!(expected, result_str.as_slice());
379-
assert_eq!(expected.from_hex().unwrap(), result_bytes);
376+
assert!(expected == result_str);
380377
}
381378

382379
// A normal addition - no overflow occurs

branches/dist-snap/src/libextra/crypto/digest.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
use std::vec;
1212

13-
use hex::ToHex;
14-
1513

1614
/**
1715
* The Digest trait specifies an interface common to digest functions, such as SHA-1 and the SHA-2
@@ -60,20 +58,23 @@ pub trait Digest {
6058

6159
/**
6260
* Convenience function that retrieves the result of a digest as a
63-
* newly allocated vec of bytes.
61+
* ~str in hexadecimal format.
6462
*/
65-
fn result_bytes(&mut self) -> ~[u8] {
63+
fn result_str(&mut self) -> ~str {
6664
let mut buf = vec::from_elem((self.output_bits()+7)/8, 0u8);
6765
self.result(buf);
68-
buf
66+
return to_hex(buf);
6967
}
68+
}
7069

71-
/**
72-
* Convenience function that retrieves the result of a digest as a
73-
* ~str in hexadecimal format.
74-
*/
75-
fn result_str(&mut self) -> ~str {
76-
self.result_bytes().to_hex()
70+
fn to_hex(rr: &[u8]) -> ~str {
71+
let mut s = ~"";
72+
for b in rr.iter() {
73+
let hex = (*b as uint).to_str_radix(16u);
74+
if hex.len() == 1 {
75+
s.push_char('0');
76+
}
77+
s.push_str(hex);
7778
}
79+
return s;
7880
}
79-

branches/dist-snap/src/libextra/crypto/md5.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static C4: [u32, ..16] = [
156156

157157

158158
/// The MD5 Digest algorithm
159-
pub struct Md5 {
159+
struct Md5 {
160160
priv length_bytes: u64,
161161
priv buffer: FixedBuffer64,
162162
priv state: Md5State,

branches/dist-snap/src/libextra/crypto/sha2.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ impl Engine512 {
230230
}
231231

232232

233-
/// The SHA-512 hash algorithm
234-
pub struct Sha512 {
233+
struct Sha512 {
235234
priv engine: Engine512
236235
}
237236

@@ -283,8 +282,7 @@ static H512: [u64, ..8] = [
283282
];
284283

285284

286-
/// The SHA-384 hash algorithm
287-
pub struct Sha384 {
285+
struct Sha384 {
288286
priv engine: Engine512
289287
}
290288

@@ -334,8 +332,7 @@ static H384: [u64, ..8] = [
334332
];
335333

336334

337-
/// The SHA-512 hash algorithm with digest truncated to 256 bits
338-
pub struct Sha512Trunc256 {
335+
struct Sha512Trunc256 {
339336
priv engine: Engine512
340337
}
341338

@@ -383,8 +380,7 @@ static H512_TRUNC_256: [u64, ..8] = [
383380
];
384381

385382

386-
/// The SHA-512 hash algorithm with digest truncated to 224 bits
387-
pub struct Sha512Trunc224 {
383+
struct Sha512Trunc224 {
388384
priv engine: Engine512
389385
}
390386

@@ -639,8 +635,7 @@ impl Engine256 {
639635
}
640636

641637

642-
/// The SHA-256 hash algorithm
643-
pub struct Sha256 {
638+
struct Sha256 {
644639
priv engine: Engine256
645640
}
646641

@@ -692,8 +687,7 @@ static H256: [u32, ..8] = [
692687
];
693688

694689

695-
/// The SHA-224 hash algorithm
696-
pub struct Sha224 {
690+
struct Sha224 {
697691
priv engine: Engine256
698692
}
699693

branches/dist-snap/src/libextra/extra.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Rust extras are part of the standard Rust distribution.
2626
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];
2727

2828
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
29-
html_favicon_url = "http://www.rust-lang.org/favicon.ico")];
29+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
30+
passes = "strip-hidden")];
3031

3132
#[comment = "Rust extras"];
3233
#[license = "MIT/ASL2"];

branches/dist-snap/src/libextra/flatpipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ports and channels.
2525
2626
This example sends boxed integers across tasks using serialization.
2727
28-
```rust
28+
~~~ {.rust}
2929
let (port, chan) = serial::pipe_stream();
3030
3131
do task::spawn || {
@@ -37,7 +37,7 @@ do task::spawn || {
3737
for i in range(0, 10) {
3838
assert @i == port.recv()
3939
}
40-
```
40+
~~~
4141
4242
# Safety Note
4343

branches/dist-snap/src/libextra/future.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
*
1515
* # Example
1616
*
17-
* ```rust
17+
* ~~~ {.rust}
1818
* # fn fib(n: uint) -> uint {42};
1919
* # fn make_a_sandwich() {};
2020
* let mut delayed_fib = extra::future::spawn (|| fib(5000) );
2121
* make_a_sandwich();
2222
* printfln!("fib(5000) = %?", delayed_fib.get())
23-
* ```
23+
* ~~~
2424
*/
2525

2626
#[allow(missing_doc)];

branches/dist-snap/src/libextra/getopts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! that requires an input file to be specified, accepts an optional output
3030
//! file name following -o, and accepts both -h and --help as optional flags.
3131
//!
32-
//! ~~~{.rust}
32+
//! ```
3333
//! exter mod extra;
3434
//! use extra::getopts::*;
3535
//! use std::os;
@@ -75,7 +75,7 @@
7575
//! };
7676
//! do_work(input, output);
7777
//! }
78-
//! ~~~
78+
//! ```
7979
8080
use std::cmp::Eq;
8181
use std::result::{Err, Ok};

0 commit comments

Comments
 (0)