Commit Graph

1611 Commits

Author SHA1 Message Date
Brian Anderson
4724966b06 core::rt: Add uv timer bindings 2013-05-15 12:19:15 -07:00
Brian Anderson
0a54bad3d1 core::rt: Initialize logging 2013-05-15 12:19:14 -07:00
Brian Anderson
f6401bad24 core: Use a global lock instead of runtime lock for os::getenv, etc. #4726 2013-05-15 12:19:14 -07:00
Brian Anderson
bfd9aa9755 core:rt: A few micro-opts 2013-05-15 12:19:14 -07:00
Brian Anderson
204e3d82cc core::rt: Register stacks with valgrind. #6428 2013-05-14 14:52:07 -07:00
Brian Anderson
101aaa3861 core::rt: 0 is a valid TLS key 2013-05-14 14:52:06 -07:00
Luqman Aden
103a68b2e7 Correct #[always_inline] -> #[inline(always)] and __attribute((...)) -> __attribute__((...)). 2013-05-13 04:05:34 -04:00
bors
fdf601eaf3 auto merge of #6358 : crabtw/rust/mips-segstk, r=brson
I changed ```RED_ZONE_SIZE``` to ```RZ_MAC_32``` because of stack canary failure.
Here is a LLVM patch for MIPS segmented stacks.
http://people.cs.nctu.edu.tw/~jyyou/rust/mips-segstk.patch

Current test results
```
failures:
    rand::tests::test_rng_seeded_custom_seed2
    run::tests::test_forced_destroy_actually_kills
    run::tests::test_unforced_destroy_actually_kills
    time::tests::run_tests
    uv_ll::test::test_uv_ll_struct_size_addrinfo
    uv_ll::test::test_uv_ll_struct_size_uv_timer_t

segfaults:
    rt::io::option::test::test_option_writer_error
    rt::local_services::test::unwind
    rt::sched::test_swap_tasks_then
    stackwalk::test_simple
    stackwalk::test_simple_deep
```
2013-05-10 04:07:50 -07:00
bors
ca95e7f94e auto merge of #6345 : seanmoon/rust/fix-typos, r=sanxiyn
Hi there,

Really enjoying Rust. Noticed a few typos so I searched around for a few more--here's some fixes.

Ran `make check` and got `summary of 24 test runs: 4868 passed; 0 failed; 330 ignored`.

Thanks!

Sean
2013-05-09 03:51:32 -07:00
Jyun-Yan You
c2bf9bf9fe improve MIPS backend and implement segmented stacks 2013-05-09 16:51:42 +08:00
Sean Moon
bd4ee7c7d2 Fix typos 2013-05-09 02:34:47 +09:00
bors
b21f37c818 auto merge of #6323 : brson/rust/nullary, r=thestinger
There's no need to delegate to C to call the Rust main function.
2013-05-08 08:39:40 -07:00
bors
e6529c36af auto merge of #6307 : brson/rust/rng2, r=brson
Closes #6280
2013-05-08 01:33:38 -07:00
Brian Anderson
80061ecb1d rt: Remove rust_call_nullary_fn
There's no need to delegate to C to call the Rust main function.
2013-05-07 23:01:05 -07:00
Brian Anderson
21aaa7fb13 rt: Eliminate the dependency on rust_kernel from rust_rng 2013-05-07 12:08:03 -07:00
Brian Anderson
4cd51c416b rt: Move win32_require out of the rust_kernel type
This is only used on rust_rng, which I am trying to extricate from
the kernel.
2013-05-07 12:08:00 -07:00
Niko Matsakis
11f7cb26c2 When autoborrowing a fn in trans, adjust the type of the datum to be &fn.
Fixes #6141.
2013-05-07 11:41:27 -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
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
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
Niko Matsakis
bf2d3c71e3 improve DEBUG_BORROW printouts 2013-05-04 14:25:15 -04:00
Young-il Choi
7ac6571163 rt: glob, globfree dummy function for android 2013-05-04 16:00:11 +09:00
Daniel Micay
86efd97a10 add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
Niko Matsakis
34024353e8 Change borrow debugging so it is disabled by -O 2013-05-03 05:42:00 -04:00
Brian Anderson
6c478c7de8 Merge remote-tracking branch 'brson/io' into incoming
Conflicts:
	mk/rt.mk
	src/libcore/run.rs
