Commit Graph

25245 Commits

Author SHA1 Message Date
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
bors 5efac2bee1 auto merge of #11356 : brson/rust/0.9relnotes, r=alexcrichton 2014-01-06 19:41:42 -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
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
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
bors a6d3e57dca auto merge of #10900 : yichoi/rust/mac_android_cross, r=alexcrichton
this patch should be followed by https://github.com/alexcrichton/libuv/pull/2
2014-01-05 20:56:53 -08:00
Alan Andrade eeafee4c9b Convert sub tutorials into Guides #10838
Ensure configure creates doc/guides directory

Fix configure makefile and tests

Remove old guides dir and configure option, convert testing to guide

Remove ignored files

Fix submodule issue

prepend dir in makefile so that bor knows how to build the docs

S to uppercase
2014-01-05 22:48:19 -06:00
Young-il Choi 635002a350 librustc: tidy cleanup 2014-01-06 13:06:06 +09:00
Young-il Choi e6490cbdb0 librustc: add get_system_tools for target specific environment 2014-01-06 13:04:26 +09:00
Young-il Choi c8c99429d2 librustc: move target dependent logic to back::link 2014-01-06 13:04:26 +09:00
Young-il Choi 19e97f5c5d librustc: ar call fix to support android cross compile on mac 2014-01-06 13:04:26 +09:00
bors cdcf28dd30 auto merge of #11270 : lkuper/rust/trait-docs, r=cmr
I've been wanting to explain default methods in the tutorial for ages.  While I was at it I tried to clarify some other parts of the traits section.  I'm sure this could be improved further; suggestions welcome.
2014-01-05 19:31:53 -08:00
Lindsey Kuper 8224816a34 tutorial: add missing line to make example build. 2014-01-05 22:03:13 -05:00
Lindsey Kuper 4f1ebef96a tutorial: remove duplicate words. 2014-01-05 22:03:13 -05:00
Lindsey Kuper 60e139409f tutorial: change `float` to `f32` since float is no longer a type. 2014-01-05 22:03:13 -05:00