Skip to content

Commit 8631cb4

Browse files
committed
---
yaml --- r: 63412 b: refs/heads/snap-stage3 c: a6bc5dd h: refs/heads/master v: v3
1 parent 1ad739a commit 8631cb4

Some content is hidden

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

63 files changed

+1743
-4155
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 319cf6e465f203c794d71800808c2bd60a1e7613
4+
refs/heads/snap-stage3: a6bc5dd6efd9b43640c5067c51563262c9ea7986
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/RELEASES.txt

Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,90 @@ Version 0.7 (July 2013)
44
* ??? changes, numerous bugfixes
55

66
* Syntax changes
7-
* `#[deriving(Encodable)]`, `#[deriving(Decodable)]`
7+
* `use mod` is no longer valid.
8+
* `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
9+
argument list.
10+
* `Encodable`, `Decodable`, `TotalOrd`, `TotalEq`, `DeepClone` can all
11+
be automatically derived with `#[deriving(...)]`.
12+
* The `Durable` trait is replaced with the `'static` bounds.
13+
* At long last, 'argument modes' no longer exist.
14+
* The `bytes!` macro returns a vector of bytes for string, u8, char,
15+
and unsuffixed integer literals.
816

917
* Semantic changes
18+
* The borrow checker has been rewritten with flow-sensitivity, fixing
19+
many bugs and inconveniences.
1020
* The `self` parameter no longer implicitly means `&'self self`,
1121
and can be explicitly marked with a lifetime.
1222
* Structs with the `#[packed]` attribute have byte alignment and
1323
no padding between fields.
24+
* The `for` loop protocol now requires `for`-iterators to return `bool`
25+
so they compose better.
26+
* `Option<~T>` is now represented as a nullable pointer.
27+
* `@mut` does dynamic borrow checks correctly.
28+
* Macros TODO
29+
* The `main` function is only detected at the topmost level of the crate.
30+
The `#[main]` attribute is still valid anywhere.
31+
* Struct fields may no longer be mutable. Use inherited mutability.
32+
* The `#[non_owned]` attribute makes a type that would otherwise be
33+
`Owned`, not. TODO this may change to non_send before 0.7
34+
* The `#[mutable]` attribute makes a type that would otherwise be
35+
`Const`, note. TODO this may change to non_freeze before 0.7
36+
* Unbounded recursion will abort the process after reaching the limit
37+
specified by the `RUST_MAX_STACK` environment variable.
38+
* The `vecs_implicitly_copyable` lint mode has been removed. Vectors
39+
are never implicitly copyable.
1440

