Commit Graph

25555 Commits

Author SHA1 Message Date
bors
983f307e12 auto merge of #11348 : alexcrichton/rust/snapshots, r=brson 2014-01-07 07:11:36 -08:00
bors
5f39d64f21 auto merge of #11342 : huonw/rust/trie-mut, r=alexcrichton
- Add `mut_iter`, `mut_lower_bound`, `mut_upper_bound`
- Remove some internal iterators
- Add benchmarks
- Improve performance of `{mut_,}{lower,upper}_bound`
- Minor clean-up of `extra::treemap` after I realised I wasn't exploiting macros to their full DRY potential.
2014-01-07 05:56:36 -08:00
Huon Wilson
167d533fe0 extra::treemap: use the dummy-macro trick with items to make the
iterator macro properly hygiene.

Requires less repetition of `mut` or not too.
2014-01-08 00:31:24 +11:00
Huon Wilson
7e446af759 std::trie: make lower_bound and upper_bound about 15% faster.
I believe this is mainly due to code-size reduction.

Before:

    test [...]::bench_lower_bound ... bench:       818 ns/iter (+/- 100)
    test [...]::bench_upper_bound ... bench:       939 ns/iter (+/- 34)

After:

    test [...]::bench_lower_bound ... bench:       698 ns/iter (+/- 60)
    test [...]::bench_upper_bound ... bench:       817 ns/iter (+/- 20)
2014-01-08 00:31:24 +11:00
Huon Wilson
3395f9d6a1 std::trie: Add some iteration/search benchmarks. 2014-01-08 00:31:24 +11:00
Huon Wilson
fe03caedf0 std::trie: use macros to share code between the iterator implementations. 2014-01-08 00:31:24 +11:00
Huon Wilson
f07c74d93a std::trie: remove some obsolete internal iterators. 2014-01-08 00:31:24 +11:00
Huon Wilson
a0643ee9ae std::trie: add an mutable-values iterator. 2014-01-08 00:31:23 +11:00
bors
ba6ed004b0 auto merge of #11347 : alexcrichton/rust/issue-11346, r=brson
This ends up causing weird errors like those seen in #11346

Closes #11346
2014-01-07 04:41:39 -08:00
bors
bc395bc71e auto merge of #11329 : fhahn/rust/unused-cast-lint2, r=alexcrichton
Updates as mentioned in #11135
2014-01-07 01:51:39 -08:00
bors
777f1e8d24 auto merge of #11355 : alexcrichton/rust/read-waits-forever, r=brson
All the fun is down below.
2014-01-06 23:36:46 -08:00
Alex Crichton
89f8bc2561 Fix parallel makefile builds
All the copying of files amongst one another was apparently causing something to
get corrupted. Instead of having files fly around, just update the directories
to link to.
2014-01-06 21:55:15 -08:00
bors
07950e740c auto merge of #11296 : brson/rust/anti-cond, r=alexcrichton
In preparation for removing conditions.
2014-01-06 21:51:38 -08:00
Huon Wilson
65ce505819 std::rt: require known stack bounds for all tasks.
We just approximate with a 1 or 2 MB stack for native::start.
2014-01-07 15:14:55 +11:00
bors
5efac2bee1 auto merge of #11356 : brson/rust/0.9relnotes, r=alexcrichton 2014-01-06 19:41:42 -08:00
Brian Anderson
280553c988 doc: Fix tests in pointer guide 2014-01-06 19:37:27 -08:00
Steve Klabnik
6f09d80f97 Add Pointer tutorial, rename borrowed pointer tutorial. 2014-01-06 19:37:26 -08:00
Brian Anderson
d4639ade00 doc: Update style of index, organization and trim out some excess. 2014-01-06 19:37:11 -08:00
Nif Ward
20ccfdecd4 Added in Clone/TotalEq/TotalOrd/ToStr traits to all parts of btree.
Equals is now compact and uses vec's equals method.  Cmp compares
all elements on branches and leaves (Nodes).
2014-01-06 21:19:36 -05:00
Brian Anderson
f5ee07792e mk: Fix formatting of docs.mk 2014-01-06 17:24:16 -08:00
Alex Crichton
03e91573c7 Don't read forever on a file descriptor
Similarly to the recent commit to do this for networking, there's no reason that
a read on a file descriptor should continue reading until the entire buffer is
full. This makes sense when dealing with literal files, but when dealing with
things like stdin this doesn't make sense.
2014-01-06 16:32:51 -08:00
bors
b6602cb74b auto merge of #11354 : brson/rust/versionwin, r=alexcrichton
The makefiles and the windows installer disagree on the name of this file. In practical terms this change only means that the '-pre' installers will be named 'rust-0.9-pre-install.exe' instead 'rust-0.9-install.exe'.
2014-01-06 16:31:52 -08:00
Brian Anderson
f28aa662d2 Update AUTHORS.txt 2014-01-06 15:01:34 -08:00
Brian Anderson
79def2ca69 More 0.9 release notes 2014-01-06 14:52:16 -08:00
bors
1f1838ea3e auto merge of #11123 : alan-andrade/rust/move_wiki_to_internal_docs, r=brson
This is not done yet but I'm posting it to get feedback.

The wiki has a ton of different tutorials/manuals/faq and so forth. Instead of migrating all of them right now, I just migrated the following:

* The general main wiki page
* Language FAQ
* Project FAQ

