Commit Graph

20059 Commits

Author SHA1 Message Date
Graydon Hoare
cdce33a421 Add configure and make machinery to activate perf metrics and ratchets. 2013-07-16 09:33:54 -07:00
Graydon Hoare
bc4c89c10a compiletest: Add support for metrics and ratchet modes. 2013-07-16 09:33:54 -07:00
Graydon Hoare
f2f7fb3ae1 extra: Add metrics functions to test. 2013-07-16 09:33:54 -07:00
Graydon Hoare
77823c907b extra: add tests for test::MetricMap, MetricDiff, ratchet. 2013-07-16 09:33:54 -07:00
bors
274e7a4e49 auto merge of #7816 : thestinger/rust/header, r=huonw
Note that the headers are still on `~[T]` when `T` is managed. This is continued from #7605, which removed all the code relying on the headers and removed them from `~T` for non-managed `T`.
2013-07-15 21:01:20 -07:00
Daniel Micay
e118555ce6 remove headers from unique vectors 2013-07-15 23:57:27 -04:00
bors
47ba4583db auto merge of #7815 : blake2-ppc/rust/hashmap-iterators, r=huonw
Implement set difference, sym. difference, intersection and union using Iterators.

The set methods are left since they are part of the Set trait. A grep over the tree indicates that the four hashset operations have no users at all.

Also remove HashMap::mutate_values since it is unused, replaced by .mut_iter(), and not part of a trait.
2013-07-15 19:19:21 -07:00
blake2-ppc
750f32dbb5 hashmap: Iterators for hashset diff, sym. diff, intersec, union
Implement the difference, union, etc iterators with the help of a custom
iterator combinator with explicit closure environment. Reported issue #7814
to be able to use the std::iterator filter combinator.
2013-07-16 04:09:41 +02:00
blake2-ppc
cf4127f503 hashmap: Remove .mutate_values() which is replaced by .mut_iter() 2013-07-16 03:55:52 +02:00
bors
98c16549cb auto merge of #7808 : blake2-ppc/rust/ringbuf, r=thestinger 2013-07-15 17:04:20 -07:00
blake2-ppc
3385e795c5 ringbuf: Implement DoubleEndedIterator 2013-07-16 01:13:26 +02:00
bors
e844b524ed auto merge of #7806 : apasel422/rust/hash_consume, r=catamorphism
This partially addresses #7719.
2013-07-15 15:22:19 -07:00
Andrew Paseltiner
faa280cee6 std: add consuming iterators for HashMap and HashSet 2013-07-15 17:32:53 -04:00
bors
04f9ce0ae3 auto merge of #7681 : catamorphism/rust/rustpkg-local-repos, r=catamorphism
r? @graydon rustpkg can now build code from a local git repository. In the
case where the local repo is in a directory not in the RUST_PATH,
it checks out the repository into a directory in the first workspace
in the RUST_PATH.

The tests no longer try to connect to github.com, which should
solve some of the sporadic failures we've been seeing.
2013-07-15 13:40:21 -07:00
Tim Chevalier
0fa9ad8673 rustpkg: Handle local git repositories
rustpkg can now build code from a local git repository. In the
case where the local repo is in a directory not in the RUST_PATH,
it checks out the repository into a directory in the first workspace
in the RUST_PATH.

The tests no longer try to connect to github.com, which should
solve some of the sporadic failures we've been seeing.
2013-07-15 12:59:48 -07:00
bors
9d7e01bb39 auto merge of #7802 : catamorphism/rust/issue-6128, r=catamorphism 2013-07-15 11:16:25 -07:00
Tim Chevalier
600e40f503 testsuite: Add xfailed test case for #6128 2013-07-15 11:12:56 -07:00
bors
9c22f65870 auto merge of #7799 : blake2-ppc/rust/eq-default, r=sanxiyn
Let Eq::ne be implemented to the inverse of eq by default.
2013-07-15 05:01:19 -07:00
blake2-ppc
6999b5332f cmp: Use default methods in trait Eq, require only Eq::eq 2013-07-15 13:24:35 +02:00
bors
60d5bb9413 auto merge of #7796 : thomaslee/rust/issue-6247, r=z0w0
This closes #6247 by simply ensuring librustllvm.so gets installed to the target lib directory in addition to the host lib directory.
2013-07-14 23:40:19 -07:00
bors
fd80291cdc auto merge of #7795 : sp3d/rust/master, r=z0w0
This should be pretty self-explanatory. The most important component is region/lifetime annotation highlighting, as previously they were interpreted as character literals and would ruin the rest of the line. The attribute regex is fairly crude, but it gets the job done and there's not much within attributes that would benefit from individual highlighting, so fancier handling didn't seem worth the trouble.

