Skip to content

Commit 73212e2

Browse files
committed
---
yaml --- r: 152487 b: refs/heads/try2 c: 0422934 h: refs/heads/master i: 152485: e9e3788 152483: bdad629 152479: 1d3ab9d v: v3
1 parent 0484bac commit 73212e2

Some content is hidden

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

95 files changed

+3877
-1140
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: cac7a2053aba7be214d5e58e13867089638a8f50
8+
refs/heads/try2: 0422934e243ed57a7662ec878db9d4e01ca5b0f9
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ before_script:
2727
- ln -nsf /usr/bin/llvm-dis-$LLVM_VERSION local-llvm/bin/llvm-dis
2828
- ln -nsf /usr/bin/llc-$LLVM_VERSION local-llvm/bin/llc
2929
- ln -nsf /usr/include/llvm-$LLVM_VERSION local-llvm/include
30-
- ./configure --disable-optimize-tests --llvm-root=`pwd`/local-llvm --enable-fast-make --enable-clang
30+
- ./configure --disable-optimize-tests --llvm-root=`pwd`/local-llvm
31+
--enable-fast-make --enable-clang
3132

3233
# Tidy everything up first, then build a few things, and then run a few tests.
3334
# Note that this is meant to run in a "fairly small" amount of time, so this

branches/try2/configure

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ opt verify-install 1 "verify installed binaries work"
425425
valopt prefix "/usr/local" "set installation prefix"
426426
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
427427
valopt llvm-root "" "set LLVM root"
428+
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
429+
valopt libuv-root "" "set directory where libuv.a is located"
428430
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
429431
valopt mingw32-cross-path "" "MinGW32 cross compiler path"
430432

@@ -1198,6 +1200,8 @@ putvar CFG_ANDROID_CROSS_PATH
11981200
putvar CFG_MINGW32_CROSS_PATH
11991201
putvar CFG_MANDIR
12001202
putvar CFG_DISABLE_INJECT_STD_VERSION
1203+
putvar CFG_JEMALLOC_ROOT
1204+
putvar CFG_LIBUV_ROOT
12011205

12021206
# Avoid spurious warnings from clang by feeding it original source on
12031207
# ccache-miss rather than preprocessed input.

branches/try2/mk/rt.mk

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,19 +204,17 @@ $$(LIBUV_MAKEFILE_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
204204
# theory when we support msvc then we should be using gyp's msvc output instead
205205
# of mingw's makefile for windows
206206
ifdef CFG_WINDOWSY_$(1)
207-
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS)
207+
LIBUV_LOCAL_$(1) := $$(S)src/libuv/libuv.a
208+
$$(LIBUV_LOCAL_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS)
208209
$$(Q)$$(MAKE) -C $$(S)src/libuv -f Makefile.mingw \
209210
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS_$(1))" \
210211
CC="$$(CC_$(1)) $$(LIBUV_CFLAGS_$(1)) $$(SNAP_DEFINES)" \
211212
CXX="$$(CXX_$(1))" \
212213
AR="$$(AR_$(1))" \
213214
V=$$(VERBOSE)
214-
$$(Q)cp $$(S)src/libuv/libuv.a $$@
215215
else
216-
$$(LIBUV_LIB_$(1)): $$(LIBUV_DIR_$(1))/Release/libuv.a $$(MKFILE_DEPS)
217-
$$(Q)cp $$< $$@
218-
$$(LIBUV_DIR_$(1))/Release/libuv.a: $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)) \
219-
$$(MKFILE_DEPS)
216+
LIBUV_LOCAL_$(1) := $$(LIBUV_DIR_$(1))/Release/libuv.a
217+
$$(LIBUV_LOCAL_$(1)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)) $$(MKFILE_DEPS)
220218
$$(Q)$$(MAKE) -C $$(LIBUV_DIR_$(1)) \
221219
CFLAGS="$$(LIBUV_CFLAGS_$(1)) $$(SNAP_DEFINES)" \
222220
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS_$(1))" \
@@ -231,6 +229,19 @@ $$(LIBUV_DIR_$(1))/Release/libuv.a: $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)) \
231229

232230
endif
233231

232+
ifeq ($(1),$$(CFG_BUILD))
233+
ifneq ($$(CFG_LIBUV_ROOT),)
234+
$$(LIBUV_LIB_$(1)): $$(CFG_LIBUV_ROOT)/libuv.a
235+
$$(Q)cp $$< $$@
236+
else
237+
$$(LIBUV_LIB_$(1)): $$(LIBUV_LOCAL_$(1))
238+
$$(Q)cp $$< $$@
239+
endif
240+
else
241+
$$(LIBUV_LIB_$(1)): $$(LIBUV_LOCAL_$(1))
242+
$$(Q)cp $$< $$@
243+
endif
244+
234245
################################################################################
235246
# jemalloc
236247
################################################################################
@@ -253,8 +264,9 @@ else
253264
endif
254265
JEMALLOC_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(JEMALLOC_NAME_$(1))
255266
JEMALLOC_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/jemalloc
267+
JEMALLOC_LOCAL_$(1) := $$(JEMALLOC_BUILD_DIR_$(1))/lib/$$(JEMALLOC_REAL_NAME_$(1))
256268

