Commit Graph

25773 Commits

Author SHA1 Message Date
bors
4b2fdfaaec auto merge of #11822 : bytbox/rust/master, r=huonw
Changes only to src/etc.
2014-01-26 22:21:36 -08:00
Scott Lawrence
c60db9b30c As Either no longer exists, remove Either, Left, and Right from syntax files 2014-01-27 00:22:21 -05:00
bors
0119e46204 auto merge of #11823 : derekchiang/rust/fix-barrier-doc, r=alexcrichton
The original comments weren't rendered correctly by Markdown.
2014-01-26 19:16:44 -08:00
bors
74fedf325a auto merge of #11787 : alexcrichton/rust/refactor, r=brson
It was decided a long, long time ago that libextra should not exist, but rather its modules should be split out into smaller independent libraries maintained outside of the compiler itself. The theory was to use `rustpkg` to manage dependencies in order to move everything out of the compiler, but maintain an ease of usability.

Sadly, the work on `rustpkg` isn't making progress as quickly as expected, but the need for dissolving libextra is becoming more and more pressing. Because of this, we've thought that a good interim solution would be to simply package more libraries with the rust distribution itself. Instead of dissolving libextra into libraries outside of the mozilla/rust repo, we can dissolve libraries into the mozilla/rust repo for now.

Work on this has been excruciatingly painful in the past because the makefiles are completely opaque to all but a few. Adding a new library involved adding about 100 lines spread out across 8 files (incredibly error prone). The first commit of this pull request targets this pain point. It does not rewrite the build system, but rather refactors large portions of it. Afterwards, adding a new library is as simple as modifying 2 lines (easy, right?). The build system automatically keeps track of dependencies between crates (rust *and* native), promotes binaries between stages, tracks dependencies of installed tools, etc, etc.

With this newfound buildsystem power, I chose the `extra::flate` module as the first candidate for removal from libextra. While a small module, this module is relative complex in that is has a C dependency and the compiler requires it (messing with the dependency graph a bit). Albeit I modified more than 2 lines of makefiles to accomodate libflate (the native dependency required 2 extra lines of modifications), but the removal process was easy to do and straightforward.

---

Testing-wise, I've cross-compiled, run tests, built some docs, installed, uninstalled, etc. I'm still working out a few kinks, and I'm sure that there's gonna be built system issues after this, but it should be working well for basic use!

cc #8784
2014-01-26 16:46:34 -08:00
Alex Crichton
cdfdc1eb6b Move extra::flate to libflate
This is hopefully the beginning of the long-awaited dissolution of libextra.
Using the newly created build infrastructure for building libraries, I decided
to move the first module out of libextra.

While not being a particularly meaty module in and of itself, the flate module
is required by rustc and additionally has a native C dependency. I was able to
very easily split out the C dependency from rustrt, update librustc, and
magically everything gets installed to the right locations and built
automatically.

This is meant to be a proof-of-concept commit to how easy it is to remove
modules from libextra now. I didn't put any effort into modernizing the
interface of libflate or updating it other than to remove the one glob import it
had.
2014-01-26 15:42:15 -08:00
bors
d3f70f5a7d auto merge of #11817 : salemtalha/rust/master, r=brson
Fixes Issue #11815
2014-01-26 15:26:30 -08:00
Salem Talha
40df08a5c2 Changed tidy script to remove restriction on FIXME and to warn against XXX instead 2014-01-26 14:42:54 -05:00
Salem Talha
cc61fc0994 Removed all instances of XXX in preparation for relaxing of FIXME rule 2014-01-26 14:42:53 -05:00
bors
6743c650c1 auto merge of #11777 : alexcrichton/rust/issue-11522, r=pnkfelix
See #11522, but the idea is for private structs to have private fields by default, whereas public structs will continue to have public fields by default.
2014-01-26 11:41:33 -08:00
Derek Chiang
711726e518 Fix barrier docs 2014-01-26 14:18:25 -05:00
Alex Crichton
4d6836f418 Fix privacy fallout from previous change 2014-01-26 11:03:13 -08:00
Alex Crichton
31ac9c4288 Change private structs to have private fields by default
This was the original intention of the privacy of structs, and it was
erroneously implemented before. A pub struct will now have default-pub fields,
and a non-pub struct will have default-priv fields. This essentially brings
struct fields in line with enum variants in terms of inheriting visibility.

As usual, extraneous modifiers to visibility are disallowed depend on the case
that you're dealing with.

