Skip to content

Commit 6bd04d2

Browse files
committed
---
yaml --- r: 92914 b: refs/heads/auto c: 99dbb1d h: refs/heads/master v: v3
1 parent 8a775a1 commit 6bd04d2

File tree

20 files changed

+45
-391
lines changed

20 files changed

+45
-391
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: ee634e3ac455032227f44ee7577b3d65be4acb61
16+
refs/heads/auto: 99dbb1d51f3f08d1cd94179687cbe69c3218ef87
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/RELEASES.txt

Lines changed: 3 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,10 @@
1-
Version 0.9 (January 2014)
1+
Version 0.9 (XXX 2013)
22
--------------------------
33

4-
* ~1600 changes, numerous bugfixes
5-
6-
* Language
7-
* The `float` type has been removed. Use `f32` or `f64` instead.
8-
* A new facility for enabling experimental features (feature gating) has
9-
been added, using the crate-level `#[feature(foo)]` attribute.
10-
* Managed boxes (@) are now behind a feature gate
11-
(`#[feature(managed_boxes)]`) in preperation for future removal. Use the
12-
standard library's `Gc` or `Rc` types instead.
13-
* `@mut` has been removed. Use `std::cell::{Cell, RefCell}` instead.
14-
* Jumping back to the top of a loop is now done with `continue` instead of
15-
`loop`.
16-
* Strings can no longer be mutated through index assignment.
17-
* Raw strings can be created via the basic `r"foo"` syntax or with matched
18-
hash delimiters, as in `r###"foo"###`.
19-
* `~fn` is now written `proc (args) -> retval { ... }` and may only be
20-
called once.
21-
* The `&fn` type is now written `|args| -> ret` to match the literal form.
22-
* `@fn`s have been removed.
23-
* `do` only works with procs in order to make it obvious what the cost
24-
of `do` is.
25-
* The `#[link(...)]` attribute has been replaced with
26-
`#[crate_id = "name#vers"]`.
27-
* Empty `impl`s must be terminated with empty braces and may not be
28-
terminated with a semicolon.
29-
* Keywords are no longer allowed as lifetime names; the `self` lifetime
30-
no longer has any special meaning.
31-
* The old `fmt!` string formatting macro has been removed.
32-
* `printf!` and `printfln!` (old-style formatting) removed in favor of
33-
`print!` and `println!`.
34-
* `mut` works in patterns now, as in `let (mut x, y) = (1, 2);`.
35-
* New reserved keywords: `alignof`, `offsetof`, `sizeof`.
36-
* Macros can have attributes.
37-
* Macros can expand to items with attributes.
38-
* Macros can expand to multiple items.
39-
* The `asm!` macro is feature-gated (`#[feature(asm)]`).
40-
* Comments may be nested.
41-
* Values automatically coerce to trait objects they implement, without
42-
an explicit `as`.
43-
* Enum discriminants are no longer an entire word but as small as needed to
44-
contain all the variants. The `repr` attribute can be used to override
45-
the discriminant size, as in `#[repr(int)]` for integer-sized, and
46-
`#[repr(C)]` to match C enums.
47-
* Non-string literals are not allowed in attributes (they never worked).
48-
* The FFI now supports variadic functions.
49-
* Octal numeric literals, as in `0o7777`.
50-
* The `concat!` syntax extension performs compile-time string concatenation.
51-
* The `#[fixed_stack_segment]` and `#[rust_stack]` attributes have been
52-
removed as Rust no longer uses segmented stacks.
53-
* Non-ascii identifiers are feature-gated (`#[feature(non_ascii_idents)]`).
54-
* Ignoring all fields of an enum variant or tuple-struct is done with `..`,
55-
not `*`; ignoring remaining fields of a struct is also done with `..`,
56-
not `_`; ignoring a slice of a vector is done with `..`, not `.._`.
57-
* `rustc` supports the "win64" calling convention via `extern "win64"`.
58-
* `rustc` supports the "system" calling convention, which defaults to the
59-
preferred convention for the target platform, "stdcall" on 32-bit Windows,
60-
"C" elsewhere.
61-
* The `type_overflow` lint (default: warn) checks literals for overflow.
62-
* The `unsafe_block` lint (default: allow) checks for usage of `unsafe`.
63-
* The `attribute_usage` lint (default: warn) warns about unknown
64-
attributes.
65-
* The `unknown_features` lint (default: warn) warns about unknown
66-
feature gates.
67-
* The `dead_code` lint (default: warn) checks for dead code.
68-
* Rust libraries can be linked statically to one another
69-
* `#[link_args]` is behind the `link_args` feature gate.
70-
* Native libraries are now linked with `#[link(name = "foo")]`
71-
* Native libraries can be statically linked to a rust crate
72-
(`#[link(name = "foo", kind = "static")]`).
73-
* Native OS X frameworks are now officially supported
74-
(`#[link(name = "foo", kind = "framework")]`).
75-
* The `#[thread_local]` attribute creates thread-local (not task-local)
76-
variables. Currently behind the `thread_local` feature gate.
77-
* The `return` keyword may be used in closures.
78-
* Types that can be copied via a memcpy implement the `Pod` kind.
79-
80-
* Libraries
81-
* std: The `option` and `result` API's have been overhauled to make them
82-
simpler, more consistent, and more composable.
83-
* std: The entire `std::io` module has been replaced with one that is
84-
more comprehensive and that properly interfaces with the underlying
85-
scheduler. File, TCP, UDP, Unix sockets, pipes, and timers are all
86-
implemented.
87-
* std: `io::util` contains a number of useful implementations of
88-
`Reader` and `Writer`, including `NullReader`, `NullWriter`,
89-
`ZeroReader`, `TeeReader`.
90-
* std: The reference counted pointer type `extra::rc` moved into std.
91-
* std: The `Gc` type in the `gc` module will replace `@` (it is currently
92-
just a wrapper around it).
93-
* std: `fmt::Default` can be implemented for any type to provide default
94-
formatting to the `format!` macro, as in `format!("{}", myfoo)`.
95-
* std: The `rand` API continues to be tweaked.
96-
* std: Functions dealing with type size and alignment have moved from the
97-
`sys` module to the `mem` module.
98-
* std: The `path` module was written and API changed.
99-
* std: `str::from_utf8` has been changed to cast instead of allocate.
100-
* std: `starts_with` and `ends_with` methods added to vectors via the
101-
`ImmutableEqVector` trait, which is in the prelude.
102-
* std: Vectors can be indexed with the `get_opt` method, which returns `None`
103-
if the index is out of bounds.
104-
* std: Task failure no longer propagates between tasks, as the model was
105-
complex, expensive, and incompatible with thread-based tasks.
106-
* std: The `Any` type can be used for dynamic typing.
107-
* std: `~Any` can be passed to the `fail!` macro and retrieved via
108-
`task::try`.
109-
* std: Methods that produce iterators generally do not have an `_iter`
110-
suffix now.
111-
* std: `cell::Cell` and `cell::RefCell` can be used to introduce mutability
112-
roots (mutable fields, etc.). Use instead of e.g. `@mut`.
113-
* std: `util::ignore` renamed to `prelude::drop`.
114-
* std: Slices have `sort` and `sort_by` methods via the `MutableVector`
115-
trait.
116-
* std: `vec::raw` has seen a lot of cleanup and API changes.
117-
* std: The standard library no longer includes any C++ code, and very
118-
minimal C, eliminating the dependency on libstdc++.
119-
* std: Runtime scheduling and I/O functionality has been factored out into
120-
extensible interfaces and is now implemented by two different crates:
121-
libnative, for native threading and I/O; and libgreen, for green threading
122-
and I/O. This paves the way for using the standard library in more limited
123-
embeded environments.
124-
* std: The `comm` module has been rewritten to be much faster, have a
125-
simpler, more consistent API, and to work for both native and green
126-
threading.
127-
* std: All libuv dependencies have been moved into the rustuv crate.
128-
* native: New implementations of runtime scheduling on top of OS threads.
129-
* native: New native implementations of TCP, UDP, file I/O, process spawning,
130-
and other I/O.
131-
* green: The green thread scheduler and message passing types are almost
132-
entirely lock-free.
133-
* extra: The `flatpipes` module had bitrotted and was removed.
134-
* extra: All crypto functions have been removed and Rust now has a policy of
135-
not reimplementing crypto in the standard library. In the future crypto
136-
will be provided by external crates with bindings to established libraries.
137-
* extra: `c_vec` has been modernized.
138-
* extra: The `sort` module has been removed. Use the `sort` method on
139-
mutable slices.
4+
* ~XXX changes, numerous bugfixes
1405

