]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoRevert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"
Brian Anderson [Thu, 29 Aug 2013 21:20:48 +0000 (14:20 -0700)]
Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"

This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing
changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562.

Conflicts:
mk/rt.mk
src/libuv

10 years agoauto merge of #8848 : ILyoan/rust/mk_libuv, r=cmr
bors [Thu, 29 Aug 2013 20:05:47 +0000 (13:05 -0700)]
auto merge of #8848 : ILyoan/rust/mk_libuv, r=cmr

10 years agoauto merge of #8842 : jfager/rust/remove-iter-module, r=pnkfelix
bors [Thu, 29 Aug 2013 18:10:47 +0000 (11:10 -0700)]
auto merge of #8842 : jfager/rust/remove-iter-module, r=pnkfelix

Moves the Times trait to num while the question of whether it should
exist at all gets hashed out as a completely separate question.

10 years agoauto merge of #8840 : alexcrichton/rust/update-vendors, r=cmr
bors [Thu, 29 Aug 2013 16:50:48 +0000 (09:50 -0700)]
auto merge of #8840 : alexcrichton/rust/update-vendors, r=cmr

The LLVM update includes patches from #8488 by @klutzy to build llvm on mingw-64 and also to enable segmented stacks on that platform.

The libuv patch is a rebase on the now-current joyent/master in order to fix #8829

10 years agoauto merge of #8838 : brson/rust/rvfpelim, r=alexcrichton
bors [Thu, 29 Aug 2013 13:00:48 +0000 (06:00 -0700)]
auto merge of #8838 : brson/rust/rvfpelim, r=alexcrichton

This reverts commit 2c0f9bd35493def5e23f0f43ddeba54da9d788b4, reversing
changes made to f8c4f0ea9c96218dbc81081799e77875fbb071de.

Conflicts:
src/rustllvm/RustWrapper.cpp

Fixes #8833

10 years agoauto merge of #8823 : huonw/rust/6233, r=brson
bors [Thu, 29 Aug 2013 11:50:43 +0000 (04:50 -0700)]
auto merge of #8823 : huonw/rust/6233, r=brson

Fixes #7335.

10 years agoauto merge of #8830 : andersk/rust/indent-4, r=catamorphism
bors [Thu, 29 Aug 2013 10:10:42 +0000 (03:10 -0700)]
auto merge of #8830 : andersk/rust/indent-4, r=catamorphism

`default-tab-width` is standardly 8, but most programmers and style guides prefer an indentation width smaller than that.  Rust itself uses 4 space indents.  Most other Emacs modes define the indentation width as 4 or 2 spaces, independently of the width of a Tab character.  Depending on `default-tab-width` makes especially little sense for rust-mode because it sets `indent-tabs-mode` to `nil`.

10 years agomk: Fix libuv makefile generation on android
Ilyong Cho [Thu, 29 Aug 2013 08:44:23 +0000 (17:44 +0900)]
mk: Fix libuv makefile generation on android

10 years agoRemove the iter module.
Jason Fager [Thu, 29 Aug 2013 05:27:24 +0000 (01:27 -0400)]
Remove the iter module.

Moves the Times trait to num while the question of whether it should
exist at all gets hashed out as a completely separate question.

10 years agoEnable segmented stacks for llvm on mingw-64
Alex Crichton [Thu, 29 Aug 2013 03:36:25 +0000 (20:36 -0700)]
Enable segmented stacks for llvm on mingw-64

cc #8488

10 years agoUpdate libuv to rebase on top of joyent/master
Alex Crichton [Thu, 29 Aug 2013 03:33:24 +0000 (20:33 -0700)]
Update libuv to rebase on top of joyent/master

Closes #8829

10 years agoauto merge of #8800 : fhahn/rust/ticket_5239, r=alexcrichton
bors [Thu, 29 Aug 2013 03:30:36 +0000 (20:30 -0700)]
auto merge of #8800 : fhahn/rust/ticket_5239, r=alexcrichton