257-
$$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
269+
$$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
258270
@$$(call E, make: jemalloc)
259271
cd "$$(JEMALLOC_BUILD_DIR_$(1))"; "$(S)src/jemalloc/configure" \
260272
$$(JEMALLOC_ARGS_$(1)) --enable-cc-silence --with-jemalloc-prefix=je_ \
@@ -265,7 +277,20 @@ $$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
265277
CPPFLAGS="-I $(S)src/rt/" \
266278
EXTRA_CFLAGS="$$(CFG_CFLAGS_$(1)) -g1"
267279
$$(Q)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
268-
$$(Q)cp $$(JEMALLOC_BUILD_DIR_$(1))/lib/$$(JEMALLOC_REAL_NAME_$(1)) $$(JEMALLOC_LIB_$(1))
280+
281+
ifeq ($(1),$$(CFG_BUILD))
282+
ifneq ($$(CFG_JEMALLOC_ROOT),)
283+
$$(JEMALLOC_LIB_$(1)): $$(CFG_JEMALLOC_ROOT)/libjemalloc_pic.a
284+
@$$(call E, copy: jemalloc)
285+
$$(Q)cp $$< $$@
286+
else
287+
$$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_LOCAL_$(1))
288+
$$(Q)cp $$< $$@
289+
endif
290+
else
291+
$$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_LOCAL_$(1))
292+
$$(Q)cp $$< $$@
293+
endif
269294

270295
################################################################################
271296
# compiler-rt

branches/try2/src/doc/guide-lifetimes.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ value. We also call this _borrowing_ the local variable
7878
name for the same data.
7979

8080
In the case of `on_the_heap`, however, no explicit action is necessary.
81-
The compiler will automatically convert a box box point to a reference like &point.
81+
The compiler will automatically convert a box point to a reference like &point.
8282
This is another form of borrowing; in this case, the contents of the owned box
8383
are being lent out.
8484

@@ -275,8 +275,10 @@ invalidate the pointer `owner_age`.
275275

276276
# Borrowing and enums
277277

278-
The previous example showed that the type system forbids any borrowing
279-
of owned boxes found in aliasable, mutable memory. This restriction
278+
The previous example showed that the type system forbids any mutations
279+
of owned boxed values while they are being borrowed. In general, the type
280+
system also forbids borrowing a value as mutable if it is already being
281+
borrowed - either as a mutable reference or an immutable one. This restriction
280282
prevents pointers from pointing into freed memory. There is one other
281283
case where the compiler must be very careful to ensure that pointers
282284
remain valid: pointers into the interior of an `enum`.

branches/try2/src/doc/rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ block_comment_body : [block_comment | character] * ;
160160
line_comment : "//" non_eol * ;
161161
~~~~
162162

163-
Comments in Rust code follow the general C++ style of line and block-comment forms,
164-
with no nesting of block-comment delimiters.
163+
Comments in Rust code follow the general C++ style of line and block-comment forms.
164+
Nested block comments are supported.
165165

166166
Line comments beginning with exactly _three_ slashes (`///`), and block
167167
comments beginning with exactly one repeated asterisk in the block-open

branches/try2/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2459,7 +2459,7 @@ fn draw_all(shapes: &[Box<Drawable>]) {
24592459
}
24602460
~~~~
24612461

2462-
In this example, there is no type parameter. Instead, the `~Drawable`
2462+
In this example, there is no type parameter. Instead, the `Box<Drawable>`
24632463
type denotes any owned box value that implements the `Drawable` trait.
24642464
To construct such a value, you use the `as` operator to cast a value
24652465
to an object:

branches/try2/src/liballoc/heap.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -155,24 +155,6 @@ unsafe fn closure_exchange_malloc(drop_glue: fn(*mut u8), size: uint, align: uin
155155
alloc as *mut u8
156156
}
157157

158-
// hack for libcore
159-
#[no_mangle]
160-
#[doc(hidden)]
161-
#[deprecated]
162-
#[cfg(not(test))]
163-
pub unsafe extern "C" fn rust_allocate(size: uint, align: uint) -> *mut u8 {
164-
allocate(size, align)
165-
}
166-
167-
// hack for libcore
168-
#[no_mangle]
169-
#[doc(hidden)]
170-
#[deprecated]
171-
#[cfg(not(test))]
172-
pub unsafe extern "C" fn rust_deallocate(ptr: *mut u8, size: uint, align: uint) {
173-
deallocate(ptr, size, align)
174-
}
175-
176158
#[cfg(test)]
177159
mod bench {
178160
extern crate test;
@@ -184,11 +166,4 @@ mod bench {
184166
box 10
185167
})
186168
}
187-
188-
#[bench]
189-
fn alloc_owned_big(b: &mut Bencher) {
190-
b.iter(|| {
191-
box [10, ..1000]
192-
})
193-
}
194169
}

branches/try2/src/libcollections/hash/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,6 @@ impl<'a, S: Writer, T: Hash<S>> Hash<S> for &'a mut [T] {
213213
}
214214
}
215215

216-
impl<S: Writer, T: Hash<S>> Hash<S> for ~[T] {
217-
#[inline]
218-
fn hash(&self, state: &mut S) {
219-
self.as_slice().hash(state);
220-
}
221-
}
222-
223216
impl<S: Writer, T: Hash<S>> Hash<S> for Vec<T> {
224217
#[inline]
225218
fn hash(&self, state: &mut S) {

branches/try2/src/libcollections/hash/sip.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ mod tests {
276276
use str::Str;
277277
use string::String;
278278
use slice::{Vector, ImmutableVector};
279+
use vec::Vec;
279280

280281
use super::super::{Hash, Writer};
281282
use super::{SipState, hash, hash_with_keys};
@@ -376,8 +377,8 @@ mod tests {
376377
s
377378
}
378379

379-
fn result_bytes(h: u64) -> ~[u8] {
380-
box [(h >> 0) as u8,
380+
fn result_bytes(h: u64) -> Vec<u8> {
381+
vec![(h >> 0) as u8,
381382
(h >> 8) as u8,
382383
(h >> 16) as u8,
383384
(h >> 24) as u8,

0 commit comments

Comments
 (0)