2013-05-02 20:51:56 -07:00
gareth
544ac620ba Convert most of rust_run_program.cpp to rust (issue #2674). 2013-05-02 19:26:52 +01:00
James Miller
1bd318421e Add error if RED_ZONE_SIZE doesn't get defined 2013-05-02 14:04:43 +12:00
Niko Matsakis
4af2d90af5 add an option to debug borrows (RUST_DEBUG_BORROW) so you can
find out where the offending borrow occurred. This ... still needs
some work.
2013-05-01 10:30:54 -04:00
Brian Anderson
4a4646fd54 Merge remote-tracking branch 'brson/io'
Conflicts:
	src/libcore/task/local_data_priv.rs
2013-04-30 17:01:27 -07:00
bors
9f03d45c56 auto merge of #5646 : Aatch/rust/unwind-fix, r=brson
This fixes issue #5641
2013-04-28 15:36:35 -07:00
bors
88dd53a754 auto merge of #6081 : brson/rust/out-of-stack, r=thestinger
People hit the recursion depth limit too often, it's not possible
to unwind reliably from out-of-stack.

Issues #3555, #3695
2013-04-27 16:24:34 -07:00
Brian Anderson
149047e55d rt: Set the stack depth limit to 1GB. Abort on error.
People hit the recursion depth limit too often, it's not possible
to unwind reliably from out-of-stack.

Issues #3555, #3695
2013-04-26 15:39:54 -07:00
Huon Wilson
1fc8a2f2a4 rt: use the [u]int[nn]_t types in the RNG.
This means that `ub4`s are always 4 bytes, rather than being 8 bytes on
x64. (Suggested but not implemented by upstream: "Porting it to a 64-bit
machine [...] may just need an adjustment of the definition of ub4")
2013-04-26 22:13:24 +10:00
Brian Anderson
abc49fdfae rt: abort doesn't take an argument 2013-04-25 15:10:19 -07:00
Huon Wilson
106fd12423 rt: pull upstream ISAAC code for consistency between 32/64 bit platforms
The "unsigned 4 byte" `ub4`s are actually 8 bytes on 64-bit platforms
which mean that some bits > 2**32 were retained in calculations, these
would then "reappear" after a shift and so the stream of random numbers
would differ on 32 bit vs 64 bit platforms.
2013-04-25 17:59:42 +10:00
James Miller
286e571a63 Remove rust_unwind.h
Adds the required definitions in the correct place.
2013-04-24 18:27:56 +12:00
Brian Anderson
e944c7dade Merge remote-tracking branch 'brson/io'
This also reverts some changes to TLS that were leaking memory.

Conflicts:
	src/libcore/rt/uv/net.rs
	src/libcore/task/local_data_priv.rs
	src/libcore/unstable/lang.rs
2013-04-23 19:19:32 -07:00
gareth
91aeecf7e3 Fix issue #5976 - HANDLE leaks and undefined/bad behavour
on windows.
2013-04-23 21:23:15 +01:00
Alex Crichton
391de1c690 Remove a stray new operator in rust_task.h 2013-04-23 00:55:13 -04:00
Brian Anderson
42c0f88232 core::rt: Add unwinding to newsched tasks 2013-04-22 17:15:31 -07:00
Brian Anderson
d7f5e437a2 core::rt: Add the local heap to newsched tasks
Reusing the existing boxed_region implementation from the runtime
2013-04-21 19:03:54 -07:00
Brian Anderson
2fe118b26f rt: Don't make memory_region depend on rust_env
I am going to use memory_region and boxed_region as the local heap
in the new scheduler, for now at least, and I don't have a rust_env
available.
2013-04-21 17:42:45 -07:00
bors
3830040a89 auto merge of #5887 : jdm/rust/stackbounds, r=brson
This is needed to allow GC to work in SpiderMonkey.
2013-04-21 17:33:52 -07:00
Josh Matthews
5cc6a0bf32 rt: Make the C stack segment accessible to runtime users. 2013-04-21 22:41:43 +02:00
Brian Anderson
d24a3a4b01 core::rt: Use generated port numbers in tests 2013-04-20 01:16:06 -07:00
Brian Anderson
1f97e6d47f rt: Add rust_dbg_next_port for generating test port numbers 2013-04-20 00:24:44 -07:00
bors
8b3c09a103 auto merge of #5962 : pcwalton/rust/shootout, r=pcwalton
r? @brson
2013-04-19 19:24:52 -07:00
Brian Anderson
b96765179e core: Add rt::context for figuring out what runtime services are available
Conflicts:
	src/libcore/rt/sched/mod.rs
2013-04-19 12:05:18 -07:00
Patrick Walton
9902e798d5 rt: Remove dump_stacks 2013-04-19 12:00:08 -07:00