I've added a test for the second example mentioned in #5239. The first example does not compile with a reasonable error message. Should I add a compile-fail test for that example as well?

    /rust/src/test/run-pass/issue-5239.rs:15:45: 15:51 error: binary operation + cannot be applied to type `&int`
    rust/src/test/run-pass/issue-5239.rs:15     let _f = |ref x: int| { x += 1};
                                                                                         ^~~~~~

    error: aborting due to previous error

10 years agoRevert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"
Brian Anderson [Thu, 29 Aug 2013 00:41:40 +0000 (17:41 -0700)]
Revert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"

This reverts commit 2c0f9bd35493def5e23f0f43ddeba54da9d788b4, reversing
changes made to f8c4f0ea9c96218dbc81081799e77875fbb071de.

Conflicts:
src/rustllvm/RustWrapper.cpp

10 years agoMake the unit-test framework check RUST_TEST_TASKS over RUST_THREADS.
Huon Wilson [Wed, 28 Aug 2013 12:58:41 +0000 (22:58 +1000)]
Make the unit-test framework check RUST_TEST_TASKS over RUST_THREADS.

Fixes #7335.

10 years agoauto merge of #8832 : alexcrichton/rust/fix-libuv-build, r=pcwalton
bors [Thu, 29 Aug 2013 00:35:35 +0000 (17:35 -0700)]
auto merge of #8832 : alexcrichton/rust/fix-libuv-build, r=pcwalton