1541
* Libraries
16-
17-
**Note: in 0.7 `core` was renamed `std` and `std` to `extra.
18-
These notes use the new crate names.**
19-
2042
* The `core` crate was renamed to `std`.
2143
* The `std` crate was renamed to `extra`.
2244
* `std::mut` removed.
45+
* std: The prelude no longer reexports any modules, only types and traits.
46+
* std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
47+
`Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
2348
* std: `iterator` module for external iterator objects.
49+
* std: new numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
50+
`Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
51+
* std: Tuple traits and accessors defined for up to 12-tuples, e.g.
52+
`(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
2453
* std: many types implement `Clone` - tuples, @, @mut. TODO
2554
* std: `path` type renamed to `Path`.
2655
* std: Many standalone functions removed in favor of methods in
27-
`vec`, `str`, TODO. In the future methods will also work as functions.
56+
`vec`, `str`. In the future methods will also work as functions.
57+
* std: `reinterpret_cast` removed. Used `transmute`.
58+
* std: ascii string handling in `std::ascii`.
59+
* std: `Rand` is implemented for ~/@.
60+
* std: `run` module for spawning processes overhauled.
61+
* std: Various atomic types added to `unstable::atomic`.
62+
* std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
63+
* std: Added `os::mkdir_recursive`.
64+
* std: Added `os::glob` function performs filesystems globs.
65+
* std: `FuzzyEq` renamed to `ApproxEq`.
66+
* std: `Map` now defines `pop` and `swap` methods.
67+
* extra: `flate` module moved from `std` to `extra`.
2868
* extra: `FileInput` implements `std::io::Reader`.
2969
* extra: `Complex` number type and `complex` module.
3070
* extra: `Rational` number type and `rational` module.
3171
* extra: `BigInt`, `BigUint` implement numeric and comparison traits.
72+
* extra: `term` uses terminfo now, is more correct.
3273

33-
* Other
74+
* Tooling
3475
* `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks.
35-
* More and improved library documentation.
76+
* `unused_mut` lint mode for identifying unused `mut` qualifiers.
3677
* The `rusti` command has been rewritten and a number of bugs addressed.
78+
* rustc outputs in color on more terminals.
79+
* rustc accepts a `--link-args` flag to pass arguments to the linker.
80+
* rustc accepts a `-Z print-link-args` flag for debugging linkage.
81+
* Compiling with `-g` will make the binary record information about
82+
dynamic borrowcheck failures for debugging.
83+
* rustdoc has a nicer stylesheet.
84+
* Various improvements to rustdoc.
85+
86+
* Other
87+
* More and improved library documentation.
88+
* Various improvements on ARM and Android.
89+
* Various improvements to MIPS backend.
90+
* jemalloc is the Rust allocator.
3791

3892
Version 0.6 (April 2013)
3993
------------------------

branches/snap-stage3/src/librustc/back/link.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use lib::llvm::ModuleRef;
1818
use lib;
1919
use metadata::common::LinkMeta;
2020
use metadata::{encoder, csearch, cstore};
21-
use middle::trans::context::CrateContext;
21+
use middle::trans::common::CrateContext;
2222
use middle::ty;
2323
use util::ppaux;
2424

@@ -622,11 +622,11 @@ pub fn symbol_hash(tcx: ty::ctxt,
622622
hash.to_managed()
623623
}
624624

625-
pub fn get_symbol_hash(ccx: &mut CrateContext, t: ty::t) -> @str {
625+
pub fn get_symbol_hash(ccx: @CrateContext, t: ty::t) -> @str {
626626
match ccx.type_hashcodes.find(&t) {
627627
Some(&h) => h,
628628
None => {
629-
let hash = symbol_hash(ccx.tcx, &mut ccx.symbol_hasher, t, ccx.link_meta);
629+
let hash = symbol_hash(ccx.tcx, ccx.symbol_hasher, t, ccx.link_meta);
630630
ccx.type_hashcodes.insert(t, hash);
631631
hash
632632
}
@@ -705,7 +705,7 @@ pub fn exported_name(sess: Session,
705705
path_name(sess.ident_of(vers))));
706706
}
707707

708-
pub fn mangle_exported_name(ccx: &mut CrateContext,
708+
pub fn mangle_exported_name(ccx: @CrateContext,
709709
path: path,
710710
t: ty::t) -> ~str {
711711
let hash = get_symbol_hash(ccx, t);
@@ -714,7 +714,7 @@ pub fn mangle_exported_name(ccx: &mut CrateContext,
714714
ccx.link_meta.vers);
715715
}
716716

717-
pub fn mangle_internal_name_by_type_only(ccx: &mut CrateContext,
717+
pub fn mangle_internal_name_by_type_only(ccx: @CrateContext,
718718
t: ty::t,
719719
name: &str) -> ~str {
720720
let s = ppaux::ty_to_short_str(ccx.tcx, t);
@@ -725,7 +725,7 @@ pub fn mangle_internal_name_by_type_only(ccx: &mut CrateContext,
725725
path_name(ccx.sess.ident_of(hash))]);
726726
}
727727

728-
pub fn mangle_internal_name_by_type_and_seq(ccx: &mut CrateContext,
728+
pub fn mangle_internal_name_by_type_and_seq(ccx: @CrateContext,
729729
t: ty::t,
730730
name: &str) -> ~str {
731731
let s = ppaux::ty_to_str(ccx.tcx, t);
@@ -736,18 +736,18 @@ pub fn mangle_internal_name_by_type_and_seq(ccx: &mut CrateContext,
736736
path_name((ccx.names)(name))]);
737737
}
738738

739-
pub fn mangle_internal_name_by_path_and_seq(ccx: &mut CrateContext,
739+
pub fn mangle_internal_name_by_path_and_seq(ccx: @CrateContext,
740740
path: path,
741741
flav: &str) -> ~str {
742742
return mangle(ccx.sess,
743743
vec::append_one(path, path_name((ccx.names)(flav))));
744744
}
745745

746-
pub fn mangle_internal_name_by_path(ccx: &mut CrateContext, path: path) -> ~str {
746+
pub fn mangle_internal_name_by_path(ccx: @CrateContext, path: path) -> ~str {
747747
return mangle(ccx.sess, path);
748748
}
749749

750-
pub fn mangle_internal_name_by_seq(ccx: &mut CrateContext, flav: &str) -> ~str {
750+
pub fn mangle_internal_name_by_seq(ccx: @CrateContext, flav: &str) -> ~str {
751751
return fmt!("%s_%u", flav, (ccx.names)(flav).name);
752752
}
753753

branches/snap-stage3/src/librustc/back/rpath.rs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ fn get_rpaths(os: session::os,
7777
// crates they depend on.
7878
let rel_rpaths = get_rpaths_relative_to_output(os, output, libs);
7979

80+
// Make backup absolute paths to the libraries. Binaries can
81+
// be moved as long as the crates they link against don't move.
82+
let abs_rpaths = get_absolute_rpaths(libs);
83+
8084
// And a final backup rpath to the global library location.
8185
let fallback_rpaths = ~[get_install_prefix_rpath(target_triple)];
8286

@@ -88,9 +92,11 @@ fn get_rpaths(os: session::os,
8892
}
8993

9094
log_rpaths("relative", rel_rpaths);
95+
log_rpaths("absolute", abs_rpaths);
9196
log_rpaths("fallback", fallback_rpaths);
9297

9398
let mut rpaths = rel_rpaths;
99+
rpaths.push_all(abs_rpaths);
94100
rpaths.push_all(fallback_rpaths);
95101

96102
// Remove duplicates
@@ -160,6 +166,14 @@ pub fn get_relative_to(abs1: &Path, abs2: &Path) -> Path {
160166
}
161167
}
162168

169+
fn get_absolute_rpaths(libs: &[Path]) -> ~[Path] {
170+
vec::map(libs, |a| get_absolute_rpath(a) )
171+
}
172+
173+
pub fn get_absolute_rpath(lib: &Path) -> Path {
174+
os::make_absolute(lib).dir_path()
175+
}
176+
163177
#[cfg(stage0)]
164178
pub fn get_install_prefix_rpath(target_triple: &str) -> Path {
165179
let install_prefix = env!("CFG_PREFIX");
@@ -206,7 +220,7 @@ mod test {
206220
// these redundant #[cfg(test)] blocks can be removed
207221
#[cfg(test)]
208222
#[cfg(test)]
209-
use back::rpath::{get_install_prefix_rpath};
223+
use back::rpath::{get_absolute_rpath, get_install_prefix_rpath};
210224
use back::rpath::{get_relative_to, get_rpath_relative_to_output};
211225
use back::rpath::{minimize_rpaths, rpaths_to_flags};
212226
use driver::session;
@@ -350,4 +364,14 @@ mod test {
350364
&Path("lib/libstd.so"));
351365
assert_eq!(res.to_str(), ~"@executable_path/../lib");
352366
}
367+
368+
#[test]
369+
fn test_get_absolute_rpath() {
370+
let res = get_absolute_rpath(&Path("lib/libstd.so"));
371+
debug!("test_get_absolute_rpath: %s vs. %s",
372+
res.to_str(),
373+
os::make_absolute(&Path("lib")).to_str());
374+
375+
assert_eq!(res, os::make_absolute(&Path("lib")));
376+
}
353377
}

0 commit comments

Comments
 (0)