Closes #11522
2014-01-26 10:37:08 -08:00
Alex Crichton
2611483894 Refactor the build system for easily adding crates
Before this patch, if you wanted to add a crate to the build system you had to
change about 100 lines across 8 separate makefiles. This is highly error prone
and opaque to all but a few. This refactoring is targeted at consolidating this
effort so adding a new crate adds one line in one file in a way that everyone
can understand it.
2014-01-26 00:53:41 -08:00
bors
838b5a4cc0 auto merge of #11762 : alexcrichton/rust/guard_pages, r=alexcrichton
Rebasing of the previous PRs, I believe I've found the problems.
2014-01-26 00:51:35 -08:00
Alex Crichton
8c43ce6d94 Bring in the line-length police 2014-01-26 00:49:23 -08:00
bors
e36032e9e1 auto merge of #11808 : huonw/rust/std-visible-types, r=brson
These are either returned from public functions, and really should
appear in the documentation, but don't since they're private, or are
implementation details that are currently public.
2014-01-25 20:41:36 -08:00
bors
e139b49eef auto merge of #11805 : brson/rust/smallerarenas, r=brson
Android bots are OOMing.
2014-01-25 19:11:34 -08:00
Huon Wilson
0aef487a5c std,extra: Make some types public and other private.
These are either returned from public functions, and really should
appear in the documentation, but don't since they're private, or are
implementation details that are currently public.
2014-01-26 13:33:05 +11:00
bors
897a0a388f auto merge of #11803 : sfackler/rust/simple-mac, r=brson
Now that procedural macros can be implemented outside of the compiler,
it's more important to have a reasonable API to work with. Here are the
basic changes:

* Rename SyntaxExpanderTTTrait to MacroExpander, SyntaxExpanderTT to
    BasicMacroExpander, etc. I think "procedural macro" is the right
    term for these now, right? The other option would be SynExtExpander
    or something like that.

* Stop passing the SyntaxContext to extensions. This was only ever used
    by macro_rules, which doesn't even use it anymore. I can't think of
    a context in which an external extension would need it, and removal
    allows the API to be significantly simpler - no more
    SyntaxExpanderTTItemExpanderWithoutContext wrappers to worry about.
2014-01-25 17:51:32 -08:00
bors
d2b44b6600 auto merge of #11799 : comex/rust/patch-2, r=brson 2014-01-25 16:31:47 -08:00
Brian Anderson
2d27ad19fa Stop allocating so much in arena tests
Android bots are OOMing.
2014-01-25 15:38:44 -08:00
Steven Fackler
ab5bbd3c17 Simplify and rename macro API
Now that procedural macros can be implemented outside of the compiler,
it's more important to have a reasonable API to work with. Here are the
basic changes:

* Rename SyntaxExpanderTTTrait to MacroExpander, SyntaxExpanderTT to
    BasicMacroExpander, etc. I think "procedural macro" is the right
    term for these now, right? The other option would be SynExtExpander
    or something like that.

* Stop passing the SyntaxContext to extensions. This was only ever used
    by macro_rules, which doesn't even use it anymore. I can't think of
    a context in which an external extension would need it, and removal
    allows the API to be significantly simpler - no more
    SyntaxExpanderTTItemExpanderWithoutContext wrappers to worry about.
2014-01-25 13:55:39 -08:00
comex
75af1e504a Grammatical fixes. 2014-01-25 15:35:28 -05:00
bors
b85fe01b94 auto merge of #11725 : derekchiang/rust/add-barrier, r=alexcrichton 2014-01-25 11:16:29 -08:00
bors
60260b6d43 auto merge of #11795 : xales/rust/master, r=cmr 2014-01-25 09:16:31 -08:00
Derek Chiang
a937d1875e Implement barrier. 2014-01-25 11:59:29 -05:00
xales
5d2ef31af9 Fix spacing in example comment. 2014-01-25 11:16:55 -05:00
bors
0f637ebd06 auto merge of #11790 : lfairy/rust/rename-num-consts, r=alexcrichton
The following are renamed:

* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`

All tests pass, except for `run-pass/phase-syntax-link-does-resolve.rs`. I doubt that failure is related, though.

Fixes #10010.
2014-01-25 07:56:27 -08:00
bors
caabbb8388 auto merge of #11788 : salemtalha/rust/master, r=huonw
Fixes #11785.
2014-01-25 06:31:31 -08:00
bors
b0ef2d56a8 auto merge of #11775 : alexcrichton/rust/select-fix, r=pcwalton
The race here happened when a port had its deschedule in select() canceled, but
the other chan had already been dropped. This meant that the DISCONNECTED case
was hit in abort_selection, but the to_wake cell hadn't been emptied yet (this
was done after aborting), causing an assert in abort_selection to trip.

To fix this, the to_wake cell is just emptied before abort_selection is called
(we know that we're the owner of it already).
2014-01-25 05:11:28 -08:00
bors
6516b303b5 auto merge of #11570 : derekchiang/rust/fix-rt-docs, r=alexcrichton 2014-01-25 02:21:32 -08:00
Chris Wong
988e4f0a1c Uppercase numeric constants
The following are renamed:

* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`