1416
* Tooling
142-
* The `rust` and `rusti` commands have been removed, due to lack of
143-
maintenance.
144-
* `rustdoc` was completely rewritten.
145-
* `rustdoc` can test code examples in documentation.
146-
* `rustpkg` can test packages with the argument, 'test'.
147-
* `rustpkg` supports arbitrary dependencies, including C libraries.
148-
* `rustc`'s support for generating debug info is improved again.
149-
* `rustc` has better error reporting for unbalanced delimiters.
150-
* `rustc`'s JIT support was removed due to bitrot.
151-
* Executables and static libraries can be built with LTO (-Z lto)
152-
* `rustc` adds a `--dep-info` flag for communicating dependencies to
153-
build tools.
7+
* The `rust` and `rusti` commands have been removed, due to lack of maintenance.
1548

1559
Version 0.8 (September 2013)
15610
--------------------------

branches/auto/src/libextra/ebml.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ pub mod reader {
122122
fail!("vint too big");
123123
}
124124

125+
#[cfg(target_arch = "x86")]
126+
#[cfg(target_arch = "x86_64")]
125127
pub fn vuint_at(data: &[u8], start: uint) -> Res {
126128
use std::ptr::offset;
127-
use std::unstable::intrinsics::from_be32;
129+
use std::unstable::intrinsics::bswap32;
128130

129131
if data.len() - start < 4 {
130132
return vuint_at_slow(data, start);
@@ -134,7 +136,7 @@ pub mod reader {
134136
let (ptr, _): (*u8, uint) = transmute(data);
135137
let ptr = offset(ptr, start as int);
136138
let ptr: *i32 = transmute(ptr);
137-
let val = from_be32(*ptr);
139+
let val = bswap32(*ptr);
138140
let val: u32 = transmute(val);
139141
if (val & 0x80000000) != 0 {
140142
Res {
@@ -160,6 +162,11 @@ pub mod reader {
160162
}
161163
}
162164

165+
#[cfg(not(target_arch = "x86"), not(target_arch = "x86_64"))]
166+
pub fn vuint_at(data: &[u8], start: uint) -> Res {
167+
vuint_at_slow(data, start)
168+
}
169+
163170
pub fn Doc<'a>(data: &'a [u8]) -> Doc<'a> {
164171
Doc { data: data, start: 0u, end: data.len() }
165172
}

branches/auto/src/libnative/io/net.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@ use super::file::keep_going;
2626
#[cfg(windows)] pub type sock_t = libc::SOCKET;
2727
#[cfg(unix)] pub type sock_t = super::file::fd_t;
2828

29+
#[cfg(target_endian = "big")] pub fn htons(x: u16) -> u16 { x }
30+
#[cfg(target_endian = "big")] pub fn ntohs(x: u16) -> u16 { x }
31+
#[cfg(target_endian = "little")]
2932
pub fn htons(u: u16) -> u16 {
30-
intrinsics::to_be16(u as i16) as u16
33+
unsafe { intrinsics::bswap16(u as i16) as u16 }
3134
}
35+
#[cfg(target_endian = "little")]
3236
pub fn ntohs(u: u16) -> u16 {
33-
intrinsics::from_be16(u as i16) as u16
37+
unsafe { intrinsics::bswap16(u as i16) as u16 }
3438
}
3539

3640
enum InAddr {

branches/auto/src/librustc/middle/dead.rs

Lines changed: 23 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,6 @@ impl MarkSymbolVisitor {
6262
}
6363
}
6464

65-
fn check_def_id(&mut self, def_id: ast::DefId) {
66-
if should_explore(self.tcx, def_id) {
67-
self.worklist.push(def_id.node);
68-
}
69-
self.live_symbols.insert(def_id.node);
70-
}
71-
7265
fn lookup_and_handle_definition(&mut self, id: &ast::NodeId) {
7366
let def_map = self.tcx.def_map.borrow();
7467
let def = match def_map.get().find(id) {
@@ -81,44 +74,13 @@ impl MarkSymbolVisitor {
8174
_ => Some(def_id_of_def(def)),
8275
};
8376
match def_id {
84-
Some(def_id) => self.check_def_id(def_id),
85-
None => (),
86-
}
87-
}
88-
89-
fn lookup_and_handle_method(&mut self, id: &ast::NodeId,
90-
span: codemap::Span) {
91-
let method_map = self.method_map.borrow();
92-
match method_map.get().find(id) {
93-
Some(&typeck::method_map_entry { origin, .. }) => {
94-
match origin {
95-
typeck::method_static(def_id) => {
96-
match ty::provided_source(self.tcx, def_id) {
97-
Some(p_did) => self.check_def_id(p_did),
98-
None => self.check_def_id(def_id)
99-
}
100-
}
101-
typeck::method_param(typeck::method_param {
102-
trait_id: trait_id,
103-
method_num: index,
104-
..
105-
})
106-
| typeck::method_object(typeck::method_object {
107-
trait_id: trait_id,
108-
method_num: index,
109-
..
110-
}) => {
111-
let def_id = ty::trait_method(self.tcx,
112-
trait_id, index).def_id;
113-
self.check_def_id(def_id);
114-
}
77+
Some(def_id) => {
78+
if should_explore(self.tcx, def_id) {
79+
self.worklist.push(def_id.node);
11580
}
81+
self.live_symbols.insert(def_id.node);
11682
}
117-
None => {
118-
self.tcx.sess.span_bug(span,
119-
"method call expression not \
120-
in method map?!")
121-
}
83+
None => (),
12284
}
12385
}
12486

@@ -173,7 +135,24 @@ impl Visitor<()> for MarkSymbolVisitor {
173135
fn visit_expr(&mut self, expr: @ast::Expr, _: ()) {
174136
match expr.node {
175137
ast::ExprMethodCall(..) => {
176-
self.lookup_and_handle_method(&expr.id, expr.span);
138+
let method_map = self.method_map.borrow();
139+
match method_map.get().find(&expr.id) {
140+
Some(&typeck::method_map_entry {
141+
origin: typeck::method_static(def_id),
142+
..
143+
}) => {
144+
if should_explore(self.tcx, def_id) {
145+
self.worklist.push(def_id.node);
146+
}
147+
self.live_symbols.insert(def_id.node);
148+
}
149+
Some(_) => (),
150+
None => {
151+
self.tcx.sess.span_bug(expr.span,
152+
"method call expression not \
153+
in method map?!")
154+
}
155+
}
177156
}
178157
_ => ()
179158
}

branches/auto/src/librustc/middle/privacy.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -167,23 +167,6 @@ struct EmbargoVisitor<'a> {
167167
reexports: HashSet<ast::NodeId>,
168168
}
169169

170-
impl<'a> EmbargoVisitor<'a> {
171-
// There are checks inside of privacy which depend on knowing whether a
172-
// trait should be exported or not. The two current consumers of this are:
173-
//
174-
// 1. Should default methods of a trait be exported?
175-
// 2. Should the methods of an implementation of a trait be exported?
176-
//
177-
// The answer to both of these questions partly rely on whether the trait
178-
// itself is exported or not. If the trait is somehow exported, then the
179-
// answers to both questions must be yes. Right now this question involves
180-
// more analysis than is currently done in rustc, so we conservatively
181-
// answer "yes" so that all traits need to be exported.
182-
fn exported_trait(&self, _id: ast::NodeId) -> bool {
183-
true
184-
}
185-
}
186-
187170
impl<'a> Visitor<()> for EmbargoVisitor<'a> {
188171
fn visit_item(&mut self, item: @ast::item, _: ()) {
189172
let orig_all_pub = self.prev_exported;
@@ -192,12 +175,6 @@ impl<'a> Visitor<()> for EmbargoVisitor<'a> {
192175
// cannot have visibility qualifiers on them anyway
193176
ast::item_impl(..) | ast::item_foreign_mod(..) => {}
194177

195-
// Traits are a little special in that even if they themselves are
196-
// not public they may still be exported.
197-
ast::item_trait(..) => {
198-
self.prev_exported = self.exported_trait(item.id);
199-
}
200-
201178
// Private by default, hence we only retain the "public chain" if
202179
// `pub` is explicitly listed.
203180
_ => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// * There's no way to find out the ty::t type of a ValueRef. Doing so
2121
// would be "trying to get the eggs out of an omelette" (credit:
2222
// pcwalton). You can, instead, find out its TypeRef by calling val_ty,
23-
// but many TypeRefs correspond to one ty::t; for instance, tup(int, int,
23+
// but one TypeRef corresponds to many `ty::t`s; for instance, tup(int, int,
2424
// int) and rec(x=int, y=int, z=int) will have the same TypeRef.
2525

2626

branches/auto/src/libstd/io/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ Some examples of obvious things you might want to do
5353
# let _g = ::std::io::ignore_io_error();
5454
let mut file = File::create(&Path::new("message.txt"));
5555
file.write(bytes!("hello, file!\n"));
56-
# drop(file);
57-
# ::std::io::fs::unlink(&Path::new("message.txt"));
5856
```
5957
6058
* Iterate over the lines of a file

branches/auto/src/libstd/local_data.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ pub type Key<T> = &'static KeyValue<T>;
6262
#[allow(missing_doc)]
6363
pub enum KeyValue<T> { Key }
6464

65-
#[allow(missing_doc)]
6665
trait LocalData {}
6766
impl<T: 'static> LocalData for T {}
6867

branches/auto/src/libstd/unstable/intrinsics.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -500,19 +500,6 @@ extern "rust-intrinsic" {
500500
#[cfg(target_endian = "little")] pub fn to_be64(x: i64) -> i64 { unsafe { bswap64(x) } }
501501
#[cfg(target_endian = "big")] pub fn to_be64(x: i64) -> i64 { x }
502502

503-
#[cfg(target_endian = "little")] pub fn from_le16(x: i16) -> i16 { x }
504-
#[cfg(target_endian = "big")] pub fn from_le16(x: i16) -> i16 { unsafe { bswap16(x) } }
505-
#[cfg(target_endian = "little")] pub fn from_le32(x: i32) -> i32 { x }
506-
#[cfg(target_endian = "big")] pub fn from_le32(x: i32) -> i32 { unsafe { bswap32(x) } }
507-
#[cfg(target_endian = "little")] pub fn from_le64(x: i64) -> i64 { x }
508-
#[cfg(target_endian = "big")] pub fn from_le64(x: i64) -> i64 { unsafe { bswap64(x) } }
509-
510-
#[cfg(target_endian = "little")] pub fn from_be16(x: i16) -> i16 { unsafe { bswap16(x) } }
511-
#[cfg(target_endian = "big")] pub fn from_be16(x: i16) -> i16 { x }
512-
#[cfg(target_endian = "little")] pub fn from_be32(x: i32) -> i32 { unsafe { bswap32(x) } }
513-
#[cfg(target_endian = "big")] pub fn from_be32(x: i32) -> i32 { x }
514-
#[cfg(target_endian = "little")] pub fn from_be64(x: i64) -> i64 { unsafe { bswap64(x) } }
515-
#[cfg(target_endian = "big")] pub fn from_be64(x: i64) -> i64 { x }
516503

517504
/// `TypeId` represents a globally unique identifier for a type
518505
#[lang="type_id"] // This needs to be kept in lockstep with the code in trans/intrinsic.rs and

0 commit comments

Comments
 (0)