Commit Graph

17888 Commits

Author SHA1 Message Date
Niko Matsakis
cd164cf8b5 Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze 2013-05-06 20:15:27 -04:00
Niko Matsakis
ce45f390dd Remove debug_mem since @graydon said it conflicted with GC changes 2013-05-06 20:14:54 -04:00
Niko Matsakis
8b32bde408 add rust_take_task_borrow_list and rust_set_task_borrow_list to rustrt.def.in 2013-05-06 20:10:19 -04:00
Alex Crichton
d0827e3d36 Add a test for issue 5517 2013-05-06 19:17:55 -04:00
Daniel Micay
3d526d1af3 add task-local reference counted smart pointers
To provide a reference counted pointer type with deterministic
destruction once managed boxes are switched over to a garbage
collector. Unlike managed boxes, these can be moved instead of just
copied/cloned which is helpful for avoiding reference counts.
2013-05-06 17:03:20 -04:00
bors
bd5fd6e42a auto merge of #6150 : yichoi/rust/arm-test-pull, r=brson
Support #5297

install.mk : install-runtime-target added for conveneice
                 automatically push runtime library to android device

test.mk : expanded to support android test automation with adb

compiletest : expanded to support android test automation with adb
2013-05-06 13:15:38 -07:00
Niko Matsakis
2e4790ca06 Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze 2013-05-06 16:10:31 -04:00
Brian Anderson
de8071234f Move core::run tests of process killing into standalone run-pass tests
These cause valgrind errors in subprocesses. I don't *think* these errors
lead to actual test failures but they are very confusing.
2013-05-06 12:50:08 -07:00
Brian Anderson
3cafe905a4 std: Workaround bustage on incoming. #6122 2013-05-06 12:28:51 -07:00
bors
a5891bebc1 auto merge of #6265 : sanxiyn/rust/xc-packed, r=nikomatsakis 2013-05-06 11:30:48 -07:00
Niko Matsakis
0ef4e860da Replace NOTE with FIXME 2013-05-06 14:02:28 -04:00
Felix S. Klock II
1cbf0a84dc Step one for 'proper' pub condition: support pub keyword in form. 2013-05-06 19:05:36 +02:00
bors
b6dea9d41d auto merge of #6263 : bjz/rust/approx-eq, r=erickt
Moving the trait into `core` allows it to be added to the `num::Float` trait.

I have also added and `assert_approx_eq!` macro. This is useful fo making approximate assertions on types that implement the `ApproxEq` trait.

Examples:

~~~rust
// using the default epsilon value
assert_approx_eq!(1.0000001f, 1.0f);

// using a custom epsilon value
assert_approx_eq!(1.000001f, 1.0f, 1.0e-5);

