Commit Graph

22503 Commits

Author SHA1 Message Date
bors
da96b3ec6a auto merge of #8447 : alexcrichton/rust/local-data-merge, r=brson
This moves all local_data stuff into the `local_data` module and only that
module alone. It also removes a fair amount of "super-unsafe" code in favor of
just vanilla code generated by the compiler at the same time.

Closes #8113
2013-08-28 14:15:37 -07:00
bors
9c33ef5a7c auto merge of #8828 : brson/rust/randomness, r=thestinger
The new scheduler is not currently that random.
2013-08-28 12:30:52 -07:00
Brian Anderson
d923f75d79 doc: Remove statement about scheduling randomness
The new scheduler is not currently that random.
2013-08-28 11:23:32 -07:00
bors
64ed3721f7 auto merge of #8807 : alexcrichton/rust/remove-two-offsets, r=thestinger
Everything that we do is actually inbounds, so there's no reason for us to be exposing two of these functions
2013-08-28 11:00:41 -07:00
bors
9708ef03a6 auto merge of #8806 : klutzy/rust/winmain, r=cmr
Fixes #8510.
2013-08-28 07:25:42 -07:00
Seo Sanghyeon
97b542bd84 Android: Pass the environment when running tests 2013-08-28 21:44:55 +09:00
Seo Sanghyeon
fcce7e82db Remove --newrt option 2013-08-28 21:25:12 +09:00
Corey Richardson
43f851d2cb Teach the makefile to use multiple src-base's 2013-08-28 08:16:21 -04:00
Corey Richardson
8a07f57081 Teach compiletest to use multiple --src-base's 2013-08-28 08:16:19 -04:00
Corey Richardson
14cdc26e8a src/test/bench: restructure 2013-08-28 08:14:59 -04:00
bors
9bfdd42703 auto merge of #8821 : alexcrichton/rust/fix-libuv-build, r=huonw
The syntax of the script requires python < 3, and so does our build system so we
can just use CFG_PYTHON to run the script. This prevents build failures where
`python` is actually python3 or later.
2013-08-28 03:40:40 -07:00
Alex Crichton
66a07b0550 Run gyp_uv with CFG_PYTHON instead of directly
The syntax of the script requires python < 3, and so does our build system so we
can just use CFG_PYTHON to run the script. This prevents build failures where
`python` is actually python3 or later.
2013-08-28 02:17:13 -07:00
Vadim Chugunov
653825889e Turned off libstd unit tests that currently fail on Windows. 2013-08-28 01:44:25 -07:00
Vadim Chugunov
6828428cad Disabled failing parts of abs_sub() and frexp() unit tests on Windows. 2013-08-28 01:44:12 -07:00
Vadim Chugunov
99345d8d17 Fixed MemoryMap on Windows. 2013-08-28 01:44:12 -07:00
Vadim Chugunov
546e2ae850 Added libstd and libextra unit tests to check-fast target. 2013-08-28 01:44:12 -07:00
Florian Hahn
8557219cd8 Add tests for ref in closure parameter list, closes #5239 2013-08-28 10:12:28 +02:00
Alex Crichton
e3662b1880 Remove offset_inbounds for an unsafe offset function 2013-08-27 23:22:52 -07:00
bors
78c5f97a09 auto merge of #8805 : jfager/rust/remove-hashutil, r=alexcrichton 2013-08-27 23:05:35 -07:00
bors
b8d1fa3994 auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson
This overhauls `std::run` to instead run on top of libuv. This is *not* in a mergeable state, I've been attempting to diagnose failures in the compiletest suite. I've managed to find a fair number of bugs so far, but I still  don't seem to be done yet.

Notable changes:
* This requires upgrading libuv. From the discussion on #6567, I took libuv master from a few days ago, applied one patch to fix process spawning with multiple event loops in libuv, and pushed to my own fork
* The build system for libuv has changed since we last used it. There's some extra checkout from a google build system which apparently does all the magic if you don't want to require autotools, and the google system just requires python. I updated the Makefile to get this build system and build libuv with it instead. This is untested on windows and arm, and both will probably need to see some improvement.
* This required adding some pipe bindings to libuv as well. Currently the support is pretty simple and probably completely unsafe for pipes, but you at least get read/write methods. This is necessary for capturing output of processes.
* I didn't redesign `std::run` at all, I simply tried to reimplement all the existing functionality on top of libuv. Some functions ended up dying, but nothing major. All uses of `std::run` in the compiler still work just fine.

I'm not quite sure how the rest of the runtime deals with this, but I marked process structures as `no_send` because the waiting/waking up has to happen in the same event loop right now. If processes start migrating between event loops then very bad things can happen. This may be what threadsafe I/O would fix, and I would be more than willing to rebase on that if it lands first.

Anyway, for now I wanted to put this up for review, I'm still investigating the corruption/deadlock bugs, but this is in an *almost* workable state. Once I find the bugs I'll also rebase on the current master.
2013-08-27 21:55:42 -07:00
klutzy
eaa565829d rustc: Use "main" entry point on Windows
Fixes #8510.
2013-08-28 13:43:11 +09:00
Alex Crichton
06a7195e9e Consolidate local_data implementations, and cleanup
This moves all local_data stuff into the `local_data` module and only that
module alone. It also removes a fair amount of "super-unsafe" code in favor of
just vanilla code generated by the compiler at the same time.

