]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #11265 : c-a/rust/byteswap_from, r=alexcrichton
bors [Thu, 2 Jan 2014 08:51:51 +0000 (00:51 -0800)]
auto merge of #11265 : c-a/rust/byteswap_from, r=alexcrichton

This patchset adds intrinsics similar to the to_[be|le][16|32|64] intrinsics but for going in the reverse direction, e.g. from big/little endian to host endian. Implementation wise they do exactly the same as the corresponding to_* functions but I think it anyway make sense to have them since using the to_* functions in the reverse direction is not entirely intuitive.

The first patch adds the intrinsics and the two following changes instances of bswap* to use the [to|from]_* intrinsics instead.

10 years agoauto merge of #11248 : brson/rust/0.9relnotes, r=alexcrichton
bors [Thu, 2 Jan 2014 07:32:07 +0000 (23:32 -0800)]
auto merge of #11248 : brson/rust/0.9relnotes, r=alexcrichton

10 years agoauto merge of #11246 : ktt3ja/rust/issue-11224, r=alexcrichton
bors [Thu, 2 Jan 2014 06:12:11 +0000 (22:12 -0800)]
auto merge of #11246 : ktt3ja/rust/issue-11224, r=alexcrichton

Close #11224

10 years agoauto merge of #11245 : alexcrichton/rust/issue-11225, r=pcwalton
bors [Thu, 2 Jan 2014 04:56:54 +0000 (20:56 -0800)]
auto merge of #11245 : alexcrichton/rust/issue-11225, r=pcwalton

Commit messages are a little more descriptive.

10 years agoauto merge of #11184 : jhasse/rust/patch-col, r=huonw
bors [Thu, 2 Jan 2014 03:41:55 +0000 (19:41 -0800)]
auto merge of #11184 : jhasse/rust/patch-col, r=huonw

10 years agoTest column offset for #11184
Jan Niklas Hasse [Thu, 2 Jan 2014 01:19:59 +0000 (02:19 +0100)]
Test column offset for #11184

10 years agoauto merge of #11235 : am0d/rust/doc_update, r=brson
bors [Thu, 2 Jan 2014 02:26:57 +0000 (18:26 -0800)]
auto merge of #11235 : am0d/rust/doc_update, r=brson

Running a rust program with `RUST_LOG=::help` no longer shows all the logging modules that are mentioned in the docs.  These should be removed from the docs as they no longer do anything.

10 years agoauto merge of #11242 : Dretch/rust/hashmap-key-value-iterators, r=pcwalton
bors [Thu, 2 Jan 2014 01:11:57 +0000 (17:11 -0800)]
auto merge of #11242 : Dretch/rust/hashmap-key-value-iterators, r=pcwalton

10 years agoOutput columns 1-based. Fixes #10848
Jan Niklas Hasse [Sat, 28 Dec 2013 22:23:44 +0000 (23:23 +0100)]
Output columns 1-based. Fixes #10848

10 years agolibextra: Use from_be32 instead of bswap32 in vuint_at()
Carl-Anton Ingmarsson [Wed, 1 Jan 2014 18:09:10 +0000 (19:09 +0100)]
libextra: Use from_be32 instead of bswap32 in vuint_at()

Also use the fast version of vuint_at() on all architectures since it now
works on both big and little endian architectures.

10 years agolibnative: Use [from|to]_be16 instead of bswap16
Carl-Anton Ingmarsson [Wed, 1 Jan 2014 18:04:35 +0000 (19:04 +0100)]
libnative: Use [from|to]_be16 instead of bswap16

10 years agoAdd byteswap intrinsics for converting from big/little to host endian
Carl-Anton Ingmarsson [Wed, 1 Jan 2014 18:00:22 +0000 (19:00 +0100)]
Add byteswap intrinsics for converting from big/little to host endian

These are similar to the ntoh[s|l] functions in C and have the style of
from_[be|le][16|32|64].

10 years agoauto merge of #11212 : alexcrichton/rust/local-task-count, r=brson
bors [Wed, 1 Jan 2014 21:21:48 +0000 (13:21 -0800)]
auto merge of #11212 : alexcrichton/rust/local-task-count, r=brson

For libgreen, bookeeping should not be global but rather on a per-pool basis.
Inside libnative, it's known that there must be a global counter with a
mutex/cvar.

