Skip to content

Commit 45da3dc

Browse files
committed
---
yaml --- r: 72630 b: refs/heads/dist-snap c: 3402435 h: refs/heads/master v: v3
1 parent 7810f46 commit 45da3dc

File tree

357 files changed

+11914
-14502
lines changed

Some content is hidden

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

357 files changed

+11914
-14502
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 47050c499a7cc6823ce8ac94f9766dd7a5e61108
10+
refs/heads/dist-snap: 34024353e86e22e459a1981f563e3d4f43906432
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/rust.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,8 +1467,8 @@ A complete list of the built-in language items follows:
14671467
: Elements can be subtracted.
14681468
`mul`
14691469
: Elements can be multiplied.
1470-
`div`
1471-
: Elements have a division operation.
1470+
`quot`
1471+
: Elements have a quotient operation.
14721472
`rem`
14731473
: Elements have a remainder operation.
14741474
`neg`
@@ -1857,7 +1857,7 @@ The default meaning of the operators on standard types is given here.
18571857
Calls the `mul` method on the `core::ops::Mul` trait.
18581858
`/`
18591859
: Quotient.
1860-
Calls the `div` method on the `core::ops::Div` trait.
1860+
Calls the `quot` method on the `core::ops::Quot` trait.
18611861
`%`
18621862
: Remainder.
18631863
Calls the `rem` method on the `core::ops::Rem` trait.
@@ -2393,7 +2393,7 @@ variables in the arm's block, and control enters the block.
23932393
An example of an `match` expression:
23942394

23952395

2396-
~~~~
2396+
~~~~ {.xfail-test}
23972397
# fn process_pair(a: int, b: int) { }
23982398
# fn process_ten() { }
23992399

