Skip to content

Commit 6509e63

Browse files
committed
---
yaml --- r: 65865 b: refs/heads/master c: 5bff471 h: refs/heads/master i: 65863: 77c85c8 v: v3
1 parent 6679132 commit 6509e63

File tree

149 files changed

+5298
-4544
lines changed

Some content is hidden

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

149 files changed

+5298
-4544
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 57cb44dbeb0856e3f1b2a58b0b381fc37c65c53c
2+
refs/heads/master: 5bff471dde5350437c1bb51178ba6a2a903ec813
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/RELEASES.txt

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,37 @@ Version 0.7 (July 2013)
33

44
* ??? changes, numerous bugfixes
55

6+
* Syntax changes
7+
* `#[deriving(Encodable)]`, `#[deriving(Decodable)]`
8+
69
* Semantic changes
7-
* The `self` parameter no longer implicitly means `&'self self`, and can be explicitly marked
8-
with a lifetime.
10+
* The `self` parameter no longer implicitly means `&'self self`,
11+
and can be explicitly marked with a lifetime.
12+
* Structs with the `#[packed]` attribute have byte alignment and
13+
no padding between fields.
914

1015
* Libraries
11-
* New `core::iterator` module for external iterator objects
16+
17+
**Note: in 0.7 `core` was renamed `std` and `std` to `extra.
18+
These notes use the new crate names.**
19+
20+
* The `core` crate was renamed to `std`.
21+
* The `std` crate was renamed to `extra`.
22+
* `std::mut` removed.
23+
* std: `iterator` module for external iterator objects.
24+
* std: many types implement `Clone` - tuples, @, @mut. TODO
25+
* std: `path` type renamed to `Path`.
26+
* std: Many standalone functions removed in favor of methods in
27+
`vec`, `str`, TODO. In the future methods will also work as functions.
28+
* extra: `FileInput` implements `std::io::Reader`.
29+
* extra: `Complex` number type and `complex` module.
30+
* extra: `Rational` number type and `rational` module.
31+
* extra: `BigInt`, `BigUint` implement numeric and comparison traits.
32+
33+
* Other
34+
* `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks.
35+
* More and improved library documentation.
36+
* The `rusti` command has been rewritten and a number of bugs addressed.
1237

1338
Version 0.6 (April 2013)
1439
------------------------

trunk/mk/rt.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,17 @@ $$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
210210
V=$$(VERBOSE)
211211
endif
212212

213+
ifeq ($(OSTYPE_$(1)), linux-androideabi)
214+
$$(JEMALLOC_LIB_$(1)_$(2)):
215+
cd $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc; $(S)src/rt/jemalloc/configure \
216+
--disable-experimental --build=$(CFG_BUILD_TRIPLE) --host=$(1) --disable-tls \
217+
EXTRA_CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
218+
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
219+
CC="$$(CC_$(1))" \
220+
CXX="$$(CXX_$(1))" \
221+
AR="$$(AR_$(1))"
222+
$$(Q)$$(MAKE) -C $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc
223+
else
213224
$$(JEMALLOC_LIB_$(1)_$(2)):
214225
cd $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc; $(S)src/rt/jemalloc/configure \
215226
--disable-experimental --build=$(CFG_BUILD_TRIPLE) --host=$(1) \
@@ -219,6 +230,7 @@ $$(JEMALLOC_LIB_$(1)_$(2)):
219230
CXX="$$(CXX_$(1))" \
220231
AR="$$(AR_$(1))"
221232
$$(Q)$$(MAKE) -C $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc
233+
endif
222234

223235

224236
# These could go in rt.mk or rustllvm.mk, they're needed for both.

trunk/src/libextra/arc.rs

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ struct RWARCInner<T> { lock: RWlock, failed: bool, data: T }
281281
#[mutable]
282282
struct RWARC<T> {
283283
x: UnsafeAtomicRcBox<RWARCInner<T>>,
284+
cant_nest: ()
284285
}
285286

286287
/// Create a reader/writer ARC with the supplied data.
@@ -298,14 +299,15 @@ pub fn rw_arc_with_condvars<T:Const + Owned>(
298299
let data =
299300
RWARCInner { lock: rwlock_with_condvars(num_condvars),
300301
failed: false, data: user_data };
301-
RWARC { x: UnsafeAtomicRcBox::new(data), }
302+
RWARC { x: UnsafeAtomicRcBox::new(data), cant_nest: () }
302303
}
303304

304305
impl<T:Const + Owned> RWARC<T> {
305306
/// Duplicate a rwlock-protected ARC, as arc::clone.
306307
pub fn clone(&self) -> RWARC<T> {
307308
RWARC {
308309
x: self.x.clone(),
310+
cant_nest: (),
309311
}
310312
}
311313

@@ -813,66 +815,4 @@ mod tests {
813815

814816
wp2.recv(); // complete handshake with writer
815817
}
816-
#[cfg(test)]
817-
fn test_rw_write_cond_downgrade_read_race_helper() {
818-
// Tests that when a downgrader hands off the "reader cloud" lock
819-
// because of a contending reader, a writer can't race to get it
820-
// instead, which would result in readers_and_writers. This tests
821-
// the sync module rather than this one, but it's here because an
822-
// rwarc gives us extra shared state to help check for the race.
823-
// If you want to see this test fail, go to sync.rs and replace the
824-
// line in RWlock::write_cond() that looks like:
825-
// "blk(&Condvar { order: opt_lock, ..*cond })"
826-
// with just "blk(cond)".
827-
let x = ~RWARC(true);
828-
let (wp, wc) = comm::stream();
829-
830-
// writer task
831-
let xw = (*x).clone();
832-
do task::spawn {
833-
do xw.write_cond |state, c| {
834-
wc.send(()); // tell downgrader it's ok to go
835-
c.wait();
836-
// The core of the test is here: the condvar reacquire path
837-
// must involve order_lock, so that it cannot race with a reader
838-
// trying to receive the "reader cloud lock hand-off".
839-
*state = false;
840-
}
841-
}
842-
843-
wp.recv(); // wait for writer to get in
844-
845-
do x.write_downgrade |mut write_mode| {
846-
do write_mode.write_cond |state, c| {
847-
assert!(*state);
848-
// make writer contend in the cond-reacquire path
849-
c.signal();
850-
}
851-
// make a reader task to trigger the "reader cloud lock" handoff
852-
let xr = (*x).clone();
853-
let (rp, rc) = comm::stream();
854-
do task::spawn {
855-
rc.send(());
856-
do xr.read |_state| { }
857-
}
858-
rp.recv(); // wait for reader task to exist
859-
860-
let read_mode = x.downgrade(write_mode);
861-
do read_mode.read |state| {
862-
// if writer mistakenly got in, make sure it mutates state
863-
// before we assert on it
864-
for 5.times { task::yield(); }
865-
// make sure writer didn't get in.
866-
assert!(*state);
867-
}
868-
}
869-
}
870-
#[test]
871-
fn test_rw_write_cond_downgrade_read_race() {
872-
// Ideally the above test case would have yield statements in it that
873-
// helped to expose the race nearly 100% of the time... but adding
874-
// yields in the intuitively-right locations made it even less likely,
875-
// and I wasn't sure why :( . This is a mediocre "next best" option.
876-
for 8.times { test_rw_write_cond_downgrade_read_race_helper() }
877-
}
878818
}

0 commit comments

Comments
 (0)