Commit Graph

27 Commits

Author SHA1 Message Date
Patrick Walton
1946265e1a libstd: Change all uses of &fn(A)->B over to |A|->B in libstd 2013-11-19 12:40:19 -08:00
Alex Crichton
e8bf078802 Remove the C++ lock_and_signal type
A the same time this purges all runtime support needed for statically
initialized mutexes, moving all users over to the new Mutex type instead.
2013-11-18 20:06:40 -08:00
Alex Crichton
7755ffd013 Remove #[fixed_stack_segment] and #[rust_stack]
These two attributes are no longer useful now that Rust has decided to leave
segmented stacks behind. It is assumed that the rust task's stack is always
large enough to make an FFI call (due to the stack being very large).

There's always the case of stack overflow, however, to consider. This does not
change the behavior of stack overflow in Rust. This is still normally triggered
by the __morestack function and aborts the whole process.

C stack overflow will continue to corrupt the stack, however (as it did before
this commit as well). The future improvement of a guard page at the end of every
rust stack is still unimplemented and is intended to be the mechanism through
which we attempt to detect C stack overflow.

Closes #8822
Closes #10155
2013-11-11 10:40:34 -08:00
bors
c47986b675 auto merge of #10394 : yichoi/rust/make_check_pass_android, r=brson
To enable test on android bot #9120

some tests are disabled and can be fixed further.
2013-11-11 06:21:16 -08:00
Alex Crichton
7407bcc1a2 Register new snapshots 2013-11-10 17:51:56 -08:00
Young-il Choi
d6f7669c78 temporarily disable tests on android and tagging issue number #10379 2013-11-10 11:57:27 +09:00
Alex Crichton
daf5f5a4d1 Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
2013-10-22 08:09:56 -07:00
Kevin Ballard
d6d9b92683 path2: Adjust the API to remove all the _str mutation methods
Add a new trait BytesContainer that is implemented for both byte vectors
and strings.

Convert Path::from_vec and ::from_str to one function, Path::new().

Remove all the _str-suffixed mutation methods (push, join, with_*,
set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15 22:18:30 -07:00
Kevin Ballard
73d3d00ec4 path2: Replace the path module outright
Remove the old path.
Rename path2 to path.
Update all clients for the new path.

Also make some miscellaneous changes to the Path APIs to help the
adoption process.
2013-10-15 21:56:54 -07:00
Steven Fackler
1d19ad9787 Fix thread safety issues in dynamic_lib
The root issue is that dlerror isn't reentrant or even thread safe.

The Windows code isn't affected since errno is thread-local on Windows
and it's running in an atomically block to ensure there isn't a green
thread context switch.

Closes #8156
2013-10-05 10:37:11 -07:00
Alex Crichton
a8ba31dbf3 std: Remove usage of fmt! 2013-09-30 23:21:18 -07:00
Luqman Aden
20a10ff9c9 Find the cratemap at runtime on windows. 2013-09-23 18:26:16 -04:00
Daniel Micay
4e161a4d40 switch Drop to &mut self 2013-09-16 22:19:23 -04:00
Alex Crichton
645b83d712 Flag the dynamic_lib tests as ignored
The library isn't thread-safe, cc #9137
2013-09-11 23:22:52 -07:00
Vadim Chugunov
653825889e Turned off libstd unit tests that currently fail on Windows. 2013-08-28 01:44:25 -07:00
klutzy
05b6a2f59c std: Add Win64 support
Some extern blobs are duplicated without "stdcall" abi,
since Win64 does not use any calling convention.
(Giving any abi to them causes llvm producing wrong bytecode.)
2013-08-26 22:15:45 +09:00
Niko Matsakis
0479d946c8 Add externfn macro and correctly label fixed_stack_segments 2013-08-19 07:13:15 -04:00
Kevin Ballard
03ef71e262 Add ToCStr method .with_c_str()
.with_c_str() is a replacement for the old .as_c_str(), to avoid
unnecessary boilerplate.

Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-15 01:33:10 -07:00
Erick Tryzelaar
3102b1797e std: replace str::as_c_str with std::c_str 2013-08-04 14:13:17 -07:00
Steven Stewart-Gallus
2047026fef Fix calling destructor on uninitialized dynamic library crash.
A test case was also created for this situation to prevent the problem
occuring again.

A similar problem was also fixed for the symbol method.

There was some minor code cleanup.
2013-08-01 23:41:33 -07:00
Ben Blum
bc7cee7bbf Move atomically to unstable::sync, and document what it actually does. Close #7872. 2013-07-31 14:37:22 -04:00
bors
09b4525f84 auto merge of #7113 : alexcrichton/rust/banned-warnings, r=cmr
Reopening of #7031, Closes #6963

I imagine though that this will bounce in bors once or twice... Because attributes can't be cfg(stage0)'d off, there's temporarily a lot of new stage0/stage1+ code.
2013-06-26 00:56:04 -07:00
Luqman Aden
ca2966c6d0 Change finalize -> drop. 2013-06-25 21:14:39 -04:00
Alex Crichton
c109bed15b Deny common lints by default for lib{std,extra} 2013-06-25 17:39:43 -07:00
James Miller
0702e53576 libstd: cleanup warnings 2013-06-21 02:43:02 +12:00
Philipp Brueschweiler
c7013ba1fc std::dynamic_lib: start fixing windows implementation
The code compiles and runs under windows now, but I couldn't look up any
symbol from the current executable (dlopen(NULL)), and calling looked
up external function handles doesn't seem to work correctly under windows.
2013-06-15 10:10:49 +02:00
Steven Stewart-Gallus
786ea3ffe6 Prototyped a dynamic library facility interface 2013-06-12 17:32:13 -07:00