The ident regex was copied from the vim highlighter.
2013-07-14 21:58:19 -07:00
Tom Lee
27435c081f Install librustllvm.so to target lib directory 2013-07-14 21:53:47 -07:00
sp3d
9adad222a6 add regions, unicode idents, attributes to GtkSourceView language-spec 2013-07-14 23:44:55 -05:00
bors
db438ad786 auto merge of #7792 : ozten/rust/master, r=huonw
Minor tweak, but I was confused when first digging into json.rs docs.

I think it's clearer to say the module provides parsing and serialization.
2013-07-14 18:58:19 -07:00
Austin King
b7e4b88c4a Noting that json.rs provides parsing as well 2013-07-14 18:26:45 -07:00
bors
68a32aad1a auto merge of #7716 : kballard/rust/term-attr, r=cmr
Teach `extra::term` to support more terminal attributes than just color.

Fix the compiler diagnostic messages to print in bold instead of bright white. This matches Clang's output.

Cache the term::Terminal instead of re-parsing for every diagnostic (fixes #6827).
2013-07-14 15:55:20 -07:00
Kevin Ballard
1d4c3146f5 Don't re-parse terminfo (twice!) on every compiler diagnostic
Stuff the term::Terminal into TLS to avoid re-parsing for every single
message we want to color.

Fixes #6827.
2013-07-14 15:01:50 -07:00
Kevin Ballard
69da380844 Highlight rustc's warnings/errors in bold instead of bright white
Clang actually highlights using bold, not using bright white. Match
clang on this so our diagnostics are still readable on terminals with a
white background.
2013-07-14 14:37:29 -07:00
Kevin Ballard
690495de03 term: Add new function .attr() to toggle terminal attributes
Also add .supports_attr() to test for attribute support without writing
anything to output.

Update .reset() to use sgr0 instead of op.
2013-07-14 14:37:29 -07:00
Kevin Ballard
7d8a0fdb7d Give term.fg() and term.bg() a bool return value 2013-07-14 14:37:29 -07:00
bors
4f333023e9 auto merge of #7790 : blake2-ppc/rust/dlist-ringbuf-small-changes, r=thestinger
Implement size_hint for the ringbuf iterators.

Do small cleanups in dlist, use Option's .map and .map_mut properly, and put inline on all the small methods.
2013-07-14 14:13:21 -07:00
blake2-ppc
961184f852 dlist: Use inline on very small functions and iterator functions 2013-07-14 23:03:54 +02:00
blake2-ppc
7681cf62e3 dlist: Simplify by using Option::{map, map_mut}
These methods were fixed or just added so they can now be used.
2013-07-14 22:59:15 +02:00
blake2-ppc
9ccf443088 ringbuf: Implement .size_hint() for iterators 2013-07-14 22:30:22 +02:00
bors
0cb1ac0f9f auto merge of #7788 : MarkJr94/rust/from_iter, r=cmr
Added Iterators for HashMap/Set, TreeMap/Set, TrieMap/Set, and PriorityQueue as per Issue #7626
2013-07-14 12:01:22 -07:00
bors
1c35ab322f auto merge of #7751 : alexcrichton/rust/finish-tls, r=pcwalton
This changes the interface to `get`, and it also changes the keys to be static slices instead of static functions.

This allows the removal of the `unsafe` interface because while functions can monomorphize from different types to the same actual function, static slices cannot do this.

From at least what I can tell, we don't need to worry about LLVM coalescing these addresses. If we ever use the `unnamed_addr` it looks like there's cause for worry, but there doesn't appear to be any coalescing atm.
2013-07-14 10:19:21 -07:00
=Mark Sinclair
bbe03da9c6 Stripped trailing spaces; Implemented FromIterator for TreeMap and PriorityQueue 2013-07-14 13:18:50 -04:00
Alex Crichton
9fd2ac7428 Make TLS keys actually take up space
If the TLS key is 0-sized, then the linux linker is apparently smart enough to
put everything at the same pointer. OSX on the other hand, will reserve some
space for all of them. To get around this, the TLS key now actuall consumes
space to ensure that it gets a unique pointer
2013-07-14 10:15:07 -07:00
Alex Crichton
e3211fa1f1 Purge the last remnants of the old TLS api
Closes #3273
2013-07-14 09:29:12 -07:00
Alex Crichton
242606c793 Clean up various warnings throughout the codebase 2013-07-14 09:29:12 -07:00
Alex Crichton
23fbe936bf Allow non-uppercase-statics by default
I think of this as a stylistic opinion which shouldn't necessarily be enforced
by default on all users of rust, but that's just my opinion.
2013-07-14 09:29:12 -07:00
=Mark Sinclair
bb6615d43a Implemented FromIterator for TrieMap and TrieSet 2013-07-14 12:20:48 -04:00
=Mark Sinclair
4ff7ef434f Implemented FromIterator for std::hashmap 2013-07-14 11:26:03 -04:00
bors
66e2857253 auto merge of #7781 : dotdash/rust/glue, r=huonw
We used to have concrete types in glue functions, but the way we used
to implement that broke inlining of those functions. To fix that, we
converted all glue to just take an i8* and always casted to that type.

The problem with the old implementation was that we made a wrong
assumption about the glue functions, taking it for granted that they
always take an i8*, because that's the function type expected by the
TyDesc fields. Therefore, we always ended up with some kind of cast.

But actually, we can initially have the glue with concrete types and
only cast the functions to the generic type once we actually emit the
TyDesc data.

That means that for glue calls that can be statically resolved, we don't
need any casts, unless the glue uses a simplified type. In that case we
cast the argument. And for glue calls that are resolved at runtime, we
cast the argument to i8*, because that's what the glue function in the
TyDesc expects.

Since most of out glue calls are static, this saves a lot of bitcasts.
The size of the unoptimized librustc.ll goes down by 240k lines.
2013-07-14 05:55:22 -07:00
bors
51cb98443c auto merge of #7779 : kballard/rust/print-macro-args, r=alexcrichton
The new names make it obvious that these generate formatted output.

Add a one-argument case that uses %? to format, just like the other
format-using macros (e.g. info!()).
2013-07-14 04:13:24 -07:00
bors
c3e3090ac2 auto merge of #7778 : tedhorst/rust/manuninstall, r=cmr
The new man pages: rust.1, rustdoc.1, rusti.1, and rustpkg.1 were not being removed with make uninstall.
2013-07-14 02:31:26 -07:00
bors
0ef837519d auto merge of #7768 : sfackler/rust/containers, r=huonw
See #4989. I didn't add Persistent{Set,Map} since the only
persistent data structure is fun_treemap and its functionality is
currently too limited to build a trait out of.
2013-07-14 00:49:29 -07:00
bors
247ad4515d auto merge of #7769 : alexcrichton/rust/issue-7732-fix-rusti-again, r=cmr
Turns out this was a more subtle bug than I originally thought. My analysis can be found in #7732, but I also tried to put descriptive info into the comments.

Closes #7732
2013-07-13 23:07:31 -07:00
Alex Crichton
21d7098427 Fix running code via '-Z jit' 2013-07-13 21:25:17 -07:00
Alex Crichton
6148c1c0c5 When running rusti, consume the JIT contexts and collect them in the parent task 2013-07-13 21:25:17 -07:00