Skip to content

Commit e9fd30a

Browse files
committed
---
yaml --- r: 145269 b: refs/heads/try2 c: 85c0fb7 h: refs/heads/master i: 145267: a28ce23 v: v3
1 parent cf7c4a1 commit e9fd30a

Some content is hidden

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

97 files changed

+2865
-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: 2f845a5e0aa9cdd4bc5dc25341bb241643f76f11
8+
refs/heads/try2: 85c0fb7b8a81fc48a2155decd20abf16b1c5eeb6
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/RELEASES.txt

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,148 @@
1+
Version 0.8 (October 2013)
2+
--------------------------
3+
4+
* ~2100 changes, numerous bugfixes
5+
6+
* Language
7+
* The `for` loop syntax has changed to work with the `Iterator` trait.
8+
* At long last, unwinding works on Windows.
9+
* Default methods definitely mostly work.
10+
* Many trait inheritance bugs fixed.
11+
* Owned and borrowed trait objects work more reliably.
12+
* `copy` is no longer a keyword. It has been replaced by the `Clone` trait.
13+
* rustc no longer emits code for the `debug!` macro unless it is passed
14+
`--cfg debug`
15+
* mod.rs is now "blessed". When loading `mod foo;`, rustc will now look
16+
for foo.rs, then foo/mod.rs, and will generate an error when both are
17+
present.
18+
* Strings no longer contain trailing nulls. The new `std::c_str` module
19+
provides new mechanisms for converting to C strings.
20+
* The type of foreign functions is now `extern "C" fn` instead of `*u8'.
21+
* The FFI has been overhauled such that foreign functions are called directly,
22+
instead of through a stack-switching wrapper.
23+
* Calling a foreign function must be done through a Rust function with the
24+
`#[fixed_stack_segment]` attribute.
25+
* The `externfn!` macro can be used to declare both a foreign function and
26+
a `#[fixed_stack_segment]` wrapper at once.
27+
* `pub` and `priv` modifiers on `extern` blocks are no longer parsed.
28+
* `unsafe` is no longer allowed on extern fns - they are all unsafe.
29+
* `priv` is disallowed everywhere except for struct fields and enum variants.
30+
* `&T` (besides `&'static T`) is no longer allowed in `@T`.
31+
* `ref` bindings in irrefutable patterns work correctly now.
32+
* `char` is now prevented from containing invalid code points.
33+
* Casting to `bool` is no longer allowed.
34+
* `yield` is a reserved keyword.
35+
* `typeof` is a reserved keyword.
36+
* Crates may be imported by URL with `extern mod foo = "url";`.
37+
* Explicit enum discriminants may be given as uints as in `enum E { V = 0u }`
38+
* Static vectors can be initialized with repeating elements,
39+
e.g. `static foo: [u8, .. 100]: [0, .. 100];`.
40+
* Static structs can be initialized with functional record update,
41+
e.g. `static foo: Foo = Foo { a: 5, .. bar };`.
42+
* `cfg!` can be used to conditionally execute code based on the crate
43+
configuration, similarly to `#[cfg(...)]`.
44+
* The `unnecessary_qualification` lint detects unneeded module
45+
prefixes (default: allow).
46+
* Arithmetic operations have been implemented on the SIMD types in
47+
`std::unstable::simd`.
48+
* Exchange allocation headers were removed, reducing memory usage.
49+
* `format!` implements a completely new, extensible, and higher-performance
50+
string formatting system. It will replace `fmt!`.
51+
* `print!` and `println!` write formatted strings (using the `format!`
52+
extension) to stdout.
53+
* `write!` and `writeln!` write formatted strings (using the `format!`
54+
extension) to the new Writers in `std::rt::io`.
55+
* The library section in which a function or static is placed may
56+
be specified with `#[link_section = "..."]`.
57+
* The `proto!` syntax extension for defining bounded message protocols
58+
was removed.
59+
* `macro_rules!` is hygenic for `let` declarations.
60+
* The `#[export_name]` attribute specifies the name of a symbol.
61+
* `unreachable!` can be used to indicate unreachable code, and fails
62+
if executed.
63+
64+
* Libraries
65+
* std: Transitioned to the new runtime, written in Rust.
66+
* std: Added an experimental I/O library, `rt::io`, based on the new
67+
runtime.
68+
* std: A new generic `range` function was added to the prelude, replacing
69+
`uint::range` and friends.
70+
* std: `range_rev` no longer exists. Since range is an iterator it can be
71+
reversed with `range(lo, hi).invert()`.
72+
* std: The `chain` method on option renamed to `and_then`; `unwrap_or_default`
73+
renamed to `unwrap_or`.
74+
* std: The `iterator` module was renamed to `iter`.
75+
* std: Integral types now support the `checked_add`, `checked_sub`, and
76+
`checked_mul` operations for detecting overflow.
77+
* std: Many methods in `str`, `vec`, `option, `result` were renamed for
78+
consistency.
79+
* std: Methods are standardizing on conventions for casting methods:
80+
`to_foo` for copying, `into_foo` for moving, `as_foo` for temporary
81+
and cheap casts.
82+
* std: The `CString` type in `c_str` provides new ways to convert to and
83+
from C strings.
84+
* std: `DoubleEndedIterator` can yield elements in two directions.
85+
* std: The `mut_split` method on vectors partitions an `&mut [T]` into
86+
two splices.
87+
* std: `str::from_bytes` renamed to `str::from_utf8`.
88+
* std: `pop_opt` and `shift_opt` methods added to vectors.
89+
* std: The task-local data interface no longer uses @, and keys are
90+
no longer function pointers.
91+
* std: The `swap_unwrap` method of `Option` renamed to `take_unwrap`.
92+
* std: Added `SharedPort` to `comm`.
93+
* std: `Eq` has a default method for `ne`; only `eq` is required
94+
in implementations.
95+
* std: `Ord` has default methods for `le`, `gt` and `le`; only `lt`
96+
is required in implementations.
97+
* std: `is_utf8` performance is improved, impacting many string functions.
98+
* std: `os::MemoryMap` provides cross-platform mmap.
99+
* std: `ptr::offset` is now unsafe, but also more optimized. Offsets that
100+
are not 'in-bounds' are considered undefined.
101+
* std: Many freestanding functions in `vec` removed in favor of methods.
102+
* std: Many freestanding functions on scalar types removed in favor of
103+
methods.
104+
* std: Many options to task builders were removed since they don't make
105+
sense in the new scheduler design.
106+
* std: More containers implement `FromIterator` so can be created by the
107+
`collect` method.
108+
* std: More complete atomic types in `unstable::atomics`.
109+
* std: `comm::PortSet` removed.
110+
* std: Mutating methods in the `Set` and `Map` traits have been moved into
111+
the `MutableSet` and `MutableMap` traits. `Container::is_empty`,
112+
`Map::contains_key`, `MutableMap::insert`, and `MutableMap::remove` have
113+
default implementations.
114+
* extra: `dlist`, the doubly-linked list was modernized.
115+
* extra: Added a `hex` module with `ToHex` and `FromHex` traits.
116+
* extra: Added `glob` module, replacing `std::os::glob`.
117+
* extra: `rope` was removed.
118+
* extra: `deque` was renamed to `ringbuf`. `RingBuf` implements `Deque`.
119+
* extra: `net`, and `timer` were removed. The experimental replacements
120+
are `std::rt::io::net` and `std::rt::io::timer`.
121+
* extra: Iterators implemented for `SmallIntMap`.
122+
* extra: Iterators implemented for `Bitv` and `BitvSet`.
123+
* extra: `SmallIntSet` removed. Use `BitvSet`.
124+
* extra: Performance of JSON parsing greatly improved.
125+
* extra: `semver` updated to SemVer 2.0.0.
126+
* extra: `term` handles more terminals correctly.
127+
* extra: `dbg` module removed.
128+
129+
* Other
130+
* rustc's debug info generation (`-Z debug-info`) is greatly improved.
131+
* rustc accepts `--target-cpu` to compile to a specific CPU architecture,
132+
similarly to gcc's `--march` flag.
133+
* rustpkg has received many improvements.
134+
* rustpkg supports git tags as package IDs.
135+
* rustpkg builds into target-specific directories so it can be used for
136+
cross-compiling.
137+
* The number of concurrent test tasks is controlled by the environment
138+
variable RUST_TEST_TASKS.
139+
* The test harness can now report metrics for benchmarks.
140+
* All tools have man pages.
141+
* Programs compiled with `--test` now support the `-h` and `--help` flags.
142+
* The runtime uses jemalloc for allocations.
143+
* Segmented stacks are temporarily disabled as part of the transition to
144+
the new runtime. Stack overflows are possible!
145+
1146
Version 0.7 (July 2013)
2147
-----------------------
3148

branches/try2/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ string_body : non_double_quote
248248
| '\x5c' [ '\x22' | common_escape ] ;
249249
250250
common_escape : '\x5c'
251-
| 'n' | 'r' | 't'
251+
| 'n' | 'r' | 't' | '0'
252252
| 'x' hex_digit 2
253253
| 'u' hex_digit 4
254254
| 'U' hex_digit 8 ;

branches/try2/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
2828

2929
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1))
3030
@$$(call E, make: llvm)
31-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
31+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1))
3232
$$(Q)touch $$(LLVM_CONFIG_$(1))
3333
endif
3434

branches/try2/mk/platform.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ CFG_PATH_MUNGE_mips-unknown-linux-gnu := true
343343
CFG_LDPATH_mips-unknown-linux-gnu :=
344344
CFG_RUN_mips-unknown-linux-gnu=
345345
CFG_RUN_TARG_mips-unknown-linux-gnu=
346+
RUSTC_FLAGS_mips-unknown-linux-gnu := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32
346347

347348
# i686-pc-mingw32 configuration
348349
CC_i686-pc-mingw32=$(CC)
@@ -352,7 +353,7 @@ AR_i686-pc-mingw32=$(AR)
352353
CFG_LIB_NAME_i686-pc-mingw32=$(1).dll
353354
CFG_LIB_GLOB_i686-pc-mingw32=$(1)-*.dll
354355
CFG_LIB_DSYM_GLOB_i686-pc-mingw32=$(1)-*.dylib.dSYM
355-
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600
356+
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600 -I$(CFG_SRC_DIR)src/etc/mingw-fix-include
356357
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
357358
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g -m32
358359
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
@@ -361,6 +362,7 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
361362
CFG_DEF_SUFFIX_i686-pc-mingw32 := .mingw32.def
362363
CFG_INSTALL_NAME_i686-pc-mingw32 =
363364
CFG_LIBUV_LINK_FLAGS_i686-pc-mingw32 := -lWs2_32 -lpsapi -liphlpapi
365+
CFG_LLVM_BUILD_ENV_i686-pc-mingw32 := CPATH=$(CFG_SRC_DIR)src/etc/mingw-fix-include
364366
CFG_EXE_SUFFIX_i686-pc-mingw32 := .exe
365367
CFG_WINDOWSY_i686-pc-mingw32 := 1
366368
CFG_UNIXY_i686-pc-mingw32 :=
@@ -479,7 +481,7 @@ define CFG_MAKE_TOOLCHAIN
479481
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
480482
$$(call CFG_INSTALL_NAME_$(1),$$(4))
481483

482-
ifneq ($(HOST_$(1)),arm)
484+
ifeq ($$(findstring $(HOST_$(1)),arm mips),)
483485

484486
# We're using llvm-mc as our assembler because it supports
485487
# .cfi pseudo-ops on mac
@@ -491,7 +493,7 @@ define CFG_MAKE_TOOLCHAIN
491493
-o=$$(1)
492494
else
493495

494-
# For the ARM crosses, use the toolchain assembler
496+
# For the ARM and MIPS crosses, use the toolchain assembler
495497
# XXX: We should be able to use the LLVM assembler
496498
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
497499

branches/try2/mk/rt.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# working under these assumptions).
2525

2626
# Hack for passing flags into LIBUV, see below.
27-
LIBUV_FLAGS_i386 = -m32 -fPIC
27+
LIBUV_FLAGS_i386 = -m32 -fPIC -I$(S)src/etc/mingw-fix-include
2828
LIBUV_FLAGS_x86_64 = -m64 -fPIC
2929
ifeq ($(OSTYPE_$(1)), linux-androideabi)
3030
LIBUV_FLAGS_arm = -fPIC -DANDROID -std=gnu99
@@ -71,7 +71,6 @@ RUNTIME_CXXS_$(1)_$(2) := \
7171
rt/sync/lock_and_signal.cpp \
7272
rt/sync/rust_thread.cpp \
7373
rt/rust_builtin.cpp \
74-
rt/rust_run_program.cpp \
7574
rt/rust_rng.cpp \
7675
rt/rust_upcall.cpp \
7776
rt/rust_uv.cpp \

branches/try2/src/compiletest/compiletest.rs

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ extern mod extra;
1717

1818
use std::os;
1919
use std::rt;
20-
use std::f64;
2120

2221
use extra::getopts;
2322
use extra::getopts::groups::{optopt, optflag, reqopt};
@@ -92,64 +91,62 @@ pub fn parse_config(args: ~[~str]) -> config {
9291
let matches =
9392
&match getopts::groups::getopts(args_, groups) {
9493
Ok(m) => m,
95-
Err(f) => fail!(getopts::fail_str(f))
94+
Err(f) => fail!(f.to_err_msg())
9695
};
9796

98-
if getopts::opt_present(matches, "h") || getopts::opt_present(matches, "help") {
97+
if matches.opt_present("h") || matches.opt_present("help") {
9998
let message = fmt!("Usage: %s [OPTIONS] [TESTNAME...]", argv0);
10099
println(getopts::groups::usage(message, groups));
101100
println("");
102101
fail!()
103102
}
104103

105104
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
106-
Path(getopts::opt_str(m, nm))
105+
Path(m.opt_str(nm).unwrap())
107106
}
108107

109108
config {
110-
compile_lib_path: getopts::opt_str(matches, "compile-lib-path"),
111-
run_lib_path: getopts::opt_str(matches, "run-lib-path"),
109+
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
110+
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
112111
rustc_path: opt_path(matches, "rustc-path"),
113-
clang_path: getopts::opt_maybe_str(matches, "clang-path").map_move(|s| Path(s)),
114-
llvm_bin_path: getopts::opt_maybe_str(matches, "llvm-bin-path").map_move(|s| Path(s)),
112+
clang_path: matches.opt_str("clang-path").map_move(|s| Path(s)),
113+
llvm_bin_path: matches.opt_str("llvm-bin-path").map_move(|s| Path(s)),
115114
src_base: opt_path(matches, "src-base"),
116115
build_base: opt_path(matches, "build-base"),
117116
aux_base: opt_path(matches, "aux-base"),
118-
stage_id: getopts::opt_str(matches, "stage-id"),
119-
mode: str_mode(getopts::opt_str(matches, "mode")),
120-
run_ignored: getopts::opt_present(matches, "ignored"),
117+
stage_id: matches.opt_str("stage-id").unwrap(),
118+
mode: str_mode(matches.opt_str("mode").unwrap()),
119+
run_ignored: matches.opt_present("ignored"),
121120
filter:
122121
if !matches.free.is_empty() {
123122
Some(matches.free[0].clone())
124123
} else {
125124
None
126125
},
127-
logfile: getopts::opt_maybe_str(matches, "logfile").map_move(|s| Path(s)),
128-
save_metrics: getopts::opt_maybe_str(matches, "save-metrics").map_move(|s| Path(s)),
126+
logfile: matches.opt_str("logfile").map_move(|s| Path(s)),
127+
save_metrics: matches.opt_str("save-metrics").map_move(|s| Path(s)),
129128
ratchet_metrics:
130-
getopts::opt_maybe_str(matches, "ratchet-metrics").map_move(|s| Path(s)),
129+
matches.opt_str("ratchet-metrics").map_move(|s| Path(s)),
131130
ratchet_noise_percent:
132-
getopts::opt_maybe_str(matches,
133-
"ratchet-noise-percent").map_move(|s|
134-
f64::from_str(s).unwrap()),
135-
runtool: getopts::opt_maybe_str(matches, "runtool"),
136-
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
137-
jit: getopts::opt_present(matches, "jit"),
138-
target: opt_str2(getopts::opt_maybe_str(matches, "target")).to_str(),
139-
adb_path: opt_str2(getopts::opt_maybe_str(matches, "adb-path")).to_str(),
131+
matches.opt_str("ratchet-noise-percent").and_then(|s| from_str::<f64>(s)),
132+
runtool: matches.opt_str("runtool"),
133+
rustcflags: matches.opt_str("rustcflags"),
134+
jit: matches.opt_present("jit"),
135+
target: opt_str2(matches.opt_str("target")).to_str(),
136+
adb_path: opt_str2(matches.opt_str("adb-path")).to_str(),
140137
adb_test_dir:
141-
opt_str2(getopts::opt_maybe_str(matches, "adb-test-dir")).to_str(),
138+
opt_str2(matches.opt_str("adb-test-dir")).to_str(),
142139
adb_device_status:
143-
if (opt_str2(getopts::opt_maybe_str(matches, "target")) ==
140+
if (opt_str2(matches.opt_str("target")) ==
144141
~"arm-linux-androideabi") {
145-
if (opt_str2(getopts::opt_maybe_str(matches, "adb-test-dir")) !=
142+
if (opt_str2(matches.opt_str("adb-test-dir")) !=
146143
~"(none)" &&
147-
opt_str2(getopts::opt_maybe_str(matches, "adb-test-dir")) !=
144+
opt_str2(matches.opt_str("adb-test-dir")) !=
148145
~"") { true }
149146
else { false }
150147
} else { false },
151-
test_shard: test::opt_shard(getopts::opt_maybe_str(matches, "test-shard")),
152-
verbose: getopts::opt_present(matches, "verbose")
148+
test_shard: test::opt_shard(matches.opt_str("test-shard")),
149+
verbose: matches.opt_present("verbose")
153150
}
154151
}
155152

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The purpose of these headers is to fix issues with mingw v4.0, as described in #9246.
2+
3+
This works by adding this directory to GCC include search path before mingw system headers directories,
4+
so we can intercept their inclusions and add missing definitions without having to modify files in mingw/include.
5+
6+
Once mingw fixes all 3 issues mentioned in #9246, this directory and all references to it from rust/mk/* may be removed.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef _FIX_CXXCONFIG_H
2+
#define _FIX_CXXCONFIG_H 1
3+
4+
#define _GLIBCXX_HAVE_FENV_H 1
5+
6+
#include_next <bits/c++config.h>
7+
8+
#endif
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef _FIX_WINBASE_H
2+
#define _FIX_WINBASE_H 1
3+
4+
#define NTDDK_VERSION NTDDI_VERSION
5+
6+
#include_next <winbase.h>
7+
8+
#endif
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef _FIX_WINSOCK2_H
2+
#define _FIX_WINSOCK2_H 1
3+
4+
#include_next <winsock2.h>
5+
6+
typedef struct pollfd {
7+
SOCKET fd;
8+
short events;
9+
short revents;
10+
} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
11+
12+
#endif

0 commit comments

Comments
 (0)