Fixes #10010.
2014-01-25 21:38:25 +13:00
Salem Talha
1b4623d1dd Fixed iter's is_empty to use is_none() and added relevant test flag 2014-01-25 02:44:06 -05:00
Derek Chiang
e8baed0b2d Fix some docs about rt 2014-01-25 02:16:17 -05:00
Corey Richardson
bf5152f486 Fix zero-sized memory mapping 2014-01-24 22:30:01 -08:00
Corey Richardson
7499e2dd45 Add benchmarks 2014-01-24 22:30:00 -08:00
Corey Richardson
69afce64c7 Update task-perf-one-million 2014-01-24 22:30:00 -08:00
Corey Richardson
dee7fa58dd Use mmap to map in task stacks and guard page
Also implement caching of stacks.
2014-01-24 22:30:00 -08:00
Corey Richardson
462f09e949 Add support for arbitrary flags to MemoryMap.
This also fixes up the documentation a bit, it was subtly incorrect.
2014-01-24 22:30:00 -08:00
bors
de57a22b9a auto merge of #11774 : sfackler/rust/move-macros, r=pcwalton
They all have to go into a single module at the moment unfortunately.
Ideally, the logging macros would live in std::logging, condition! would
live in std::condition, format! in std::fmt, etc. However, this
introduces cyclic dependencies between those modules and the macros they
use which the current expansion system can't deal with. We may be able
to get around this by changing the expansion phase to a two-pass system
but that's for a later PR.

Closes #2247
cc #11763
2014-01-24 20:31:37 -08:00
bors
7c028c9ba7 auto merge of #11772 : sanxiyn/rust/reexport, r=cmr
The field is always set to true.
2014-01-24 19:11:39 -08:00
bors
72e888960f auto merge of #11764 : Armavica/rust/doc_patmatch, r=pcwalton
I also removed the obsolete '*' wildcard from the manual.
2014-01-24 17:51:31 -08:00
bors
dc48adc69f auto merge of #11748 : brson/rust/timerfdandroid, r=alexcrichton
It doesn't seem to exist.
2014-01-24 16:11:31 -08:00
bors
8de3fab82a auto merge of #11732 : luqmana/rust/native-getaddrinfo, r=alexcrichton
The last bit I needed to be able to use libnative :P
2014-01-24 14:51:36 -08:00
Luqman Aden
adb5128020 libnative: Avoid gai_strerror on windows. 2014-01-24 16:44:16 -05:00
Luqman Aden
a04cc4db2c libstd: Use iotest! for for get_host_addresses. 2014-01-24 16:44:16 -05:00
bors
a1d9d9e6d2 auto merge of #11744 : alexcrichton/rust/issue-5219, r=thestinger
By default, the compiler and libraries are all still built with rpaths, but this
can be opted out of with --disable-rpath to ./configure or --no-rpath to rustc.

Closes #5219
2014-01-24 10:26:33 -08:00
Alex Crichton
35e26e94d8 Fix a spuriously tripped assert in select()
The race here happened when a port had its deschedule in select() canceled, but
the other chan had already been dropped. This meant that the DISCONNECTED case
was hit in abort_selection, but the to_wake cell hadn't been emptied yet (this
was done after aborting), causing an assert in abort_selection to trip.

To fix this, the to_wake cell is just emptied before abort_selection is called
(we know that we're the owner of it already).
2014-01-24 10:05:58 -08:00
Alex Crichton
e715cdba31 Allow opting-out of rpath usage
By default, the compiler and libraries are all still built with rpaths, but this
can be opted out of with --disable-rpath to ./configure or --no-rpath to rustc.

cc #5219
2014-01-24 09:24:45 -08:00
bors
8c805fa70b auto merge of #11760 : dmac/rust/addressable-search, r=alexcrichton
This change adds two improvements to docs searching functionality.

First, search results will immediately be displayed when a ?search=searchterm
query string parameter is provided to any docs url.

Second, search results are now inserted into the browser history, allowing for
easier navigation between search results and docs pages.
2014-01-24 08:46:33 -08:00