The benefit of taking this strategy is to remove this functionality from libstd
to allow fine-grained control of it through libnative/libgreen. Notably, helper
threads in libnative can manually decrement the global count so they don't count
towards the global count of threads. Also, the shutdown process of *all* sched
pools is now dependent on the number of tasks in the pool being 0 rather than
this only being a hardcoded solution for the initial sched pool in libgreen.

This involved adding a Local::try_take() method on the Local trait in order for
the channel wakeup to work inside of libgreen. The channel send was happening
from a SchedTask when there is no Task available in TLS, and now this is
possible to work (remote wakeups are always possible, just a little slower).

10 years agoMove task count bookeeping out of libstd
Alex Crichton [Mon, 30 Dec 2013 08:55:27 +0000 (00:55 -0800)]
Move task count bookeeping out of libstd

For libgreen, bookeeping should not be global but rather on a per-pool basis.
Inside libnative, it's known that there must be a global counter with a
mutex/cvar.

The benefit of taking this strategy is to remove this functionality from libstd
to allow fine-grained control of it through libnative/libgreen. Notably, helper
threads in libnative can manually decrement the global count so they don't count
towards the global count of threads. Also, the shutdown process of *all* sched
pools is now dependent on the number of tasks in the pool being 0 rather than
this only being a hardcoded solution for the initial sched pool in libgreen.

This involved adding a Local::try_take() method on the Local trait in order for
the channel wakeup to work inside of libgreen. The channel send was happening
from a SchedTask when there is no Task available in TLS, and now this is
possible to work (remote wakeups are always possible, just a little slower).

10 years agoDon't leave lingering files in doc tests
Alex Crichton [Tue, 31 Dec 2013 20:43:52 +0000 (12:43 -0800)]
Don't leave lingering files in doc tests

Closes #11234

10 years agoUpdate RELEASES.txt for 0.9
Brian Anderson [Tue, 31 Dec 2013 22:35:01 +0000 (14:35 -0800)]
Update RELEASES.txt for 0.9

10 years agoauto merge of #11255 : klutzy/rust/small-cleanup, r=pcwalton
bors [Wed, 1 Jan 2014 19:06:51 +0000 (11:06 -0800)]
auto merge of #11255 : klutzy/rust/small-cleanup, r=pcwalton

This patchset removes some `@`s and unnecessary traits,
and replaces a function (`dummy_sp()`) returning constant value
by static variable.

10 years agoauto merge of #11254 : huonw/rust/impl-names, r=brson
bors [Wed, 1 Jan 2014 15:56:49 +0000 (07:56 -0800)]
auto merge of #11254 : huonw/rust/impl-names, r=brson

The resulting symbol names aren't very pretty at all:

    trait Trait { fn method(&self); }
    impl<'a> Trait for ~[(&'a int, fn())] { fn method(&self) {} }

gives

    Trait$$UP$$VEC$$TUP_2$$BP$int$$FN$$::method::...hash...::v0.0

However, at least it contain some reference to the Self type, unlike
`Trait$__extensions__::method:...`, which is what the symbol name used
to be for anything other than `impl Trait for foo::bar::Baz` (which
became, and still becomes, `Trait$Baz::method`).

10 years agosyntax: expand impl_pretty_name to handle more cases.
Huon Wilson [Wed, 1 Jan 2014 05:30:21 +0000 (16:30 +1100)]
syntax: expand impl_pretty_name to handle more cases.

The resulting symbol names aren't very pretty at all:

    trait Trait { fn method(&self); }
    impl<'a> Trait for ~[(&'a int, fn())] { fn method(&self) {} }

gives

    Trait$$UP$$VEC$$TUP_2$$BP$int$$FN$$::method::...hash...::v0.0

However, at least it contain some reference to the Self type, unlike
`Trait$__extensions__::method:...`, which is what the symbol name used
to be for anything other than `impl Trait for foo::bar::Baz` (which
became, and still becomes, `Trait$Baz::method`).

10 years agoauto merge of #11249 : brson/rust/no_rustdoc_ng, r=alexcrichton
bors [Wed, 1 Jan 2014 12:36:54 +0000 (04:36 -0800)]
auto merge of #11249 : brson/rust/no_rustdoc_ng, r=alexcrichton

