Skip to content

Commit b1fdd2e

Browse files
author
Jakub Wieczorek
committed
---
yaml --- r: 152430 b: refs/heads/try2 c: a2bbcb5 h: refs/heads/master v: v3
1 parent bb0f303 commit b1fdd2e

File tree

237 files changed

+1828
-3123
lines changed

Some content is hidden

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

237 files changed

+1828
-3123
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: 9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6
8+
refs/heads/try2: a2bbcb594fff51ecad2f9077467a29a6b2713319
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/crates.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ DEPS_uuid := std serialize
8383
DEPS_sync := std alloc
8484
DEPS_getopts := std
8585
DEPS_collections := core alloc
86-
DEPS_fourcc := rustc syntax std
87-
DEPS_hexfloat := rustc syntax std
86+
DEPS_fourcc := syntax std
87+
DEPS_hexfloat := syntax std
8888
DEPS_num := std
8989
DEPS_test := std getopts serialize term time regex native:rust_test_helpers
9090
DEPS_time := std serialize sync
9191
DEPS_rand := core
9292
DEPS_url := std
9393
DEPS_log := std sync
9494
DEPS_regex := std
95-
DEPS_regex_macros = rustc syntax std regex
95+
DEPS_regex_macros = syntax std regex
9696
DEPS_fmt_macros = std
9797

9898
TOOL_DEPS_compiletest := test green rustuv getopts

branches/try2/src/compiletest/compiletest.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,11 @@
1818

1919
extern crate test;
2020
extern crate getopts;
21+
#[phase(link, syntax)]
22+
extern crate log;
2123
extern crate green;
2224
extern crate rustuv;
2325

24-
#[cfg(stage0)]
25-
#[phase(syntax, link)]
26-
extern crate log;
27-
28-
#[cfg(not(stage0))]
29-
#[phase(plugin, link)]
30-
extern crate log;
31-
3226
extern crate regex;
3327

3428
use std::os;
@@ -292,7 +286,6 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
292286
save_metrics: config.save_metrics.clone(),
293287
test_shard: config.test_shard.clone(),
294288
nocapture: false,
295-
color: test::AutoColor,
296289
}
297290
}
298291

branches/try2/src/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use std::os;
1212
use std::str;
1313
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
14-
use std::dynamic_lib::DynamicLibrary;
14+
use std::unstable::dynamic_lib::DynamicLibrary;
1515