It turns out that gyp (libuv's new build system) wants x64 for a 64-bit x86
architecture and ia32 for a 32-bit architecture, so this performs the relevant
mapping and then invokes libuv's configure script with the appropriate target
architecture.

This can be verified by running make with VERBOSE=1 and seeing that beforehand
on a 64-bit build libuv was passed "-arch i386" and now it's passed
"-arch x86_64"

Closes #8826

10 years agoFix compilation issues with libuv on OSX
Alex Crichton [Thu, 29 Aug 2013 00:01:44 +0000 (17:01 -0700)]
Fix compilation issues with libuv on OSX

It turns out that gyp (libuv's new build system) wants x64 for a 64-bit x86
architecture and ia32 for a 32-bit architecture, so this performs the relevant
mapping and then invokes libuv's configure script with the appropriate target
architecture.

This can be verified by running make with VERBOSE=1 and seeing that beforehand
on a 64-bit build libuv was passed "-arch i386" and now it's passed
"-arch x86_64"

Closes #8826

10 years agoauto merge of #8718 : bblum/rust/typeof, r=pcwalton
bors [Wed, 28 Aug 2013 22:30:38 +0000 (15:30 -0700)]
auto merge of #8718 : bblum/rust/typeof, r=pcwalton

r? anybody

10 years agorust-mode: Default rust-indent-offset to 4, not default-tab-width
Anders Kaseorg [Wed, 28 Aug 2013 22:09:02 +0000 (18:09 -0400)]
rust-mode: Default rust-indent-offset to 4, not default-tab-width

default-tab-width is standardly 8, but most programmers and style
guides prefer an indentation width smaller than that.  Rust itself
uses 4 space indents.  Most other Emacs modes define the indentation
width as 4 or 2 spaces, independently of the width of a Tab character.
Depending on default-tab-width makes especially little sense for
rust-mode because it sets indent-tabs-mode to nil.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
10 years agoauto merge of #8447 : alexcrichton/rust/local-data-merge, r=brson
bors [Wed, 28 Aug 2013 21:15:37 +0000 (14:15 -0700)]
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

10 years agoauto merge of #8828 : brson/rust/randomness, r=thestinger
bors [Wed, 28 Aug 2013 19:30:52 +0000 (12:30 -0700)]
auto merge of #8828 : brson/rust/randomness, r=thestinger

The new scheduler is not currently that random.

10 years agodoc: Remove statement about scheduling randomness
Brian Anderson [Wed, 28 Aug 2013 18:23:30 +0000 (11:23 -0700)]
doc: Remove statement about scheduling randomness

The new scheduler is not currently that random.

10 years agoauto merge of #8807 : alexcrichton/rust/remove-two-offsets, r=thestinger
bors [Wed, 28 Aug 2013 18:00:41 +0000 (11:00 -0700)]
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

10 years agoauto merge of #8806 : klutzy/rust/winmain, r=cmr
bors [Wed, 28 Aug 2013 14:25:42 +0000 (07:25 -0700)]
auto merge of #8806 : klutzy/rust/winmain, r=cmr

Fixes #8510.

10 years agoauto merge of #8821 : alexcrichton/rust/fix-libuv-build, r=huonw
bors [Wed, 28 Aug 2013 10:40:40 +0000 (03:40 -0700)]
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.

10 years agoRun gyp_uv with CFG_PYTHON instead of directly
Alex Crichton [Wed, 28 Aug 2013 09:17:13 +0000 (02:17 -0700)]
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.

10 years agoAdd tests for ref in closure parameter list, closes #5239
Florian Hahn [Tue, 27 Aug 2013 21:48:02 +0000 (23:48 +0200)]
Add tests for ref in closure parameter list, closes #5239

10 years agoRemove offset_inbounds for an unsafe offset function
Alex Crichton [Fri, 9 Aug 2013 05:22:52 +0000 (22:22 -0700)]
Remove offset_inbounds for an unsafe offset function

10 years agoauto merge of #8805 : jfager/rust/remove-hashutil, r=alexcrichton
bors [Wed, 28 Aug 2013 06:05:35 +0000 (23:05 -0700)]
auto merge of #8805 : jfager/rust/remove-hashutil, r=alexcrichton

10 years agoauto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson
bors [Wed, 28 Aug 2013 04:55:42 +0000 (21:55 -0700)]
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.

10 years agorustc: Use "main" entry point on Windows
klutzy [Wed, 28 Aug 2013 04:43:11 +0000 (13:43 +0900)]
rustc: Use "main" entry point on Windows

Fixes #8510.

10 years agoConsolidate local_data implementations, and cleanup
Alex Crichton [Sun, 11 Aug 2013 03:06:39 +0000 (20:06 -0700)]
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

10 years agoFix merge fallout
Alex Crichton [Wed, 28 Aug 2013 03:53:26 +0000 (20:53 -0700)]
Fix merge fallout

10 years agoFix various issues associated with building on windows
Alex Crichton [Wed, 28 Aug 2013 03:20:26 +0000 (20:20 -0700)]
Fix various issues associated with building on windows

10 years agoImplement process bindings to libuv
Alex Crichton [Thu, 15 Aug 2013 21:18:13 +0000 (14:18 -0700)]
Implement process bindings to libuv

Closes #6436

10 years agoUpgrade libuv to the current master + our patches
Alex Crichton [Mon, 19 Aug 2013 00:11:45 +0000 (17:11 -0700)]
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

10 years agoauto merge of #8697 : kballard/rust/rustpkg-no-args, r=catamorphism
bors [Wed, 28 Aug 2013 03:45:40 +0000 (20:45 -0700)]
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

10 years agoauto merge of #8802 : pcwalton/rust/compile-speed, r=brson
bors [Wed, 28 Aug 2013 02:35:44 +0000 (19:35 -0700)]
auto merge of #8802 : pcwalton/rust/compile-speed, r=brson

r? @brson

10 years agolibrustc: Fix merge fallout
Patrick Walton [Wed, 28 Aug 2013 01:45:13 +0000 (18:45 -0700)]
librustc: Fix merge fallout

10 years agoHandle `rustpkg build`, etc. when given no args properly
Kevin Ballard [Fri, 23 Aug 2013 02:18:38 +0000 (19:18 -0700)]
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.

10 years agolibrustc: Fix problem with cross-crate reexported static methods.
Patrick Walton [Sat, 24 Aug 2013 01:31:43 +0000 (18:31 -0700)]
librustc: Fix problem with cross-crate reexported static methods.

10 years agolibrustc: Implement basic lazy implementation loading.
Patrick Walton [Fri, 23 Aug 2013 21:34:00 +0000 (14:34 -0700)]
librustc: Implement basic lazy implementation loading.

This is only for implementations defined in the same crate as the trait they
implement.

10 years agolibrustc: Implement lazy module loading.
Patrick Walton [Thu, 22 Aug 2013 01:39:30 +0000 (18:39 -0700)]
librustc: Implement lazy module loading.

10 years agolibrustc: Remove `each_path`.
Patrick Walton [Thu, 22 Aug 2013 00:26:33 +0000 (17:26 -0700)]
librustc: Remove `each_path`.

This does not implement lazy symbol resolution yet.

10 years agolibstd: Fix merge fallout.
Patrick Walton [Wed, 21 Aug 2013 03:00:26 +0000 (20:00 -0700)]
libstd: Fix merge fallout.

10 years agolibrustc: Stop calling `each_path` in coherence.
Patrick Walton [Tue, 20 Aug 2013 21:55:54 +0000 (14:55 -0700)]
librustc: Stop calling `each_path` in coherence.

10% win or so for small crates.

10 years agolibrustc: Fix merge fallout.
Patrick Walton [Tue, 20 Aug 2013 00:24:04 +0000 (17:24 -0700)]
librustc: Fix merge fallout.

10 years agotest: xfail a test that relies on old path behavior.
Patrick Walton [Sat, 17 Aug 2013 18:14:44 +0000 (11:14 -0700)]
test: xfail a test that relies on old path behavior.

10 years agolibrustc: Convert check loans to use the new visitor
Patrick Walton [Fri, 16 Aug 2013 22:06:00 +0000 (15:06 -0700)]
librustc: Convert check loans to use the new visitor

10 years agolibrustc: Ensure that type parameters are in the right positions in paths.
Patrick Walton [Thu, 8 Aug 2013 18:38:10 +0000 (11:38 -0700)]
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.

10 years agolibrustc: Add support for type parameters in the middle of paths.
Patrick Walton [Wed, 7 Aug 2013 16:47:28 +0000 (09:47 -0700)]
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.

10 years agolibrustc: Remove `&const` and `*const` from the language.
Patrick Walton [Sat, 3 Aug 2013 04:41:06 +0000 (21:41 -0700)]
librustc: Remove `&const` and `*const` from the language.

They are still present as part of the borrow check.

10 years agoReplace HashUtil w/ default method on Hash
Jason Fager [Wed, 28 Aug 2013 01:41:10 +0000 (21:41 -0400)]
Replace HashUtil w/ default method on Hash

10 years agoauto merge of #8799 : fhahn/rust/ticket_5783, r=catamorphism
bors [Wed, 28 Aug 2013 01:20:44 +0000 (18:20 -0700)]
auto merge of #8799 : fhahn/rust/ticket_5783, r=catamorphism

I've added a testcase, as mentioned in #5783

10 years agoauto merge of #8797 : nikomatsakis/rust/issue-8625-assign-to-andmut-in-borrowed-loc...
bors [Wed, 28 Aug 2013 00:05:46 +0000 (17:05 -0700)]
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

10 years agoauto merge of #8792 : adridu59/rust/master, r=catamorphism
bors [Tue, 27 Aug 2013 22:50:50 +0000 (15:50 -0700)]
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)]

