Skip to content

Commit e1b2021

Browse files
committed
---
yaml --- r: 95015 b: refs/heads/dist-snap c: fe9b1e2 h: refs/heads/master i: 95013: 2a021b0 95011: c386adf 95007: 0031a0d v: v3
1 parent bc214c1 commit e1b2021

File tree

130 files changed

+1473
-1226
lines changed

Some content is hidden

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

130 files changed

+1473
-1226
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: 3ae895360c89b27bee7f076fded1c99691bd057e
9+
refs/heads/dist-snap: fe9b1e29fc9cc1983fdf17355d7b8956b63d9b55
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ endif
141141

142142
# version-string calculation
143143
CFG_GIT_DIR := $(CFG_SRC_DIR).git
144-
CFG_RELEASE = 0.9-pre
144+
CFG_RELEASE = 0.8
145145
CFG_VERSION = $(CFG_RELEASE)
146146
# windows exe's need numeric versions - don't use anything but
147147
# numbers and dots here
148-
CFG_VERSION_WIN = 0.9
148+
CFG_VERSION_WIN = 0.8
149149

150150
ifneq ($(wildcard $(CFG_GIT)),)
151151
ifneq ($(wildcard $(CFG_GIT_DIR)),)

branches/dist-snap/mk/clean.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ clean-misc:
5454
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz dist
5555
$(Q)rm -Rf $(foreach ext, \
5656
html aux cp fn ky log pdf pg toc tp vr cps, \
57-
$(wildcard doc/*.$(ext)))
58-
$(Q)find doc/std doc/extra -mindepth 1 | xargs rm -Rf
57+
$(wildcard doc/*.$(ext) \
58+
doc/*/*.$(ext) \
59+
doc/*/*/*.$(ext)))
5960
$(Q)rm -Rf doc/version.md
6061
$(Q)rm -Rf $(foreach sub, index styles files search javascript, \
6162
$(wildcard doc/*/$(sub)))

branches/dist-snap/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.9-pre" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.8" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/perl
2+
3+
#
4+
# This is a tool that helps with debugging incorrect monomorphic instance collapse.
5+
#
6+
# To use:
7+
# $ RUST_LOG=rustc::middle::trans::monomorphize rustc ARGS 2>&1 >log.txt
8+
# $ ./monodebug.pl log.txt
9+
#
10+
# This will show all generics that got collapsed. You can inspect this list to find the instances
11+
# that were mistakenly combined into one. Fixes will (most likely) be applied to type_use.rs.
12+
#
13+
# Questions about this tool go to pcwalton.
14+
#
15+
16+
use strict;
17+
use warnings;
18+
use Data::Dumper qw(Dumper);
19+
use Text::Balanced qw(extract_bracketed);
20+
21+
my %funcs;
22+
while (<>) {
23+
chomp;
24+
/^rust: ~"monomorphic_fn\((.*)"$/ or next;
25+
my $text = $1;
26+
$text =~ /fn_id=(\{ crate: \d+, node: \d+ \} \([^)]+\)), real_substs=(.*?), substs=(.*?), hash_id = \@\{ (.*) \}$/ or next;
27+
my ($fn_id, $real_substs, $substs, $hash_id) = ($1, $2, $3, $4);
28+
29+
#print "$hash_id\n";
30+
$hash_id =~ /^def: { crate: \d+, node: \d+ }, params: ~\[ (.*) \], impl_did_opt: (?:None|Some\({ crate: \d+, node: \d+ }\))$/ or next;
31+
my $params = $1;
32+
33+
my @real_substs;
34+
@real_substs = $real_substs =~ /\\"(.*?)\\"/g;
35+
36+
my @mono_params;
37+
while (1) {
38+
$params =~ s/^, //;
39+
if ($params =~ s/^mono_precise//) {
40+
extract_bracketed($params, '()');
41+
push @mono_params, 'precise';
42+
next;
43+
}
44+
if ($params =~ s/^mono_repr//) {
45+
my $sub = extract_bracketed($params, '()');
46+
push @mono_params, "repr($sub)";
47+
next;
48+
}
49+
if ($params =~ s/^mono_any//) {
50+
push @mono_params, "any";
51+
next;
52+
}
53+
last;
54+
}
55+
56+
my @key_params;
57+
for (my $i = 0; $i < @mono_params; ++$i) {
58+
if ($mono_params[$i] eq 'precise') {
59+
push @key_params, 'precise(' . $real_substs[$i] . ')';
60+
} else {
61+
push @key_params, $mono_params[$i];
62+
}
63+
}
64+
65+
my $key = "$fn_id with " . (join ', ', @key_params);
66+
$funcs{$key}{$real_substs} = 1;
67+
}
68+
69+
while (my ($key, $substs) = each %funcs) {
70+
my @params = keys %$substs;
71+
next if @params == 1;
72+
73+
print "$key\n";
74+
print(('-' x (length $key)), $/);
75+
for my $param (@params) {
76+
print "$param\n";
77+
}
78+
print "\n";
79+
}

branches/dist-snap/src/etc/zsh/_rust

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ _rustc_opts_debug=(
7171
'count-type-sizes:count the sizes of aggregate types'
7272
'meta-stats:gather metadata statistics'
7373
'no-opt:do not optimize, even if -O is passed'
74+
'no-monomorphic-collapse:do not collapse template instantiations'
7475
'print-link-args:Print the arguments passed to the linker'
7576
'gc:Garbage collect shared data (experimental)'
7677
'jit:Execute using JIT (experimental)'

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ use std::str;
1313

1414
/// Available encoding character sets
1515
pub enum CharacterSet {
16-
/// The standard character set (uses `+` and `/`)
16+
/// The standard character set (uses '+' and '/')
1717
Standard,
18-
/// The URL safe character set (uses `-` and `_`)
18+
/// The URL safe character set (uses '-' and '_')
1919
UrlSafe
2020
}
2121

22-
/// Contains configuration parameters for `to_base64`.
22+
/// Contains configuration parameters for to_base64
2323
pub struct Config {
2424
/// Character set to use
2525
char_set: CharacterSet,
26-
/// True to pad output with `=` characters
26+
/// True to pad output with '=' characters
2727
pad: bool,
28-
/// `Some(len)` to wrap lines at `len`, `None` to disable line wrapping
28+
/// Some(len) to wrap lines at len, None to disable line wrapping
2929
line_length: Option<uint>
3030
}
3131

@@ -68,7 +68,7 @@ impl<'self> ToBase64 for &'self [u8] {
6868
*
6969
* fn main () {
7070
* let str = [52,32].to_base64(standard);
71-
* println!("{}", str);
71+
* printfln!("%s", str);
7272
* }
7373
* ```
7474
*/
@@ -177,11 +177,11 @@ impl<'self> FromBase64 for &'self str {
177177
*
178178
* fn main () {
179179
* let hello_str = "Hello, World".to_base64(standard);
180-
* println!("{}", hello_str);
180+
* printfln!("%s", hello_str);
181181
* let bytes = hello_str.from_base64();
182-
* println!("{:?}", bytes);
182+
* printfln!("%?", bytes);
183183
* let result_str = str::from_utf8(bytes);
184-
* println!("{}", result_str);
184+
* printfln!("%s", result_str);
185185
* }
186186
* ```
187187
*/

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

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ struct BigBitv {
116116
}
117117

118118
/**
119-
* A mask that has a 1 for each defined bit in the n'th element of a `BigBitv`,
119+
* a mask that has a 1 for each defined bit in the nth element of a big_bitv,
120120
* assuming n bits.
121121
*/
122122
#[inline]
@@ -284,7 +284,7 @@ impl Bitv {
284284
* Calculates the union of two bitvectors
285285
*
286286
* Sets `self` to the union of `self` and `v1`. Both bitvectors must be
287-
* the same length. Returns `true` if `self` changed.
287+
* the same length. Returns 'true' if `self` changed.
288288
*/
289289
#[inline]
290290
pub fn union(&mut self, v1: &Bitv) -> bool { self.do_op(Union, v1) }
@@ -293,7 +293,7 @@ impl Bitv {
293293
* Calculates the intersection of two bitvectors
294294
*
295295
* Sets `self` to the intersection of `self` and `v1`. Both bitvectors
296-
* must be the same length. Returns `true` if `self` changed.
296+
* must be the same length. Returns 'true' if `self` changed.
297297
*/
298298
#[inline]
299299
pub fn intersect(&mut self, v1: &Bitv) -> bool {
@@ -395,7 +395,7 @@ impl Bitv {
395395
self.do_op(Difference, v)
396396
}
397397

398-
/// Returns `true` if all bits are 1
398+
/// Returns true if all bits are 1
399399
#[inline]
400400
pub fn is_true(&self) -> bool {
401401
match self.rep {
@@ -417,7 +417,7 @@ impl Bitv {
417417
self.iter().invert()
418418
}
419419

420-
/// Returns `true` if all bits are 0
420+
/// Returns true if all bits are 0
421421
pub fn is_false(&self) -> bool {
422422
match self.rep {
423423
Small(ref b) => b.is_false(self.nbits),
@@ -433,18 +433,18 @@ impl Bitv {
433433
}
434434

435435
/**
436-
* Converts `self` to a vector of `uint` with the same length.
436+
* Converts `self` to a vector of uint with the same length.
437437
*
438-
* Each `uint` in the resulting vector has either value `0u` or `1u`.
438+
* Each uint in the resulting vector has either value 0u or 1u.
439439
*/
440440
pub fn to_vec(&self) -> ~[uint] {
441441
vec::from_fn(self.nbits, |x| self.init_to_vec(x))
442442
}
443443

444444
/**
445445
* Organise the bits into bytes, such that the first bit in the
446-
* `Bitv` becomes the high-order bit of the first byte. If the
447-
* size of the `Bitv` is not a multiple of 8 then trailing bits
446+
* bitv becomes the high-order bit of the first byte. If the
447+
* size of the bitv is not a multiple of 8 then trailing bits
448448
* will be filled-in with false/0
449449
*/
450450
pub fn to_bytes(&self) -> ~[u8] {
@@ -472,7 +472,7 @@ impl Bitv {
472472
}
473473

474474
/**
475-
* Transform `self` into a `[bool]` by turning each bit into a `bool`.
475+
* Transform self into a [bool] by turning each bit into a bool
476476
*/
477477
pub fn to_bools(&self) -> ~[bool] {
478478
vec::from_fn(self.nbits, |i| self[i])
@@ -498,7 +498,7 @@ impl Bitv {
498498

499499

500500
/**
501-
* Compare a bitvector to a vector of `bool`.
501+
* Compare a bitvector to a vector of bool.
502502
*
503503
* Both the bitvector and vector must have the same length.
504504
*/
@@ -519,9 +519,9 @@ impl Bitv {
519519
}
520520

521521
/**
522-
* Transform a byte-vector into a `Bitv`. Each byte becomes 8 bits,
522+
* Transform a byte-vector into a bitv. Each byte becomes 8 bits,
523523
* with the most significant bits of each byte coming first. Each
524-
* bit becomes `true` if equal to 1 or `false` if equal to 0.
524+
* bit becomes true if equal to 1 or false if equal to 0.
525525
*/
526526
pub fn from_bytes(bytes: &[u8]) -> Bitv {
527527
from_fn(bytes.len() * 8, |i| {
@@ -532,15 +532,15 @@ pub fn from_bytes(bytes: &[u8]) -> Bitv {
532532
}
533533

534534
/**
535-
* Transform a `[bool]` into a `Bitv` by converting each `bool` into a bit.
535+
* Transform a [bool] into a bitv by converting each bool into a bit.
536536
*/
537537
pub fn from_bools(bools: &[bool]) -> Bitv {
538538
from_fn(bools.len(), |i| bools[i])
539539
}
540540

541541
/**
542-
* Create a `Bitv` of the specified length where the value at each
543-
* index is `f(index)`.
542+
* Create a bitv of the specified length where the value at each
543+
* index is f(index).
544544
*/
545545
pub fn from_fn(len: uint, f: &fn(index: uint) -> bool) -> Bitv {
546546
let mut bitv = Bitv::new(len, false);
@@ -571,7 +571,7 @@ fn iterate_bits(base: uint, bits: uint, f: &fn(uint) -> bool) -> bool {
571571
return true;
572572
}
573573

574-
/// An iterator for `Bitv`.
574+
/// An iterator for Bitv
575575
pub struct BitvIterator<'self> {
576576
priv bitv: &'self Bitv,
577577
priv next_idx: uint,
@@ -631,12 +631,12 @@ impl<'self> RandomAccessIterator<bool> for BitvIterator<'self> {
631631
///
632632
/// It should also be noted that the amount of storage necessary for holding a
633633
/// set of objects is proportional to the maximum of the objects when viewed
634-
/// as a `uint`.
634+
/// as a uint.
635635
#[deriving(Clone)]
636636
pub struct BitvSet {
637637
priv size: uint,
638638

639-
// In theory this is a `Bitv` instead of always a `BigBitv`, but knowing that
639+
// In theory this is a Bitv instead of always a BigBitv, but knowing that
640640
// there's an array of storage makes our lives a whole lot easier when
641641
// performing union/intersection/etc operations
642642
priv bitv: BigBitv
@@ -861,7 +861,7 @@ impl MutableSet<uint> for BitvSet {
861861
}
862862

863863
impl BitvSet {
864-
/// Visits each of the words that the two bit vectors (`self` and `other`)
864+
/// Visits each of the words that the two bit vectors (self and other)
865865
/// both have in common. The three yielded arguments are (bit location,
866866
/// w1, w2) where the bit location is the number of bits offset so far,
867867
/// and w1/w2 are the words coming from the two vectors self, other.
@@ -874,13 +874,13 @@ impl BitvSet {
874874
.map(|((i, &w), o_store)| (i * uint::bits, w, o_store[i]))
875875
}
876876

877-
/// Visits each word in `self` or `other` that extends beyond the other. This
877+
/// Visits each word in self or other that extends beyond the other. This
878878
/// will only iterate through one of the vectors, and it only iterates
879879
/// over the portion that doesn't overlap with the other one.
880880
///
881-
/// The yielded arguments are a `bool`, the bit offset, and a word. The `bool`
882-
/// is true if the word comes from `self`, and `false` if it comes from
883-
/// `other`.
881+
/// The yielded arguments are a bool, the bit offset, and a word. The bool
882+
/// is true if the word comes from 'self', and false if it comes from
883+
/// 'other'.
884884
fn outlier_iter<'a>(&'a self, other: &'a BitvSet)
885885
-> Map<'static, ((uint, &'a uint), uint), (bool, uint, uint),
886886
Zip<Enumerate<vec::VecIterator<'a, uint>>, Repeat<uint>>> {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Rust extras are part of the standard Rust distribution.
2121
*/
2222

2323
#[link(name = "extra",
24-
vers = "0.9-pre",
24+
vers = "0.8",
2525
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
2626
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];
2727

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* # fn make_a_sandwich() {};
2020
* let mut delayed_fib = extra::future::spawn (|| fib(5000) );
2121
* make_a_sandwich();
22-
* println!("fib(5000) = {}", delayed_fib.get())
22+
* printfln!("fib(5000) = %?", delayed_fib.get())
2323
* ```
2424
*/
2525

0 commit comments

Comments
 (0)