If this feels reasonable, please comment so that I can continue with confidence.
2014-01-06 14:26:38 -08:00
Brian Anderson
21f9fa4850 Delete the installer exe when cleaning 2014-01-06 14:18:35 -08:00
Brian Anderson
2297b08009 Use the full version string for the windows installer exe 2014-01-06 14:02:35 -08:00
Alan Andrade
7de2379013 rust_version.html is a HTML_DEPS and every html has it as dependecy 2014-01-06 15:38:20 -06:00
Alan Andrade
e53b5661a7 First phase of migrating the wiki to the internal docs #11078 2014-01-06 15:27:49 -06:00
Alex Crichton
ac2a24ecc9 Support arbitrary stdout/stderr/logger handles
This will allow capturing of common things like logging messages, stdout prints
(using stdio println), and failure messages (printed to stderr).  Any new prints
added to libstd should be funneled through these task handles to allow capture
as well.

Additionally, this commit redirects logging back through a `Logger` trait so the
log level can be usefully consumed by an arbitrary logger.

This commit also introduces methods to set the task-local stdout handles:

* std::io::stdio::set_stdout
* std::io::stdio::set_stderr
* std::io::logging::set_logger

These methods all return the previous logger just in case it needs to be used
for inspection.

I plan on using this infrastructure for extra::test soon, but we don't quite
have the primitives that I'd like to use for it, so it doesn't migrate
extra::test at this time.

Closes #6369
2014-01-06 13:19:53 -08:00
bors
400070ae55 auto merge of #10826 : SimonSapin/rust/str-insert, r=brson
I could not run the tests because of unrelated building issue, sorry about that.
2014-01-06 13:11:38 -08:00
Florian Hahn
8236550104 Remove some unnecessary type casts
Conflicts:
	src/librustc/middle/lint.rs
2014-01-06 21:28:54 +01:00
Florian Hahn
6be2bc817b Add lint for unnecessary casts 2014-01-06 21:28:49 +01:00
bors
3afa0b97c4 auto merge of #11335 : rlane/rust/fix-vector-doc, r=alexcrichton 2014-01-06 11:56:37 -08:00
bors
0da105a8b7 auto merge of #11334 : alexcrichton/rust/fix-native-tcp, r=pcwalton
libnative erroneously would attempt to fill the entire buffer in a call to
`read` before returning, when rather it should return immediately because
there's not guaranteed to be any data that will ever be received again.

Close #11328
2014-01-06 10:31:46 -08:00
Mick Koch
5464d48e90 Fix formatting of some code blocks in pdf docs
Code blocks apparently need to be surrounded by whitespace to be output
correctly when generating pdfs
2014-01-06 12:56:41 -05:00
Alex Crichton
6b2a6cb3fe Register new snapshots 2014-01-06 09:26:47 -08:00
Alex Crichton
b7e58ce554 Don't attempt duplicate outputs
This ends up causing weird errors like those seen in #11346

Closes #11346
2014-01-06 09:23:24 -08:00
bors
8b71b6415d auto merge of #11333 : cmr/rust/triage2, r=alexcrichton 2014-01-06 08:41:45 -08:00
bors
bae091e517 auto merge of #11332 : sfackler/rust/de-at-se, r=huonw
This is necessary for #11151 to make sure dtors run before the libraries
are unloaded.
2014-01-06 07:26:48 -08:00
bors
55bb5e584c auto merge of #11327 : nielsle/rust/rustpkg_argparse, r=alexcrichton
Rearrange some code in rustpkg:

* Move command line argument parsing to  parse_args.rs
* Introduce an enum to descibe commands such as Build, Install, and Clean.
* Move sysroot from Context to BuildContext, to make parse_args  more modular.

This is my first pull request, so please tell me if there is anything I need to do.
2014-01-06 05:56:52 -08:00
bors
03a38b9aff auto merge of #11161 : eddyb/rust/de-at-visitor, r=huonw
The primary user of `@T`/`P<T>` references from `Visitor` was `ast_map`, which in turn had two users (phase 3 in rustc and a step in loading items from metadata).
Both of them have been rewritten to use `ast_map` as a folder (this might speed up the compilation time of stage2 rustc by 100-200ms just because a fold + a visit are merged together).
2014-01-06 04:41:38 -08:00
Eduard Burtescu
3119d18e55 Disowned the Visitor. 2014-01-06 14:00:46 +02:00
bors
e5eab2c7b6 auto merge of #11321 : huonw/rust/treemap-mut, r=alexcrichton
This requires a single `*mut` pointer to implement; I've justified its existence & correctness in the code.

Also, converts the mutable and immutable iterators to share code with some macro ~~madness~~ manipulation.
2014-01-06 03:21:40 -08:00
bors
4e622becdc auto merge of #11118 : jhasse/rust/patch-rustlibdir, r=alexcrichton
...stlib. Fixes #3319
2014-01-06 02:01:49 -08:00
bors
c58bb23521 auto merge of #11315 : alexcrichton/rust/issue-11309, r=huonw
There was a scheduling race where a child may not increment the global task
count before the parent exits, and the parent would then think that there are no
more tasks left.

Closes #11039
2014-01-06 00:31:57 -08:00
Alex Crichton
11e568c886 Don't wait for a full buffer when reading TCP
libnative erroneously would attempt to fill the entire buffer in a call to
`read` before returning, when rather it should return immediately because
there's not guaranteed to be any data that will ever be received again.

Close #11328
2014-01-06 00:08:18 -08:00
Rich Lane
8bd52024ae doc: update reference to new vector size syntax 2014-01-05 22:38:16 -08:00
Alex Crichton
9c8813f006 Guarantee that native tasks wait for children
There was a scheduling race where a child may not increment the global task
count before the parent exits, and the parent would then think that there are no
more tasks left.
2014-01-05 22:28:23 -08:00
bors
b6a1fde1c6 auto merge of #11106 : alan-andrade/rust/convert_tutorials_to_guides, r=cmr
* Moved every the tutorial-*.md into its own directory `/doc/guides/`
* Makefile is aware
2014-01-05 22:11:39 -08:00