Closes #8113
2013-08-27 21:29:11 -07:00
Alex Crichton
4635644746 Fix merge fallout 2013-08-27 20:53:26 -07:00
Alex Crichton
2ad05ae014 Fix various issues associated with building on windows 2013-08-27 20:46:43 -07:00
Alex Crichton
b89e1c000e Implement process bindings to libuv
Closes #6436
2013-08-27 20:46:43 -07:00
Alex Crichton
ed204257a0 Upgrade libuv to the current master + our patches
There were two main differences with the old libuv and the master version:

1. The uv_last_error function is now gone. The error code returned by each
   function is the "last error" so now a UvError is just a wrapper around a
   c_int.
2. The repo no longer includes a makefile, and the build system has change.
   According to the build directions on joyent/libuv, this now downloads a `gyp`
   program into the `libuv/build` directory and builds using that. This
   shouldn't add any dependences on autotools or anything like that.

Closes #8407
Closes #6567
Closes #6315
2013-08-27 20:46:17 -07:00
bors
f22b4b1698 auto merge of #8697 : kballard/rust/rustpkg-no-args, r=catamorphism
`rustpkg build` et al were only checking one directory up to see if it
was in a dir named "src". Ditch that entirely and instead check if the
cwd is descended from any of the workspace paths. Besides being more
intelligent about whether or not something is a workspace, this also
allows for package ids composed of multiple path components.

r? @catamorphism
2013-08-27 20:45:40 -07:00
bors
578e680477 auto merge of #8802 : pcwalton/rust/compile-speed, r=brson
r? @brson
2013-08-27 19:35:44 -07:00
Patrick Walton
aac9d6eee9 librustc: Fix merge fallout 2013-08-27 19:09:27 -07:00
Kevin Ballard
eafa63f787 Handle rustpkg build, etc. when given no args properly
`rustpkg build` et al were only checking one directory up to see if it
was in a dir named "src". Ditch that entirely and instead check if the
cwd is descended from any of the workspace paths. Besides being more
intelligent about whether or not something is a workspace, this also
allows for package ids composed of multiple path components.
2013-08-27 19:06:38 -07:00
Patrick Walton
2bd46e767c librustc: Fix problem with cross-crate reexported static methods. 2013-08-27 18:47:59 -07:00
Patrick Walton
6c37e3b7f8 librustc: Implement basic lazy implementation loading.
This is only for implementations defined in the same crate as the trait they
implement.
2013-08-27 18:47:59 -07:00
Patrick Walton
ff7b8d6d88 librustc: Implement lazy module loading. 2013-08-27 18:47:58 -07:00
Patrick Walton
1bbb1e06f1 librustc: Remove each_path.
This does not implement lazy symbol resolution yet.
2013-08-27 18:47:58 -07:00
Patrick Walton
1ad2239f62 libstd: Fix merge fallout. 2013-08-27 18:47:58 -07:00
Patrick Walton
d9bb78efdf librustc: Stop calling each_path in coherence.
10% win or so for small crates.
2013-08-27 18:47:58 -07:00
Patrick Walton
4f32a2d854 librustc: Fix merge fallout. 2013-08-27 18:47:57 -07:00
Patrick Walton
5c9f5ec397 test: xfail a test that relies on old path behavior. 2013-08-27 18:47:57 -07:00
Patrick Walton
a20af8b276 librustc: Convert check loans to use the new visitor 2013-08-27 18:47:57 -07:00
Patrick Walton
8693943676 librustc: Ensure that type parameters are in the right positions in paths.
This removes the stacking of type parameters that occurs when invoking
trait methods, and fixes all places in the standard library that were
relying on it. It is somewhat awkward in places; I think we'll probably
want something like the `Foo::<for T>::new()` syntax.
2013-08-27 18:47:57 -07:00
Patrick Walton
3b6314c39b librustc: Add support for type parameters in the middle of paths.
For example, `foo::<T>::bar::<U>`.

This doesn't enforce that the type parameters are in the right
positions, however.
2013-08-27 18:46:51 -07:00
Patrick Walton
5c3504799d librustc: Remove &const and *const from the language.
They are still present as part of the borrow check.
2013-08-27 18:46:51 -07:00
Jason Fager
da559b2b36 Replace HashUtil w/ default method on Hash 2013-08-27 21:41:10 -04:00
bors
32117132bd auto merge of #8799 : fhahn/rust/ticket_5783, r=catamorphism
I've added a testcase, as mentioned in #5783
2013-08-27 18:20:44 -07:00
bors
58d6eb5048 auto merge of #8797 : nikomatsakis/rust/issue-8625-assign-to-andmut-in-borrowed-loc-2, r=pcwalton
Fixes for #8625 to prevent assigning to `&mut` in borrowed or aliasable locations. The old code was insufficient in that it failed to catch bizarre cases like `& &mut &mut`. 

r? @pnkfelix
2013-08-27 17:05:46 -07:00
bors
d5c144a4cd auto merge of #8792 : adridu59/rust/master, r=catamorphism
`target_library_in_workspace` is imported but unused:
~/rust/src/librustpkg/tests.rs:21:48: 21:75 warning: unused import [-W unused-imports (default)]
2013-08-27 15:50:50 -07:00
bors
7f32ea8820 auto merge of #8771 : thestinger/rust/repr, r=catamorphism 2013-08-27 14:35:49 -07:00
Florian Hahn
890b589491 Add test for #5783 2013-08-27 23:27:10 +02:00
Niko Matsakis
8c09865b66 Remove remnants of implicit self 2013-08-27 16:49:06 -04:00
Daniel Micay
803f941867 reflect: rm unused visit_{var,var_integral,constr} 2013-08-27 16:31:48 -04:00