branches/dist-snap/mk/clean.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ clean-misc:
4848
$(Q)rm -f $(RUSTLLVM_LIB_OBJS) $(RUSTLLVM_OBJS_OBJS) $(RUSTLLVM_DEF)
4949
$(Q)rm -Rf $(DOCS)
5050
$(Q)rm -Rf $(GENERATED)
51-
$(Q)rm -f tmp/*
51+
$(Q)rm -f tmp/*.log tmp/*.rc tmp/*.rs tmp/*.ok
5252
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz dist
5353
$(Q)rm -Rf $(foreach ext, \
5454
html aux cp fn ky log pdf pg toc tp vr cps, \

branches/dist-snap/mk/rt.mk

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,14 @@ endif
163163
ifdef CFG_WINDOWSY_$(1)
164164
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
165165
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
166-
CFLAGS="$$(CFG_GCCISH_CFLAGS)" \
167-
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS)" \
168166
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/libuv" \
169167
OS=mingw \
170168
V=$$(VERBOSE)
171169
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
172170
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
173171
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
174-
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
175-
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
172+
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
173+
LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
176174
CC="$$(CC_$(1))" \
177175
CXX="$$(CXX_$(1))" \
178176
AR="$$(AR_$(1))" \
@@ -183,8 +181,8 @@ $$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
183181
else
184182
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
185183
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
186-
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
187-
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
184+
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
185+
LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
188186
CC="$$(CC_$(1))" \
189187
CXX="$$(CXX_$(1))" \
190188
AR="$$(AR_$(1))" \

branches/dist-snap/src/compiletest/compiletest.rc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,10 @@ pub fn make_test_closure(config: config, testfile: &Path) -> test::TestFn {
223223
let testfile = testfile.to_str();
224224
test::DynTestFn(|| runtest::run(config, testfile))
225225
}
226+
227+
// Local Variables:
228+
// fill-column: 78;
229+
// indent-tabs-mode: nil
230+
// c-basic-offset: 4
231+
// buffer-file-coding-system: utf-8-unix
232+
// End:

branches/dist-snap/src/etc/unicode.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,6 @@ def emit_decomp_module(f, canon, compat):
235235
rf = open(r, "w")
236236

237237
(canon_decomp, compat_decomp, gencats) = load_unicode_data("UnicodeData.txt")
238-
239-
# Explain that the source code was generated by this script.
240-
rf.write('// The following code was generated by "src/etc/unicode.py"\n\n')
241-
242238
emit_property_module(rf, "general_category", gencats)
243239

244240
#emit_decomp_module(rf, canon_decomp, compat_decomp)

branches/dist-snap/src/etc/ziggurat_tables.py

Lines changed: 0 additions & 121 deletions
This file was deleted.

branches/dist-snap/src/libcore/cell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn empty_cell<T>() -> Cell<T> {
4242
pub impl<T> Cell<T> {
4343
/// Yields the value, failing if the cell is empty.
4444
fn take(&self) -> T {
45-
let mut self = unsafe { transmute_mut(self) };
45+
let self = unsafe { transmute_mut(self) };
4646
if self.is_empty() {
4747
fail!(~"attempt to take an empty cell");
4848
}
@@ -54,7 +54,7 @@ pub impl<T> Cell<T> {
5454
5555
/// Returns the value, failing if the cell is full.
5656
fn put_back(&self, value: T) {
57-
let mut self = unsafe { transmute_mut(self) };
57+
let self = unsafe { transmute_mut(self) };
5858
if !self.is_empty() {
5959
fail!(~"attempt to put a value back into a full cell");
6060
}

branches/dist-snap/src/libcore/char.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
//! Utilities for manipulating the char type
1212
13-
#[cfg(notest)]
1413
use cmp::Ord;
1514
use option::{None, Option, Some};
1615
use str;

branches/dist-snap/src/libcore/cleanup.rs

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use ptr::mut_null;
1515
use repr::BoxRepr;
1616
use sys::TypeDesc;
1717
use cast::transmute;
18+
use unstable::lang::clear_task_borrow_list;
1819

1920
#[cfg(notest)] use ptr::to_unsafe_ptr;
2021

@@ -126,22 +127,29 @@ struct AnnihilateStats {
126127
n_bytes_freed: uint
127128
}
128129

129-
unsafe fn each_live_alloc(f: &fn(box: *mut BoxRepr, uniq: bool) -> bool) {
130+
unsafe fn each_live_alloc(read_next_before: bool,
131+
f: &fn(box: *mut BoxRepr, uniq: bool) -> bool) {
132+
//! Walks the internal list of allocations
133+
130134
use managed;
131135

132136
let task: *Task = transmute(rustrt::rust_get_task());
133137
let box = (*task).boxed_region.live_allocs;
134138
let mut box: *mut BoxRepr = transmute(copy box);
135139
while box != mut_null() {
136-
let next = transmute(copy (*box).header.next);
140+
let next_before = transmute(copy (*box).header.next);
137141
let uniq =
138142
(*box).header.ref_count == managed::raw::RC_MANAGED_UNIQUE;
139143

140144
if ! f(box, uniq) {
141145
break
142146
}
143147

144-
box = next
148+
if read_next_before {
149+
box = next_before;
150+
} else {
151+
box = transmute(copy (*box).header.next);
152+
}
145153
}
146154
}
147155

@@ -159,7 +167,7 @@ fn debug_mem() -> bool {
159167
#[cfg(notest)]
160168
#[lang="annihilate"]
161169
pub unsafe fn annihilate() {
162-
use unstable::lang::local_free;
170+
use unstable::lang::{local_free, debug_ptr};
163171
use io::WriterUtil;
164172
use io;
165173
use libc;
@@ -172,28 +180,51 @@ pub unsafe fn annihilate() {
172180
n_bytes_freed: 0
173181
};
174182

183+
// Quick hack: we need to free this list upon task exit, and this
184+
// is a convenient place to do it.
185+
clear_task_borrow_list();
186+
175187
// Pass 1: Make all boxes immortal.
176-
for each_live_alloc |box, uniq| {
188+
//
189+
// In this pass, nothing gets freed, so it does not matter whether
190+
// we read the next field before or after the callback.
191+
for each_live_alloc(true) |box, uniq| {
177192
stats.n_total_boxes += 1;
178193
if uniq {
194+
debug_ptr("Managed-uniq: ", &*box);
179195
stats.n_unique_boxes += 1;
180196
} else {
197+
debug_ptr("Immortalizing: ", &*box);
181198
(*box).header.ref_count = managed::raw::RC_IMMORTAL;
182199
}
183200
}
184201

185202
// Pass 2: Drop all boxes.
186-
for each_live_alloc |box, uniq| {
203+
//
204+
// In this pass, unique-managed boxes may get freed, but not
205+
// managed boxes, so we must read the `next` field *after* the
206+
// callback, as the original value may have been freed.
207+
for each_live_alloc(false) |box, uniq| {
187208
if !uniq {
209+
debug_ptr("Invoking tydesc/glue on: ", &*box);
188210
let tydesc: *TypeDesc = transmute(copy (*box).header.type_desc);
189211
let drop_glue: DropGlue = transmute(((*tydesc).drop_glue, 0));
212+
debug_ptr("Box data: ", &(*box).data);
213+
debug_ptr("Type descriptor: ", tydesc);
190214
drop_glue(to_unsafe_ptr(&tydesc), transmute(&(*box).data));
215+
debug_ptr("Dropped ", &*box);
191216
}
192217
}
193218

194219
// Pass 3: Free all boxes.
195-
for each_live_alloc |box, uniq| {
220+
//
221+
// In this pass, managed boxes may get freed (but not
222+
// unique-managed boxes, though I think that none of those are
223+
// left), so we must read the `next` field before, since it will
224+
// not be valid after.
225+
for each_live_alloc(true) |box, uniq| {
196226
if !uniq {
227+
debug_ptr("About to free: ", &*box);
197228
stats.n_bytes_freed +=
198229
(*((*box).header.type_desc)).size
199230
+ sys::size_of::<BoxRepr>();

branches/dist-snap/src/libcore/comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ impl<T: Owned> Selectable for Port<T> {
205205
fn header(&self) -> *PacketHeader {
206206
unsafe {
207207
match self.endp {
208-
Some(ref endp) => endp.header(),
209-
None => fail!(~"peeking empty stream")
208+
Some(ref endp) => endp.header(),
209+
None => fail!(~"peeking empty stream")
210210
}
211211
}
212212
}

0 commit comments

Comments
 (0)