10 years agoauto merge of #11247 : eddyb/rust/symbol-cleanup, r=alexcrichton
bors [Wed, 1 Jan 2014 10:51:53 +0000 (02:51 -0800)]
auto merge of #11247 : eddyb/rust/symbol-cleanup, r=alexcrichton

10 years agosyntax::codemap: Add static DUMMY_SP
klutzy [Wed, 1 Jan 2014 06:53:22 +0000 (15:53 +0900)]
syntax::codemap: Add static DUMMY_SP

It replaces `dummy_sp()`.

10 years agosyntax::diagnostic: Remove @ from Emitter
klutzy [Wed, 1 Jan 2014 06:23:41 +0000 (15:23 +0900)]
syntax::diagnostic: Remove @ from Emitter

10 years agosyntax::diagnostic: Remove unnecessary traits
klutzy [Tue, 31 Dec 2013 14:17:59 +0000 (23:17 +0900)]
syntax::diagnostic: Remove unnecessary traits

This removes trait `handler` and `span_handler`,
and renames `HandlerT` to `Handler`, `CodemapT` to `SpanHandler`.

10 years agorustc::driver: Remove two @s
klutzy [Fri, 27 Dec 2013 05:48:35 +0000 (14:48 +0900)]
rustc::driver: Remove two @s

10 years agoauto merge of #11244 : johnwalker/rust/issue-11239, r=brson
bors [Wed, 1 Jan 2014 09:02:27 +0000 (01:02 -0800)]
auto merge of #11244 : johnwalker/rust/issue-11239, r=brson

forward-to-word is undefined, and so Emacs would throw errors in
rust-align-to-expr-after-brace. This change yields the expected
behavior discussed in issue #11239 by handling the case when
whitespace follows a left bracket.

10 years agoauto merge of #11215 : alexcrichton/rust/metadata-filename, r=pcwalton
bors [Wed, 1 Jan 2014 06:26:55 +0000 (22:26 -0800)]
auto merge of #11215 : alexcrichton/rust/metadata-filename, r=pcwalton