// fails with: "left: 1.00001 does not approximately equal right: 1"
assert_approx_eq!(1.00001f, 1.0f);
~~~
2013-05-06 09:12:37 -07:00
Huon Wilson
4a43c1babb testsuite: tests for deriving changes and additions 2013-05-07 01:33:54 +10:00
Huon Wilson
5e1d6c2c80 libsyntax: add #[deriving(Rand, ToStr)].
The former fills each field of a struct or enum variant with a random
value (and picks a random enum variant). The latter makes the .to_str
method have the same output as fmt!("%?", ..).
2013-05-07 01:33:54 +10:00
Huon Wilson
1cf2108a2b libsyntax: convert #[deriving(IterBytes)] to generic deriving 2013-05-07 01:33:54 +10:00
Huon Wilson
b20eb970e1 libsyntax: extend generic deriving code to handle almost all possible traits.
This adds support for static methods, and arguments of most types, traits with
type parameters, methods with type parameters (and lifetimes for both), as well
as making the code more robust to support deriving on types with lifetimes (i.e.
'self).
2013-05-07 01:33:54 +10:00
Niko Matsakis
c50a9d5b66 Use rust_try_get_task for compat with new rt, and strenghten assumptions about borrow list 2013-05-06 11:18:59 -04:00
Seo Sanghyeon
502817a9c1 Fix cross-crate packed structs 2013-05-06 23:35:27 +09:00
Niko Matsakis
84f7ecce5c Adust arena test: can no longer allocate recursively 2013-05-06 09:56:17 -04:00
Niko Matsakis
6c0c3a44bd Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze 2013-05-06 09:00:50 -04:00
Niko Matsakis
2ea52a38e5 refinement to technique used to not run regionck 2013-05-06 09:00:37 -04:00
Brendan Zabarauskas
0e2242f6d6 Add assert_approx_eq! macro 2013-05-06 21:51:48 +10:00
Brendan Zabarauskas
0211833008 Move FuzzyEq trait into core::cmp and rename it to 'ApproxEq' 2013-05-06 21:51:07 +10:00
Niko Matsakis
e235f6ca53 remove some unused mut decls and vars 2013-05-06 05:18:23 -04:00
Niko Matsakis
4dc62dfcf3 do not run regionck if there have been type errors 2013-05-06 05:17:36 -04:00
Alex Crichton
44c1e46ef5 Improve lifetimes on foldl/foldr and lift the Copy requirement 2013-05-06 02:21:01 -04:00
Brian Anderson
24de5bb649 core: Remove a call to breakpoint from a test
These breakpoints make it difficult to debug coretest
2013-05-05 20:13:32 -07:00
Niko Matsakis
7b36e34c89 Fix two more write guard failures 2013-05-05 21:05:37 -04:00
Daniel Micay
e7f6c4c754 compile-fail tests for #[non_owned] and #[mutable] 2013-05-05 15:55:32 -04:00
Daniel Micay
bc52224d47 factor out the has_attr checks 2013-05-05 15:50:10 -04:00
Daniel Micay
66842c8576 mark Cell as non-Const with #[mutable] 2013-05-05 15:42:03 -04:00
Daniel Micay
58c0df2af6 add #[non_owned] and #[mutable] attributes 2013-05-05 15:36:26 -04:00
Niko Matsakis
4300d4d2fa Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze
Conflicts:
	src/libcore/core.rc
	src/libcore/hashmap.rs
	src/libcore/num/f32.rs
	src/libcore/num/f64.rs
	src/libcore/num/float.rs
	src/libcore/num/int-template.rs
	src/libcore/num/num.rs
	src/libcore/num/strconv.rs
	src/libcore/num/uint-template.rs
	src/libcore/ops.rs
	src/libcore/os.rs
	src/libcore/prelude.rs
	src/libcore/rt/mod.rs
	src/libcore/unstable/lang.rs
	src/librustc/driver/session.rs
	src/librustc/middle/astencode.rs
	src/librustc/middle/borrowck/check_loans.rs
	src/librustc/middle/borrowck/gather_loans.rs
	src/librustc/middle/borrowck/loan.rs
	src/librustc/middle/borrowck/preserve.rs
	src/librustc/middle/liveness.rs
	src/librustc/middle/mem_categorization.rs
	src/librustc/middle/region.rs
	src/librustc/middle/trans/base.rs
	src/librustc/middle/trans/inline.rs
	src/librustc/middle/trans/reachable.rs
	src/librustc/middle/typeck/check/_match.rs
	src/librustc/middle/typeck/check/regionck.rs
	src/librustc/util/ppaux.rs
	src/libstd/arena.rs
	src/libstd/ebml.rs
	src/libstd/json.rs
	src/libstd/serialize.rs
	src/libstd/std.rc
	src/libsyntax/ast_map.rs
	src/libsyntax/parse/parser.rs
	src/test/compile-fail/borrowck-uniq-via-box.rs
	src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs
	src/test/run-pass/borrowck-nested-calls.rs
2013-05-05 15:11:04 -04:00
bors
6e6a4be19d auto merge of #6208 : sanxiyn/rust/accurate-span, r=sanxiyn 2013-05-05 11:12:37 -07:00
Seo Sanghyeon
aca2a00fb4 Fix span tests 2013-05-06 03:09:19 +09:00
Niko Matsakis
6cb273ed4e Address all FIXMEs from #5562 2013-05-05 13:50:10 -04:00
Niko Matsakis
0b0b8018a6 add warning for #6248 and remove instances of it 2013-05-05 12:17:59 -04:00
bors
063851ffa1 auto merge of #6235 : pnkfelix/rust/issue-3326-play-with-directory-orderonly-prereqs, r=z0w0
r? (for #3326)
2013-05-05 05:09:36 -07:00
Niko Matsakis
6806900a7c disable lang debug for perf 2013-05-05 07:43:43 -04:00
bors
3b299e8140 auto merge of #6244 : thestinger/rust/ffi, r=z0w0
The previous example was erroneously attempting to destroy
uninitialized memory, which was often zeroed (masking the bug).
2013-05-05 04:09:36 -07:00
bors
29a2a1ecd1 auto merge of #6234 : yichoi/rust/glob-dummy-pull, r=thestinger
transitional patch to resolve compile/link failure on android

after #6161 landed, I've encountered below errors since android does not support glob in libc.

/opt/ndk_standalone/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/yichoi/rust_work/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/arm-linux-androideabi/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so: error: undefined reference to 'glob'

/opt/ndk_standalone/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/yichoi/rust_work/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/arm-linux-androideabi/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so: error: undefined reference to 'globfre

Since android does not have `glob.h`, `glob_t` definition comes from
https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/vSH6MWPD0Vk

#6100 should be resolved.
2013-05-04 22:09:36 -07:00
Young-il Choi
987ad9c878 rt: rust_android_dummy.cpp fix for make tidy 2013-05-05 14:00:53 +09:00
Jeong YunWon
cb918e1a83 Allow non-literal static range pattern for match arms
Fix unintended error problem of:

static s: int = 1;
static e: int = 42;

fn main() {
    match 7 {
        s..e => (),
         ^~                 error: expected `=>` but found `..`
        _ => (),
    }
}
2013-05-05 11:05:06 +09:00
Daniel Micay
8f2d71ac00 small fix to the tutorial-ffi destructor example
The previous example was erroneously attempting to destroy
uninitialized memory, which was often zeroed (masking the bug).
2013-05-04 21:57:10 -04:00
bors
d74ac9ea03 auto merge of #6240 : brson/rust/snapshots, r=brson 2013-05-04 15:48:36 -07:00
Brian Anderson
8081e8debf Register snapshots 2013-05-04 15:43:51 -07:00
bors
b872900a5b auto merge of #6237 : dotdash/rust/reduce_bloat, r=brson
In commit d7f5e43 "core::rt: Add the local heap to newsched tasks",
local_malloc and local_free have become rather big and their forced
inlining causes quite a bit of code bloat. Compile times for crates
affected by the bloat (e.g. rustc) improve, while others (e.g. libstd)
seem to be unaffected, so I guess the inlining doesn't gain us much.

Sizes:
```
               | librustc   | libsytax
---------------|–-----------|------------
with inlining  | 18,547,824 |  7,110,848
w/o inlining   | 15,092,040 |  5,518,608
2013-05-04 13:33:37 -07:00
Niko Matsakis
989d008124 separate out write_guard code into its own module 2013-05-04 14:29:32 -04:00
Niko Matsakis
ccf2f7b979 make asm_comments something that you opt in to 2013-05-04 14:29:08 -04:00