1616
fn target_env(lib_path: &str, prog: &str) -> Vec<(String, String)> {
1717
let prog = if cfg!(windows) {prog.slice_to(prog.len() - 4)} else {prog};

branches/try2/src/doc/rust.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,8 +1819,9 @@ type int8_t = i8;
18191819

18201820
### Function-only attributes
18211821

1822-
- `plugin_registrar` - mark this function as the registration point for
1823-
compiler plugins, such as loadable syntax extensions.
1822+
- `macro_registrar` - when using loadable syntax extensions, mark this
1823+
function as the registration point for the current crate's syntax
1824+
extensions.
18241825
- `main` - indicates that this function should be passed to the entry point,
18251826
rather than the function in the crate root named `main`.
18261827
- `start` - indicates that this function should be used as the entry point,
@@ -4097,7 +4098,7 @@ that demonstrates all four of them:
40974098

40984099
~~~~
40994100
#![feature(phase)]
4100-
#[phase(plugin, link)] extern crate log;
4101+
#[phase(syntax, link)] extern crate log;
41014102
41024103
fn main() {
41034104
error!("This is an error log")

branches/try2/src/etc/licenseck.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"libstd/sync/spsc_queue.rs", # BSD
4343
"libstd/sync/mpmc_bounded_queue.rs", # BSD
4444
"libsync/mpsc_intrusive.rs", # BSD
45-
"test/bench/shootout-fannkuch-redux.rs", # BSD
4645
"test/bench/shootout-meteor.rs", # BSD
4746
"test/bench/shootout-regex-dna.rs", # BSD
4847
]

branches/try2/src/liballoc/lib.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,8 @@
7070
#![no_std]
7171
#![feature(phase)]
7272

73-
#[cfg(stage0)]
7473
#[phase(syntax, link)]
7574
extern crate core;
76-
77-
#[cfg(not(stage0))]
78-
#[phase(plugin, link)]
79-
extern crate core;
80-
8175
extern crate libc;
8276

8377

@@ -86,10 +80,8 @@ extern crate libc;
8680
#[cfg(test)] extern crate debug;
8781
#[cfg(test)] extern crate sync;
8882
#[cfg(test)] extern crate native;
89-
#[cfg(test, stage0)] #[phase(syntax, link)] extern crate std;
90-
#[cfg(test, stage0)] #[phase(syntax, link)] extern crate log;
91-
#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate std;
92-
#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate log;
83+
#[cfg(test)] #[phase(syntax, link)] extern crate std;
84+
#[cfg(test)] #[phase(syntax, link)] extern crate log;
9385

9486
// Heaps provided for low-level allocation strategies
9587

branches/try2/src/libcollections/bitv.rs

Lines changed: 26 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@
1313
use core::prelude::*;
1414

1515
use core::cmp;
16-
use core::default::Default;
1716
use core::fmt;
1817
use core::iter::{Enumerate, Repeat, Map, Zip};
1918
use core::ops;
2019
use core::slice;
2120
use core::uint;
22-
use std::hash;
2321

24-
use {Collection, Mutable, Set, MutableSet};
2522
use vec::Vec;
2623

2724
#[deriving(Clone)]
@@ -37,12 +34,12 @@ fn small_mask(nbits: uint) -> uint {
3734
}
3835

3936
impl SmallBitv {
40-
fn new(bits: uint) -> SmallBitv {
37+
pub fn new(bits: uint) -> SmallBitv {
4138
SmallBitv {bits: bits}
4239
}
4340

4441
#[inline]
45-
fn bits_op(&mut self,
42+
pub fn bits_op(&mut self,
4643
right_bits: uint,
4744
nbits: uint,
4845
f: |uint, uint| -> uint)
@@ -55,32 +52,32 @@ impl SmallBitv {
5552
}
5653

5754
#[inline]
58-
fn union(&mut self, s: &SmallBitv, nbits: uint) -> bool {
55+
pub fn union(&mut self, s: &SmallBitv, nbits: uint) -> bool {
5956
self.bits_op(s.bits, nbits, |u1, u2| u1 | u2)
6057
}
6158

6259
#[inline]
63-
fn intersect(&mut self, s: &SmallBitv, nbits: uint) -> bool {
60+
pub fn intersect(&mut self, s: &SmallBitv, nbits: uint) -> bool {
6461
self.bits_op(s.bits, nbits, |u1, u2| u1 & u2)
6562
}
6663

6764
#[inline]
68-
fn become(&mut self, s: &SmallBitv, nbits: uint) -> bool {
65+
pub fn become(&mut self, s: &SmallBitv, nbits: uint) -> bool {
6966
self.bits_op(s.bits, nbits, |_u1, u2| u2)
7067
}
7168

7269
#[inline]
73-
fn difference(&mut self, s: &SmallBitv, nbits: uint) -> bool {
70+
pub fn difference(&mut self, s: &SmallBitv, nbits: uint) -> bool {
7471
self.bits_op(s.bits, nbits, |u1, u2| u1 & !u2)
7572
}
7673

7774
#[inline]
78-
fn get(&self, i: uint) -> bool {
75+
pub fn get(&self, i: uint) -> bool {
7976
(self.bits & (1 << i)) != 0
8077
}
8178

8279
#[inline]
83-
fn set(&mut self, i: uint, x: bool) {
80+
pub fn set(&mut self, i: uint, x: bool) {
8481
if x {
8582
self.bits |= 1<<i;
8683
}
@@ -90,29 +87,29 @@ impl SmallBitv {
9087
}
9188

9289
#[inline]
93-
fn equals(&self, b: &SmallBitv, nbits: uint) -> bool {
90+
pub fn equals(&self, b: &SmallBitv, nbits: uint) -> bool {
9491
let mask = small_mask(nbits);
9592
mask & self.bits == mask & b.bits
9693
}
9794

9895
#[inline]
99-
fn clear(&mut self) { self.bits = 0; }
96+
pub fn clear(&mut self) { self.bits = 0; }
10097

10198
#[inline]
102-
fn set_all(&mut self) { self.bits = !0; }
99+
pub fn set_all(&mut self) { self.bits = !0; }
103100

104101
#[inline]
105-
fn all(&self, nbits: uint) -> bool {
102+
pub fn all(&self, nbits: uint) -> bool {
106103
small_mask(nbits) & !self.bits == 0
107104
}
108105

109106
#[inline]
110-
fn none(&self, nbits: uint) -> bool {
107+
pub fn none(&self, nbits: uint) -> bool {
111108
small_mask(nbits) & self.bits == 0
112109
}
113110

114111
#[inline]
115-
fn negate(&mut self) { self.bits = !self.bits; }
112+
pub fn negate(&mut self) { self.bits = !self.bits; }
116113
}
117114

118115
#[deriving(Clone)]
@@ -137,12 +134,12 @@ fn big_mask(nbits: uint, elem: uint) -> uint {
137134
}
138135

139136
impl BigBitv {
140-
fn new(storage: Vec<uint>) -> BigBitv {
137+
pub fn new(storage: Vec<uint>) -> BigBitv {
141138
BigBitv {storage: storage}
142139
}
143140

144141
#[inline]
145-
fn process(&mut self,
142+
pub fn process(&mut self,
146143
b: &BigBitv,
147144
nbits: uint,
148145
op: |uint, uint| -> uint)
@@ -166,45 +163,45 @@ impl BigBitv {
166163
}
167164

168165
#[inline]
169-
fn each_storage(&mut self, op: |v: &mut uint| -> bool) -> bool {
166+
pub fn each_storage(&mut self, op: |v: &mut uint| -> bool) -> bool {
170167
self.storage.mut_iter().advance(|elt| op(elt))
171168
}
172169

173170
#[inline]
174-
fn negate(&mut self) {
171+
pub fn negate(&mut self) {
175172
self.each_storage(|w| { *w = !*w; true });
176173
}
177174

178175
#[inline]
179-
fn union(&mut self, b: &BigBitv, nbits: uint) -> bool {
176+
pub fn union(&mut self, b: &BigBitv, nbits: uint) -> bool {
180177
self.process(b, nbits, |w1, w2| w1 | w2)
181178
}
182179

183180
#[inline]
184-
fn intersect(&mut self, b: &BigBitv, nbits: uint) -> bool {
181+
pub fn intersect(&mut self, b: &BigBitv, nbits: uint) -> bool {
185182
self.process(b, nbits, |w1, w2| w1 & w2)
186183
}
187184

188185
#[inline]
189-
fn become(&mut self, b: &BigBitv, nbits: uint) -> bool {
186+
pub fn become(&mut self, b: &BigBitv, nbits: uint) -> bool {
190187
self.process(b, nbits, |_, w| w)
191188
}
192189

193190
#[inline]
194-
fn difference(&mut self, b: &BigBitv, nbits: uint) -> bool {
191+
pub fn difference(&mut self, b: &BigBitv, nbits: uint) -> bool {
195192
self.process(b, nbits, |w1, w2| w1 & !w2)
196193
}
197194

198195
#[inline]
199-
fn get(&self, i: uint) -> bool {
196+
pub fn get(&self, i: uint) -> bool {
200197
let w = i / uint::BITS;
201198
let b = i % uint::BITS;
202199
let x = 1 & self.storage.get(w) >> b;
203200
x == 1
204201
}
205202

206203
#[inline]
207-
fn set(&mut self, i: uint, x: bool) {
204+
pub fn set(&mut self, i: uint, x: bool) {
208205
let w = i / uint::BITS;
209206
let b = i % uint::BITS;
210207
let flag = 1 << b;
@@ -213,7 +210,7 @@ impl BigBitv {
213210
}
214211

215212
#[inline]
216-
fn equals(&self, b: &BigBitv, nbits: uint) -> bool {
213+
pub fn equals(&self, b: &BigBitv, nbits: uint) -> bool {
217214
for (i, elt) in b.storage.iter().enumerate() {
218215
let mask = big_mask(nbits, i);
219216
if mask & *self.storage.get(i) != mask & *elt {
@@ -599,20 +596,6 @@ impl fmt::Show for Bitv {
599596
}
600597
}
601598

602-
impl<S: hash::Writer> hash::Hash<S> for Bitv {
603-
fn hash(&self, state: &mut S) {
604-
self.nbits.hash(state);
605-
match self.rep {
606-
Small(ref s) => (s.bits & small_mask(self.nbits)).hash(state),
607-
Big(ref b) => {
608-
for (i, ele) in b.storage.iter().enumerate() {
609-
(ele & big_mask(self.nbits, i)).hash(state);
610-
}
611-
}
612-
}
613-
}
614-
}
615-
616599
#[inline]
617600
fn iterate_bits(base: uint, bits: uint, f: |uint| -> bool) -> bool {
618601
if bits == 0 {
@@ -699,11 +682,6 @@ pub struct BitvSet {
699682
bitv: BigBitv
700683
}
701684

702-
impl Default for BitvSet {
703-
#[inline]
704-
fn default() -> BitvSet { BitvSet::new() }
705-
}
706-
707685
impl BitvSet {
708686
/// Creates a new bit vector set with initially no contents
709687
pub fn new() -> BitvSet {
@@ -856,15 +834,7 @@ impl fmt::Show for BitvSet {
856834
}
857835
}
858836

859-
impl<S: hash::Writer> hash::Hash<S> for BitvSet {
860-
fn hash(&self, state: &mut S) {
861-
for pos in self.iter() {
862-
pos.hash(state);
863-
}
864-
}
865-
}
866-
867-
impl Collection for BitvSet {
837+
impl Container for BitvSet {
868838
#[inline]
869839
fn len(&self) -> uint { self.size }
870840
}
@@ -1015,7 +985,6 @@ mod tests {
1015985
use std::rand::Rng;
1016986
use test::Bencher;
1017987

1018-
use {Set, Mutable, MutableSet};
1019988
use bitv::{Bitv, SmallBitv, BigBitv, BitvSet, from_bools, from_fn,
1020989
from_bytes};
1021990
use bitv;

branches/try2/src/libcollections/btree.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use alloc::owned::Box;
2424
use core::fmt;
2525
use core::fmt::Show;
2626

27-
use Collection;
2827
use vec::Vec;
2928

3029
#[allow(missing_doc)]

0 commit comments

Comments
 (0)