Right now if you have concurrent builds of two libraries in the same directory
(such as rustc's bootstrapping process), it's possible that two libraries will
stomp over each others' metadata, producing corrupt rlibs.

By placing the metadata file in a tempdir we're guranteed to not conflict with
ay other builds happening concurrently. Normally this isn't a problem because
output filenames are scoped to the name of the crate, but metadata is special in
that it has the same name across all crates.

10 years agoauto merge of #11187 : alexcrichton/rust/once, r=brson
bors [Wed, 1 Jan 2014 04:41:56 +0000 (20:41 -0800)]
auto merge of #11187 : alexcrichton/rust/once, r=brson

Rationale can be found in the first commit, but this is basically the same thing as `pthread_once`

10 years agoConvert relevant static mutexes to Once
Alex Crichton [Sun, 29 Dec 2013 03:44:52 +0000 (19:44 -0800)]
Convert relevant static mutexes to Once

10 years agoauto merge of #11137 : g3xzh/rust/benchm, r=cmr
bors [Wed, 1 Jan 2014 02:32:19 +0000 (18:32 -0800)]
auto merge of #11137 : g3xzh/rust/benchm, r=cmr

Benchmark testing `is_ancestor_of` and `pop`

ref: https://github.com/mozilla/rust/issues/9694

10 years agoauto merge of #11186 : alexcrichton/rust/native-udp, r=brson
bors [Wed, 1 Jan 2014 00:21:55 +0000 (16:21 -0800)]
auto merge of #11186 : alexcrichton/rust/native-udp, r=brson

I personally do not have huge amounts of experience in this area, so there's likely a thing or two wrong around the edges. I tried to just copy what libuv is doing as closely as possible with a few tweaks in a few places, but all of the `std::io::net::udp` tests are now run in both native and green settings so the published functionality is all being tested.

10 years agoTruncate symbol hashes to 64 bits.
Eduard Burtescu [Tue, 31 Dec 2013 23:42:24 +0000 (01:42 +0200)]
Truncate symbol hashes to 64 bits.

10 years agoauto merge of #11173 : whitequark/rust/master, r=thestinger
bors [Tue, 31 Dec 2013 23:06:55 +0000 (15:06 -0800)]
auto merge of #11173 : whitequark/rust/master, r=thestinger

This PR adds `std::unsafe::intrinsics::{volatile_load,volatile_store}`, which map to LLVM's `load volatile` and `store volatile` operations correspondingly.

This would fix #11172.

I have addressed several uncertainties with this PR in the line comments.

10 years agoRemove references to rustdoc_ng
Brian Anderson [Tue, 31 Dec 2013 22:50:38 +0000 (14:50 -0800)]
Remove references to rustdoc_ng

10 years agoauto merge of #11157 : alexcrichton/rust/issue-11154, r=pcwalton
bors [Tue, 31 Dec 2013 21:52:03 +0000 (13:52 -0800)]
auto merge of #11157 : alexcrichton/rust/issue-11154, r=pcwalton

Closes #11154

10 years agoMark provided methods in dead-code pass
Kiet Tran [Tue, 31 Dec 2013 21:19:57 +0000 (16:19 -0500)]
Mark provided methods in dead-code pass

10 years agoConservatively export all trait methods and impls
Alex Crichton [Tue, 31 Dec 2013 20:40:10 +0000 (12:40 -0800)]
Conservatively export all trait methods and impls

The comments have more information as to why this is done, but the basic idea is
that finding an exported trait is actually a fairly difficult problem. The true
answer lies in whether a trait is ever referenced from another exported method,
and right now this kind of analysis doesn't exist, so the conservative answer of
"yes" is always returned to answer whether a trait is exported.

Closes #11224
Closes #11225

10 years agoauto merge of #11155 : SiegeLord/rust/early_deps, r=pcwalton
bors [Tue, 31 Dec 2013 20:37:17 +0000 (12:37 -0800)]
auto merge of #11155 : SiegeLord/rust/early_deps, r=pcwalton

The `--dep-info` command line option allows a nice way to generate make-style dependencies, but it currently does so alongside building of the output binary. This isn't a problem for make, as it mixes dependency graph generation and actual building, but it is problematic for other tools (e.g. CMake) which keep them separate.

To play more nicely with those tools, I've moved the --dep-info output from phase 6 (linking) up to after phase 2 (expansion of macros). Also, since there was no prior option to do so, I added a command line switch (`--no-analysis`) to stop compilation just before phase 3 (type-checking) which speeds this up even further.

Here's the beginning of a CMake function which is enabled by this change:

~~~cmake
function(get_rust_deps root_file out_var)
execute_process(COMMAND rustc ${RUSTC_FLAGS} --no-analysis --dep-info "${CMAKE_BINARY_DIR}/.deps" "${root_file}")

# Read and parse the dependency information
file(READ "${CMAKE_BINARY_DIR}/.deps" crate_deps)
file(REMOVE "${CMAKE_BINARY_DIR}/.deps")
# parsing follows...
~~~

10 years agoFix issue #11216 - Replace std::hashmap::{each_key, each_value} with iterators.
Gareth Smith [Tue, 31 Dec 2013 19:09:18 +0000 (19:09 +0000)]
Fix issue #11216 - Replace std::hashmap::{each_key, each_value} with iterators.

10 years agoAdd a --no-analysis command line switch
SiegeLord [Thu, 26 Dec 2013 22:39:36 +0000 (17:39 -0500)]
Add a --no-analysis command line switch

10 years agoGenerate --dep-info earlier in the compillation.
SiegeLord [Thu, 26 Dec 2013 19:55:10 +0000 (14:55 -0500)]
Generate --dep-info earlier in the compillation.

10 years agoDisallow LTO with a preference to dynamic linking
Alex Crichton [Fri, 27 Dec 2013 06:27:06 +0000 (22:27 -0800)]
Disallow LTO with a preference to dynamic linking

Closes #11154

10 years agoImplement native UDP I/O
Alex Crichton [Sun, 29 Dec 2013 00:40:15 +0000 (16:40 -0800)]
Implement native UDP I/O

10 years agoFix rust-align-to-expr-after-brace, closes #11239.
John Louis Walker [Tue, 31 Dec 2013 19:19:36 +0000 (14:19 -0500)]
Fix rust-align-to-expr-after-brace, closes #11239.

forward-to-word is undefined, and so Emacs would throw errors in
rust-align-to-expr-after-brace. This change yields the expected
behavior discussed in the issue.

10 years agoauto merge of #11208 : alexcrichton/rust/less-c, r=cmr
bors [Tue, 31 Dec 2013 17:51:50 +0000 (09:51 -0800)]
auto merge of #11208 : alexcrichton/rust/less-c, r=cmr

Right now on linux, an empty executable with LTO still depends on librt becaues
of the clock_gettime function in rust_builtin.o, but this commit moves this
dependency into a rust function which is subject to elimination via LTO.

At the same time, this also drops libstd's dependency on librt on unices that
are not OSX because the library is only used by extra::time (and now the
dependency is listed in that module instead).

10 years agoauto merge of #11236 : huonw/rust/sort-rust-log-help, r=sanxiyn
bors [Tue, 31 Dec 2013 16:36:52 +0000 (08:36 -0800)]
auto merge of #11236 : huonw/rust/sort-rust-log-help, r=sanxiyn

Fixes #8949.

10 years agostd: print RUST_LOG=::help in sorted order.
Huon Wilson [Tue, 31 Dec 2013 12:47:15 +0000 (23:47 +1100)]
std: print RUST_LOG=::help in sorted order.

Fixes #8949.

10 years agoUpdate documentation to remove reference to ::rt logging
a_m0d [Tue, 31 Dec 2013 12:25:53 +0000 (07:25 -0500)]
Update documentation to remove reference to ::rt logging

10 years agoauto merge of #11142 : alan-andrade/rust/improve_opts_example, r=cmr
bors [Tue, 31 Dec 2013 07:11:49 +0000 (23:11 -0800)]
auto merge of #11142 : alan-andrade/rust/improve_opts_example, r=cmr

Ran into this in practice, fixing it to improve example correctness.

10 years agoFix tests
Alan Andrade [Tue, 31 Dec 2013 06:51:11 +0000 (00:51 -0600)]
Fix tests

10 years agoauto merge of #11231 : brson/rust/rust_fail, r=alexcrichton
bors [Tue, 31 Dec 2013 04:46:49 +0000 (20:46 -0800)]
auto merge of #11231 : brson/rust/rust_fail, r=alexcrichton

Closes #11219

10 years agoRemove features from librustdoc
Alan Andrade [Thu, 26 Dec 2013 05:48:38 +0000 (23:48 -0600)]
Remove features from librustdoc

10 years agoAvoid compiler error about glob imports in getopts example
Alan Andrade [Thu, 26 Dec 2013 00:55:08 +0000 (18:55 -0600)]
Avoid compiler error about glob imports in getopts example

10 years agoauto merge of #11221 : vadimcn/rust/revert-manifest, r=alexcrichton
bors [Tue, 31 Dec 2013 02:56:54 +0000 (18:56 -0800)]
auto merge of #11221 : vadimcn/rust/revert-manifest, r=alexcrichton

In view of the problems outlined in #11207, I think manifest embedding should be removed, until we find a better solution.  :-(

10 years agoAdd rust_fail. #11219
Brian Anderson [Tue, 31 Dec 2013 02:43:03 +0000 (18:43 -0800)]
Add rust_fail. #11219

10 years agoImplement volatile_load and volatile_store intrinsics.
Peter Zotov [Sat, 28 Dec 2013 14:01:53 +0000 (18:01 +0400)]
Implement volatile_load and volatile_store intrinsics.

10 years agoConvert some C functions to rust functions
Alex Crichton [Mon, 30 Dec 2013 04:09:40 +0000 (20:09 -0800)]
Convert some C functions to rust functions

Right now on linux, an empty executable with LTO still depends on librt becaues
of the clock_gettime function in rust_builtin.o, but this commit moves this
dependency into a rust function which is subject to elimination via LTO.

At the same time, this also drops libstd's dependency on librt on unices that
are not OSX because the library is only used by extra::time (and now the
dependency is listed in that module instead).

10 years agoauto merge of #11125 : vmx/rust/rational, r=huonw
bors [Mon, 30 Dec 2013 22:31:57 +0000 (14:31 -0800)]
auto merge of #11125 : vmx/rust/rational, r=huonw

The Ratio::rational() converts a float (f32 and f64) into a
Ratio<BigInt>.

Closes #9838

10 years agoRevert "Embed Windows application manifest."
Vadim Chugunov [Mon, 30 Dec 2013 09:59:22 +0000 (01:59 -0800)]
Revert "Embed Windows application manifest."

10 years agoAdd more benchmark tests to path/posix
g3xzh [Wed, 25 Dec 2013 00:56:59 +0000 (02:56 +0200)]
Add more benchmark tests to path/posix

Benchmark testing `is_ancestor_of` and `path_relative_from`

10 years agoauto merge of #11199 : alexcrichton/rust/windows-isnt-waiting, r=pcwalton
bors [Mon, 30 Dec 2013 17:51:49 +0000 (09:51 -0800)]
auto merge of #11199 : alexcrichton/rust/windows-isnt-waiting, r=pcwalton

Turns out with an argument of 0 the function always returns immediately!

Closes #11003

10 years agoauto merge of #11194 : kballard/rust/gitignore-doc-green-native, r=alexcrichton
bors [Mon, 30 Dec 2013 16:36:48 +0000 (08:36 -0800)]
auto merge of #11194 : kballard/rust/gitignore-doc-green-native, r=alexcrichton

10 years agoAdd metadata from a tempdir instead of a build dir
Alex Crichton [Mon, 30 Dec 2013 16:19:04 +0000 (08:19 -0800)]
Add metadata from a tempdir instead of a build dir

Right now if you have concurrent builds of two libraries in the same directory
(such as rustc's bootstrapping process), it's possible that two libraries will
stomp over each others' metadata, producing corrupt rlibs.

By placing the metadata file in a tempdir we're guranteed to not conflict with
ay other builds happening concurrently. Normally this isn't a problem because
output filenames are scoped to the name of the crate, but metadata is special in
that it has the same name across all crates.

10 years agoImplement Ratio:from_float()
Volker Mische [Mon, 23 Dec 2013 01:22:26 +0000 (02:22 +0100)]
Implement Ratio:from_float()

The Ratio::from_float() converts a float (f32 and f64) into a
Ratio<BigInt>.

Closes #9838

10 years agoauto merge of #11190 : eliovir/rust/patch-3, r=alexcrichton
bors [Mon, 30 Dec 2013 15:16:48 +0000 (07:16 -0800)]
auto merge of #11190 : eliovir/rust/patch-3, r=alexcrichton

#[ author = "Jane Doe" ]; raises "warning: unknown crate attribute"
replace `pkgid` by `crate_id`
add `comment`

10 years agoauto merge of #11185 : huonw/rust/doc-ignore, r=cmr
bors [Mon, 30 Dec 2013 13:51:51 +0000 (05:51 -0800)]
auto merge of #11185 : huonw/rust/doc-ignore, r=cmr

Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.

10 years agoauto merge of #11182 : luisbg/rust/crateid, r=cmr
bors [Mon, 30 Dec 2013 12:32:09 +0000 (04:32 -0800)]
auto merge of #11182 : luisbg/rust/crateid, r=cmr

Issue #11048

10 years agoauto merge of #11169 : alexcrichton/rust/snapshots, r=sanxiyn
bors [Mon, 30 Dec 2013 11:11:56 +0000 (03:11 -0800)]
auto merge of #11169 : alexcrichton/rust/snapshots, r=sanxiyn

Hurray trait coercion!

10 years agoauto merge of #10885 : kballard/rust/as_mut_slice, r=cmr
bors [Mon, 30 Dec 2013 09:41:55 +0000 (01:41 -0800)]
auto merge of #10885 : kballard/rust/as_mut_slice, r=cmr

This method is primarily intended to allow for converting a [T, ..N] to
a &mut [T].

10 years agoauto merge of #11168 : sfackler/rust/de-at-extctxt, r=alexcrichton
bors [Mon, 30 Dec 2013 08:11:55 +0000 (00:11 -0800)]
auto merge of #11168 : sfackler/rust/de-at-extctxt, r=alexcrichton

* Pass `&ExtCtxt` instead of `@ExtCtxt`.
* Stop passing duplicate parameters around in `expand`.
* Make `ast_fold` methods take `&mut self`.

After these, it should be possible to remove the `@mut` boxes from `ExtCtxt` altogether, though #11167 is doing some of that so I'm holding off on that for now. This will probably conflict with that PR, so I'm guessing that one will have to be rebased on top of the other.

r? @pcwalton

10 years agoRemove @muts from ExtCtxt
Steven Fackler [Sun, 29 Dec 2013 05:35:38 +0000 (22:35 -0700)]
Remove @muts from ExtCtxt

10 years agoStart passing around &mut ExtCtxt
Steven Fackler [Sun, 29 Dec 2013 05:06:22 +0000 (22:06 -0700)]
Start passing around &mut ExtCtxt

10 years agoMake ast_fold take &mut self
Steven Fackler [Sat, 28 Dec 2013 03:34:51 +0000 (20:34 -0700)]
Make ast_fold take &mut self

10 years agorustdoc: Unify the handling of the hidden example lines.
Huon Wilson [Mon, 30 Dec 2013 05:31:24 +0000 (16:31 +1100)]
rustdoc: Unify the handling of the hidden example lines.

10 years agorustdoc: only filter lines starting with '# ' from the shown code.
Huon Wilson [Sat, 28 Dec 2013 23:54:56 +0000 (10:54 +1100)]
rustdoc: only filter lines starting with '# ' from the shown code.

Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.

10 years agoauto merge of #11181 : luqmana/rust/up-llvm, r=alexcrichton
bors [Mon, 30 Dec 2013 05:51:56 +0000 (21:51 -0800)]
auto merge of #11181 : luqmana/rust/up-llvm, r=alexcrichton

No longer need to handle GNUEABIHF and hard floats since LLVM should now choose the right default. Fixes #11164.

10 years agoUpdate llvm.
Luqman Aden [Fri, 27 Dec 2013 20:31:49 +0000 (15:31 -0500)]
Update llvm.

10 years agoauto merge of #11204 : alexcrichton/rust/issue-11200, r=cmr
bors [Mon, 30 Dec 2013 02:46:57 +0000 (18:46 -0800)]
auto merge of #11204 : alexcrichton/rust/issue-11200, r=cmr

Turns out when you grab an OS mutex, you need to be careful about when and where
things are scheduled!

I've confirmed that I could fairly reliably get a deadlock (1 in 100 times ish) before this, and I cannot get a deadlock after this (after 1000+ runs).

Closes #11200

10 years agoFix a deadlock in a libgreen test
Alex Crichton [Mon, 30 Dec 2013 01:34:15 +0000 (17:34 -0800)]
Fix a deadlock in a libgreen test

Turns out when you grab an OS mutex, you need to be careful about when and where
things are scheduled!

10 years agoActually block in a windows cvar
Alex Crichton [Sun, 29 Dec 2013 23:23:15 +0000 (15:23 -0800)]
Actually block in a windows cvar

Turns out with an argument of 0 the function always returns immediately!

Closes #11003

10 years agoRegister new snapshots.
Alex Crichton [Sun, 29 Dec 2013 22:06:34 +0000 (14:06 -0800)]
Register new snapshots.

10 years agoUpdate Docs to use crateid
Luis de Bethencourt [Sat, 28 Dec 2013 20:27:22 +0000 (15:27 -0500)]
Update Docs to use crateid

10 years agoRename uses of PkgId to CrateId in librustpkg
Luis de Bethencourt [Sat, 28 Dec 2013 20:24:15 +0000 (15:24 -0500)]
Rename uses of PkgId to CrateId in librustpkg

10 years agoRename PkgId to CrateId
Luis de Bethencourt [Sat, 28 Dec 2013 17:16:48 +0000 (12:16 -0500)]
Rename PkgId to CrateId

10 years agoRename pkgid variables
Luis de Bethencourt [Sat, 28 Dec 2013 00:14:01 +0000 (19:14 -0500)]
Rename pkgid variables

10 years agoAdd /doc/{rustc,syntax} to .gitignore
Kevin Ballard [Sun, 29 Dec 2013 19:30:34 +0000 (14:30 -0500)]
Add /doc/{rustc,syntax} to .gitignore

10 years agoAdd method .as_mut_slice() to MutableVector
Kevin Ballard [Mon, 9 Dec 2013 22:45:53 +0000 (14:45 -0800)]
Add method .as_mut_slice() to MutableVector

This method is primarily intended to allow for converting a [T, ..N] to
a &mut [T].

10 years agoAdd /doc/{green,native} to .gitignore
Kevin Ballard [Sun, 29 Dec 2013 18:24:48 +0000 (13:24 -0500)]
Add /doc/{green,native} to .gitignore

10 years agoauto merge of #11134 : lucab/rust/lucab/libstd-doc, r=cmr
bors [Sun, 29 Dec 2013 16:22:04 +0000 (08:22 -0800)]
auto merge of #11134 : lucab/rust/lucab/libstd-doc, r=cmr

Uniform the short title of modules provided by libstd, in order to make their roles more explicit when glancing at the index.

10 years agorust.md : update crate attributes.
eliovir [Sun, 29 Dec 2013 11:37:51 +0000 (12:37 +0100)]
rust.md : update crate attributes.

#[ author = "Jane Doe" ]; raises "warning: unknown crate attribute"

10 years agoauto merge of #11177 : cmr/rust/native_and_green_docs, r=alexcrichton
bors [Sun, 29 Dec 2013 05:36:59 +0000 (21:36 -0800)]
auto merge of #11177 : cmr/rust/native_and_green_docs, r=alexcrichton

Some people have requested this, and I think it's quite useful to have
documentation for the compiler libraries. libnative and libgreen are
self-explanatory I think.

10 years agoFix rustdoc bug involving PatLit
Corey Richardson [Sun, 29 Dec 2013 05:13:29 +0000 (00:13 -0500)]
Fix rustdoc bug involving PatLit

10 years agoAdd a compiler-docs target
Corey Richardson [Sun, 29 Dec 2013 05:13:19 +0000 (00:13 -0500)]
Add a compiler-docs target

10 years agoStop passing duplicate parameters in expand
Steven Fackler [Sat, 28 Dec 2013 00:43:01 +0000 (17:43 -0700)]
Stop passing duplicate parameters in expand

10 years agoRemove unecessary extern "Rust" specifiers
Steven Fackler [Sat, 28 Dec 2013 00:21:15 +0000 (17:21 -0700)]
Remove unecessary extern "Rust" specifiers

10 years agoStop using @ExtCtxt
Steven Fackler [Sat, 28 Dec 2013 00:17:36 +0000 (17:17 -0700)]
Stop using @ExtCtxt

10 years agoImplement a Once primitive for initialization
Alex Crichton [Sun, 29 Dec 2013 03:32:16 +0000 (19:32 -0800)]
Implement a Once primitive for initialization

Of the 8 static mutexes that are currently in-use by the compiler and its
libraries, 4 of them are currently used for one-time initialization. The
unforunate side effect of using a static mutex is that the mutex is leaked.

This primitive should provide the basis for efficiently keeping track of
one-time initialization as well as ensuring that it does not leak the internal
mutex that is used.

I have chosen to put this in libstd because libstd is currently making use of a
static initialization mutex (rt::local_ptr), but I can also see a more refined
version of this type being suitable to initialize FFI bindings (such as
initializing LLVM and initializing winsock networking on windows). I also intend
on adding "helper threads" to libnative, and those will greatly benefit from a
simple "once" primitive rather than always reinventing the wheel by using
mutexes and bools.

I would much rather see this primitive built on a mutex that blocks green
threads appropriately, but that does not exist at this time, so it does not
belong outside of `std::unstable`.

10 years agoauto merge of #11180 : alexcrichton/rust/fix-deferred-send, r=cmr
bors [Sun, 29 Dec 2013 03:06:57 +0000 (19:06 -0800)]
auto merge of #11180 : alexcrichton/rust/fix-deferred-send, r=cmr

I forgot to add this back in after I removed can_resched and then realized I had
to add it back.

10 years agoauto merge of #11179 : alexcrichton/rust/update-gyp, r=cmr
bors [Sun, 29 Dec 2013 01:37:06 +0000 (17:37 -0800)]
auto merge of #11179 : alexcrichton/rust/update-gyp, r=cmr

Closes #11152

10 years agoauto merge of #11150 : huonw/rust/moar-docs, r=alexcrichton
bors [Sun, 29 Dec 2013 00:06:59 +0000 (16:06 -0800)]
auto merge of #11150 : huonw/rust/moar-docs, r=alexcrichton

(I removed the `fn main` from the `std::rand` examples to make it consistent with the rest of the codebase.)