10 years agoauto merge of #8771 : thestinger/rust/repr, r=catamorphism
bors [Tue, 27 Aug 2013 21:35:49 +0000 (14:35 -0700)]
auto merge of #8771 : thestinger/rust/repr, r=catamorphism

10 years agoAdd test for #5783
Florian Hahn [Tue, 27 Aug 2013 21:27:10 +0000 (23:27 +0200)]
Add test for #5783

10 years agoRemove remnants of implicit self
Niko Matsakis [Tue, 27 Aug 2013 20:36:42 +0000 (16:36 -0400)]
Remove remnants of implicit self

10 years agoreflect: rm unused visit_{var,var_integral,constr}
Daniel Micay [Mon, 26 Aug 2013 20:58:38 +0000 (16:58 -0400)]
reflect: rm unused visit_{var,var_integral,constr}

10 years agorepr: include mutability qualifier in visit_ptr
Daniel Micay [Mon, 26 Aug 2013 20:39:51 +0000 (16:39 -0400)]
repr: include mutability qualifier in visit_ptr

10 years agorepr: print integer/float suffixes
Daniel Micay [Mon, 26 Aug 2013 19:58:50 +0000 (15:58 -0400)]
repr: print integer/float suffixes

10 years agoauto merge of #8790 : huonw/rust/unsafearc, r=thestinger
bors [Tue, 27 Aug 2013 20:20:47 +0000 (13:20 -0700)]
auto merge of #8790 : huonw/rust/unsafearc, r=thestinger

