Commit Graph

25027 Commits

Author SHA1 Message Date
Carl-Anton Ingmarsson
1749d61125 libstd: Always inline all byteswap functions 2014-01-02 23:22:47 +01:00
Carl-Anton Ingmarsson
3250e65500 libextra: Add benchmarks for ebml::reader::vuint_at() 2014-01-02 23:22:47 +01:00
bors
0df9b850ac auto merge of #10696 : fhahn/rust/issue9543-remove-extern-mod-foo, r=pcwalton
This patch for  #9543 throws an `obsolete syntax` error for `extern mod foo (name="bar")` . 
I was wondering if [this](https://github.com/fhahn/rust/compare/mozilla:master...fhahn:issue9543-remove-extern-mod-foo?expand=1#diff-da9d34ca1d0f6beee2838cf02e07345cR4444) is the correct place to do this?

I think the wording of the error message could probably be improved as well.

If this approach is OK, I'm going to run the whole test suite tomorrow and update the old syntax to the new one.
2014-01-02 11:32:09 -08:00
bors
c29b1be5ed auto merge of #11266 : lyuts/rust/opensuse_build, r=brson
Minor change for configuration script allows to build rust on openSUSE with using llvm installed from repos.
2014-01-02 10:16:50 -08:00
bors
3249de8c4f auto merge of #11274 : michaelwoerister/rust/issue11083, r=pcwalton
This pull request fixes #11083. The problem was that recursive type definitions were not properly handled for enum types, leading to problems with LLVM's metadata "uniquing". This bug has already been fixed for struct types some time ago (#9658) but I seem to have forgotten about enums back then. I added the offending code from issue #11083 as a test case.
2014-01-02 09:02:01 -08:00
Florian Hahn
4cb13ed982 Inject std libs with versions 2014-01-02 16:05:09 +01:00
Michael Woerister
645bb327db debuginfo: Add test case for recursive enum types (issue #11083) 2014-01-02 15:38:57 +01:00
Michael Woerister
6d20876c3f debuginfo: Fix issue #11083 and some minor clean up. 2014-01-02 15:20:43 +01:00
bors
ff578b7c83 auto merge of #11269 : am0d/rust/lint_typo, r=sanxiyn 2014-01-02 03:32:02 -08:00
bors
bbdf645811 auto merge of #11268 : lkuper/rust/trans-comment, r=pcwalton 2014-01-02 02:11:48 -08:00
bors
ee634e3ac4 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.
2014-01-02 00:51:51 -08:00
bors
e34b1eacce auto merge of #11248 : brson/rust/0.9relnotes, r=alexcrichton 2014-01-01 23:32:07 -08:00
bors
8ba61514c9 auto merge of #11246 : ktt3ja/rust/issue-11224, r=alexcrichton
Close #11224
2014-01-01 22:12:11 -08:00
bors
a96951048c auto merge of #11245 : alexcrichton/rust/issue-11225, r=pcwalton
Commit messages are a little more descriptive.
2014-01-01 20:56:54 -08:00
a_m0d
65baedfa1f Fix typo in lint description. 2014-01-01 23:50:11 -05:00
Lindsey Kuper
99dbb1d51f Fix comment that's been wrong since ancient times (thanks, @jvns). 2014-01-01 23:02:02 -05:00
bors
b3b49d9873 auto merge of #11184 : jhasse/rust/patch-col, r=huonw 2014-01-01 19:41:55 -08:00
Jan Niklas Hasse
86835c95f4 Test column offset for #11184 2014-01-02 03:34:07 +01:00
bors
647525545b 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.
2014-01-01 18:26:57 -08:00
bors
1b14a9393a auto merge of #11242 : Dretch/rust/hashmap-key-value-iterators, r=pcwalton 2014-01-01 17:11:57 -08:00
Jan Niklas Hasse
3d43543c21 Output columns 1-based. Fixes #10848 2014-01-02 02:07:21 +01:00
lyuts
172207487b Recognize LLVM 3.4 when building on opensuse with --llvm-root specified. 2014-01-01 16:46:29 -08:00
Florian Hahn
f42a36cded Remove extern mod foo (name="bar") syntax, closes #9543 2014-01-01 23:36:57 +01:00
Carl-Anton Ingmarsson
1c3c0103c4 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.
2014-01-01 22:27:49 +01:00
Carl-Anton Ingmarsson
19d8ab8d5a libnative: Use [from|to]_be16 instead of bswap16 2014-01-01 22:27:49 +01:00
Carl-Anton Ingmarsson
3abc633658 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].
2014-01-01 22:27:42 +01:00
bors
48918fab72 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).
2014-01-01 13:21:48 -08:00
Alex Crichton
3f11f87382 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).
2014-01-01 13:08:09 -08:00
Alex Crichton
aca1749493 Don't leave lingering files in doc tests
Closes #11234
2014-01-01 13:06:44 -08:00
Brian Anderson
14a01b149a Update RELEASES.txt for 0.9 2014-01-01 12:00:49 -08:00
bors
c34ef5d7e4 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.
2014-01-01 11:06:51 -08:00
bors
51ace54597 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`).
2014-01-01 07:56:49 -08:00
Huon Wilson
8f26d0b9b8 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`).
2014-01-02 02:53:54 +11:00
bors
2897549d51 auto merge of #11249 : brson/rust/no_rustdoc_ng, r=alexcrichton 2014-01-01 04:36:54 -08:00
bors
736f5a8ea8 auto merge of #11247 : eddyb/rust/symbol-cleanup, r=alexcrichton 2014-01-01 02:51:53 -08:00
klutzy
9cdad685a3 syntax::codemap: Add static DUMMY_SP
It replaces `dummy_sp()`.
2014-01-01 19:51:35 +09:00
klutzy
db204b20ab syntax::diagnostic: Remove @ from Emitter 2014-01-01 19:10:43 +09:00
klutzy
fe10c63326 syntax::diagnostic: Remove unnecessary traits
This removes trait `handler` and `span_handler`,
and renames `HandlerT` to `Handler`, `CodemapT` to `SpanHandler`.
2014-01-01 19:10:43 +09:00
klutzy
a52cdfdfce rustc::driver: Remove two @s 2014-01-01 19:10:43 +09:00
bors
7fc4df366f 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.
2014-01-01 01:02:27 -08:00
bors
03b510297c 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.
2013-12-31 22:26:55 -08:00
bors
e61937a6bf 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`
2013-12-31 20:41:56 -08:00
Alex Crichton
c22fed9424 Convert relevant static mutexes to Once 2013-12-31 20:15:03 -08:00
bors
02cec05c55 auto merge of #11137 : g3xzh/rust/benchm, r=cmr
Benchmark testing `is_ancestor_of` and `pop`

ref: https://github.com/mozilla/rust/issues/9694
2013-12-31 18:32:19 -08:00
bors
09a561ac9c 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.
2013-12-31 16:21:55 -08:00
Eduard Burtescu
4e752651f4 Truncate symbol hashes to 64 bits. 2014-01-01 01:42:24 +02:00
bors
1dcc986d52 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.
2013-12-31 15:06:55 -08:00
Brian Anderson
14f59e8902 Remove references to rustdoc_ng 2013-12-31 14:50:38 -08:00
bors
bd52e6acc6 auto merge of #11157 : alexcrichton/rust/issue-11154, r=pcwalton
Closes #11154
2013-12-31 13:52:03 -08:00
Kiet Tran
576a85105f Mark provided methods in dead-code pass 2013-12-31 16:19:57 -05:00