`UnsafeAtomicRcBox` &rarr; `UnsafeArc` (#7674), and `AtomicRcBoxData` &rarr; `ArcData` to reflect this.

Also, the inner pointer of `UnsafeArc` is now `*mut ArcData`, which avoids some transmutes to `~`: i.e. less chance of mistakes.

10 years agoExtend aliasability check to uncover `& &mut &mut` and the like
Niko Matsakis [Tue, 27 Aug 2013 19:44:55 +0000 (15:44 -0400)]
Extend aliasability check to uncover `& &mut &mut` and the like

10 years agoauto merge of #8581 : FlaPer87/rust/issue/8232, r=bblum
bors [Tue, 27 Aug 2013 18:35:51 +0000 (11:35 -0700)]
auto merge of #8581 : FlaPer87/rust/issue/8232, r=bblum

As for now, rekillable is an unsafe function, instead, it should behave
just like unkillable by encapsulating unsafe code within an unsafe
block.

This patch does that and removes unsafe blocks that were encapsulating
rekillable calls throughout rust's libs.

Fixes #8232

10 years agoTrailing space
Flaper Fesp [Tue, 27 Aug 2013 18:09:57 +0000 (20:09 +0200)]
Trailing space

10 years agovec: implement `DeepClone`
Daniel Micay [Mon, 26 Aug 2013 03:34:43 +0000 (23:34 -0400)]
vec: implement `DeepClone`

10 years agoauto merge of #8772 : thestinger/rust/option, r=anasazi
bors [Tue, 27 Aug 2013 17:20:52 +0000 (10:20 -0700)]
auto merge of #8772 : thestinger/rust/option, r=anasazi

Closes #6002

There is consensus that the current implementation should be changed or
removed, so removing it seems like the right decision for now.

10 years agooption: rm implementation of Add
Daniel Micay [Mon, 26 Aug 2013 22:04:17 +0000 (18:04 -0400)]
option: rm implementation of Add

Closes #6002

There is consensus that the current implementation should be changed or
removed, so removing it seems like the right decision for now.

10 years agoauto merge of #8789 : pnkfelix/rust/fsk-fix-typo-in-rust-mode.el, r=pnkfelix
bors [Tue, 27 Aug 2013 15:00:51 +0000 (08:00 -0700)]
auto merge of #8789 : pnkfelix/rust/fsk-fix-typo-in-rust-mode.el, r=pnkfelix

Fix #6887.  (or rather, a bug injected by my prior commit for fixing that bug.)

10 years agoauto merge of #8777 : Kimundi/rust/doc_stuff, r=cmr
bors [Tue, 27 Aug 2013 13:45:50 +0000 (06:45 -0700)]
auto merge of #8777 : Kimundi/rust/doc_stuff, r=cmr

10 years agolibrustpkg/tests.rs: cleanup unused import
Adrien Tétar [Tue, 27 Aug 2013 12:45:40 +0000 (14:45 +0200)]
librustpkg/tests.rs: cleanup unused import

10 years agoauto merge of #8780 : brson/rust/from_elem, r=thestinger
bors [Tue, 27 Aug 2013 12:30:54 +0000 (05:30 -0700)]
auto merge of #8780 : brson/rust/from_elem, r=thestinger

10 years agostd: use ArcData rather than c_void in UnsafeArc.
Huon Wilson [Tue, 27 Aug 2013 12:17:58 +0000 (22:17 +1000)]
std: use ArcData rather than c_void in UnsafeArc.

This means that fewer `transmute`s are required, so there is less
chance of a `transmute` not having the corresponding `forget`
(possibly leading to use-after-free, etc).

10 years agoauto merge of #8779 : brson/rust/macsupp, r=thestinger
bors [Tue, 27 Aug 2013 11:15:54 +0000 (04:15 -0700)]
auto merge of #8779 : brson/rust/macsupp, r=thestinger

This callstack changed when the FFI did. I am still a little frightened by
this suppression.

cc #8253

10 years agofix typo in rust-mode.el
Felix S. Klock II [Tue, 27 Aug 2013 10:48:51 +0000 (12:48 +0200)]
fix typo in rust-mode.el

10 years agoRename UnsafeAtomicRcBox to UnsafeArc. Fixes #7674.
Huon Wilson [Tue, 27 Aug 2013 10:00:57 +0000 (20:00 +1000)]
Rename UnsafeAtomicRcBox to UnsafeArc. Fixes #7674.

10 years agoauto merge of #8773 : catamorphism/rust/rustpkg-version-flag, r=anasazi
bors [Tue, 27 Aug 2013 10:00:52 +0000 (03:00 -0700)]
auto merge of #8773 : catamorphism/rust/rustpkg-version-flag, r=anasazi

r? anyone. Now, rustpkg --version does something useful!

10 years agoRebased and replaced yield with deschedule
Flaper Fesp [Tue, 27 Aug 2013 07:53:31 +0000 (09:53 +0200)]
Rebased and replaced yield with deschedule

10 years agoauto merge of #8757 : vadimcn/rust/debug-info-tests, r=brson
bors [Tue, 27 Aug 2013 06:35:54 +0000 (23:35 -0700)]
auto merge of #8757 : vadimcn/rust/debug-info-tests, r=brson

Now that new LLVM has landed, the debug info works on Windows as well.   Most existing tests pass, except for the following four, which I left disabled for now:
lexical-scope-in-for-loop
lexical-scope-in-if
lexical-scope-in-match
lexical-scopes-in-block-expression

Also, fixed a small problem with the debug info test runner.

10 years agoauto merge of #8700 : alexcrichton/rust/better-llvm, r=thestinger
bors [Tue, 27 Aug 2013 04:25:55 +0000 (21:25 -0700)]
auto merge of #8700 : alexcrichton/rust/better-llvm, r=thestinger

Beforehand, it was unclear whether rust was performing the "recommended set" of
optimizations provided by LLVM for code. This commit changes the way we run
passes to closely mirror that of clang, which in theory does it correctly. The
notable changes include:

* Passes are no longer explicitly added one by one. This would be difficult to
  keep up with as LLVM changes and we don't guaranteed always know the best
  order in which to run passes
* Passes are now managed by LLVM's PassManagerBuilder object. This is then used
  to populate the various pass managers run.
* We now run both a FunctionPassManager and a module-wide PassManager. This is
  what clang does, and I presume that we *may* see a speed boost from the
  module-wide passes just having to do less work. I have no measured this.
* The codegen pass manager has been extracted to its own separate pass manager
  to not get mixed up with the other passes
* All pass managers now include passes for target-specific data layout and
  analysis passes

Some new features include:

* You can now print all passes being run with `-Z print-llvm-passes`
* When specifying passes via `--passes`, the passes are now appended to the
  default list of passes instead of overwriting them.
* The output of `--passes list` is now generated by LLVM instead of maintaining
  a list of passes ourselves
* Loop vectorization is turned on by default as an optimization pass and can be
  disabled with `-Z no-vectorize-loops`

All of these "copies" of clang are based off their [source code](http://clang.llvm.org/doxygen/BackendUtil_8cpp_source.html) in case anyone is curious what my source is. I was hoping that this would fix #8665, but this does not help the performance issues found there. Hopefully i'll allow us to tweak passes or see what's going on to try to debug that problem.

10 years agoRewrite pass management with LLVM
Alex Crichton [Fri, 23 Aug 2013 03:58:42 +0000 (20:58 -0700)]
Rewrite pass management with LLVM

Beforehand, it was unclear whether rust was performing the "recommended set" of
optimizations provided by LLVM for code. This commit changes the way we run
passes to closely mirror that of clang, which in theory does it correctly. The
notable changes include:

* Passes are no longer explicitly added one by one. This would be difficult to
  keep up with as LLVM changes and we don't guaranteed always know the best
  order in which to run passes
* Passes are now managed by LLVM's PassManagerBuilder object. This is then used
  to populate the various pass managers run.
* We now run both a FunctionPassManager and a module-wide PassManager. This is
  what clang does, and I presume that we *may* see a speed boost from the
  module-wide passes just having to do less work. I have no measured this.
* The codegen pass manager has been extracted to its own separate pass manager
  to not get mixed up with the other passes
* All pass managers now include passes for target-specific data layout and
  analysis passes

Some new features include:

* You can now print all passes being run with `-Z print-llvm-passes`
* When specifying passes via `--passes`, the passes are now appended to the
  default list of passes instead of overwriting them.
* The output of `--passes list` is now generated by LLVM instead of maintaining
  a list of passes ourselves
* Loop vectorization is turned on by default as an optimization pass and can be
  disabled with `-Z no-vectorize-loops`

10 years agoauto merge of #8747 : pnkfelix/rust/fsk-issue6887-fix-emacs-compilation-regexp, r...
bors [Tue, 27 Aug 2013 02:55:57 +0000 (19:55 -0700)]
auto merge of #8747 : pnkfelix/rust/fsk-issue6887-fix-emacs-compilation-regexp, r=graydon

Fix #6887

10 years agoRewrote module tutorial
Marvin Löbel [Fri, 23 Aug 2013 20:11:44 +0000 (22:11 +0200)]
Rewrote module tutorial

10 years agoauto merge of #8739 : fhahn/rust/ticket_2275, r=brson
bors [Tue, 27 Aug 2013 01:20:56 +0000 (18:20 -0700)]
auto merge of #8739 : fhahn/rust/ticket_2275, r=brson

This is a pull request for #2275

I've created a small python script to generate test files for a list of keywords (as break do else enum extern false fn for if impl let loop match mod mut priv pub ref return self static struct super true trait type unsafe use while), but I'm not really sure where to put it. I've added the created files as well.

I did not use

     fn main() {
        let $KW = "foo"; //~ error
        println($KW); //~ error
    }

as template, because for return, self, ref, loop, mut and break this does not raise an error in the ```println``` line, only in the ```let``` line.

10 years agostd: Make vec::from_elem failure-safe
Brian Anderson [Tue, 27 Aug 2013 01:17:37 +0000 (18:17 -0700)]
std: Make vec::from_elem failure-safe

10 years agoFix valgrind suppression on mac
Brian Anderson [Tue, 27 Aug 2013 00:39:50 +0000 (17:39 -0700)]
Fix valgrind suppression on mac

This callstack changed when the FFI did. I am still a little frightened by
this suppression.

10 years agoauto merge of #8438 : cmr/rust/default, r=thestinger
bors [Tue, 27 Aug 2013 00:05:57 +0000 (17:05 -0700)]
auto merge of #8438 : cmr/rust/default, r=thestinger

10 years agoFix deriving-zero test
Corey Richardson [Mon, 26 Aug 2013 23:47:58 +0000 (19:47 -0400)]
Fix deriving-zero test

10 years agoAdd a Default trait.
Corey Richardson [Sat, 10 Aug 2013 13:38:00 +0000 (09:38 -0400)]
Add a Default trait.

10 years agoauto merge of #8712 : catamorphism/rust/rustpkg-issue-7241, r=pcwalton
bors [Mon, 26 Aug 2013 22:51:15 +0000 (15:51 -0700)]
auto merge of #8712 : catamorphism/rust/rustpkg-issue-7241, r=pcwalton

r? @brson ...multiple workspaces

The test checks that rustpkg uses the first one, rather than complaining
about multiple matches.

Closes #7241

10 years agoDecrement unkillable counter before failing
Flaper Fesp [Tue, 20 Aug 2013 00:10:53 +0000 (02:10 +0200)]
Decrement unkillable counter before failing

10 years agoDon't make the runtime exit on illegal calls
Flaper Fesp [Mon, 19 Aug 2013 23:26:05 +0000 (01:26 +0200)]
Don't make the runtime exit on illegal calls

10 years agorustpkg: Implement --version command-line option
Tim Chevalier [Mon, 26 Aug 2013 22:34:34 +0000 (15:34 -0700)]
rustpkg: Implement --version command-line option

Now, rustpkg --version does something useful!

10 years agoTesting rekillable fails when called from outside an unkillable block
Flaper Fesp [Sun, 18 Aug 2013 16:07:20 +0000 (18:07 +0200)]
Testing rekillable fails when called from outside an unkillable block

10 years agoMake rekillable consistent with unkillable
Flaper Fesp [Sat, 17 Aug 2013 22:51:39 +0000 (00:51 +0200)]
Make rekillable consistent with unkillable

As for now, rekillable is an unsafe function, instead, it should behave
just like unkillable by encapsulating unsafe code within an unsafe
block.

This patch does that and removes unsafe blocks that were encapsulating
rekillable calls throughout rust's libs.

Fixes #8232

10 years agorustpkg: Test that different copies of the same package ID can exist in multiple...
Tim Chevalier [Fri, 23 Aug 2013 18:51:45 +0000 (11:51 -0700)]
rustpkg: Test that different copies of the same package ID can exist in multiple workspaces

The test checks that rustpkg uses the first one, rather than complaining
about multiple matches.

Closes #7241

10 years agoauto merge of #8766 : brson/rust/vecfromfn, r=alexcrichton
bors [Mon, 26 Aug 2013 20:41:12 +0000 (13:41 -0700)]
auto merge of #8766 : brson/rust/vecfromfn, r=alexcrichton

A recently-enabled test of this is causing valgrind failures.

10 years agostd: Make vec::from_fn failure-safe
Brian Anderson [Mon, 26 Aug 2013 20:29:33 +0000 (13:29 -0700)]
std: Make vec::from_fn failure-safe

10 years agoauto merge of #8488 : klutzy/rust/mingw-w64, r=brson
bors [Mon, 26 Aug 2013 18:46:13 +0000 (11:46 -0700)]
auto merge of #8488 : klutzy/rust/mingw-w64, r=brson

This patchset enables rustc to cross-build mingw-w64 outputs.
Tested on mingw + mingw-w64 (mingw-builds, win64/seh/win32-threads/gcc-4.8.1).

I also patched llvm to support Win64 stack unwinding.
https://github.com/klutzy/llvm/commit/ebe22bdbcebc4f8342c4c7c50e3b61fa6c68c1ad

I cross-built test/run-pass/smallest-hello-world.rs and confirmed it works.
However, I also found something went wrong if I don't have custom `#[start]` routine.

10 years agoauto merge of #8764 : blake2-ppc/rust/doc-condition, r=graydon
bors [Mon, 26 Aug 2013 17:36:18 +0000 (10:36 -0700)]
auto merge of #8764 : blake2-ppc/rust/doc-condition, r=graydon

As mentioned in PR #8563 it seems this tutorial has no inbound link!