Commit Graph

15242 Commits

Author SHA1 Message Date
bors
e8fc4b347d auto merge of #4834 : veddan/rust/zflags, r=graydon
Converted --static, --gc, --jit, -g and --xg to -Z flags.
2013-02-07 19:50:03 -08:00
bors
bc1fb62c34 auto merge of #4745 : jld/rust/constenum-bis, r=graydon
There were a bunch of problems with consts where an enum was contained within some other type (vector, tuple, struct, etc.); some of these would cause LLVM assertion failures, and some would silently read from the wrong address.  These changes should fix all of that.

It would be good if someone with access to a win32 host could do the equivalent of `make check-stageN-rpass TESTNAME=enum` on that platform before merging this.
2013-02-07 19:04:44 -08:00
Jed Davis
e89d9853a6 Fix vector indexing in consts so it works with the enum vector const fix. 2013-02-07 18:31:12 -08:00
Jed Davis
de8dc02634 Make tuple-like structs containing enums work as constants. 2013-02-07 18:31:12 -08:00
Jed Davis
30aae3d910 Fix const enum type issues for structs. 2013-02-07 18:31:12 -08:00
Jed Davis
bbb1202528 Add a test for vstore, which already works 2013-02-07 18:31:08 -08:00
Jed Davis
29b99669dc Fix pointer consts to work with enums 2013-02-07 18:28:31 -08:00
Jed Davis
9ad616a102 Make vectors of enums work as constants 2013-02-07 18:28:11 -08:00
Jed Davis
6cdc283415 Also need to pad out "C-like" enum consts (paths as well as calls). 2013-02-07 17:57:02 -08:00
Jed Davis
877fc8d891 Pad out enum consts to the expected size; makes enums in tuples work.
This is wasted space if the const is just an enum, but optimizing that
case without breaking everything else is an issue that can be addressed
separately.
2013-02-07 17:57:02 -08:00
Jed Davis
52cf61fd3b Fix const enums better: let them have the same alignment as an "opaque enum". 2013-02-07 17:57:02 -08:00
bors
6647a3402b auto merge of #4833 : pcwalton/rust/demuting, r=pcwalton 2013-02-07 16:23:59 -08:00
Patrick Walton
472797b04a librustc: Lots of de-muting. rs=demuting 2013-02-07 16:17:39 -08:00
Viktor Dahl
fae8fc94dc Added a few missing 'pub's 2013-02-08 00:57:31 +01:00
bors
2bc9655bc1 auto merge of #4803 : alexcrichton/rust/fix-unused-imports, r=graydon
The first commit message has most of the comments, but this pull request basically fixes a lot of issues surrounding the `unused_imports` warning/deny attribute.

Before this patch there were these problems:

1. Unused imports from `prelude.rs` were warned about with dummy spans, leading to a large number of confusing warnings.
2. Unused imports from `intrinsic.rs` were warned about with the file `<intrinsic>` which couldn't be forced to go away
3. Methods used from imported traites (like `io::WriterUtil`) resulted in an unused warning of the import even though it was used.
4. If one `use` statement imported N modules, M of which weren't used, M warning statements were issued.
5. If a glob import statement was used, each public export of the target module which wasn't used had a warning issued.

This patch deals with all these cases by doing:

1. Ignore unused imports from `prelude.rs` (indicated by a dummy span of 0)
2. Ignore unused imports from `intrinsic.rs` (test on the imported module name, is there a better way?)
3. Track when imported modules are used as candidates for methods, and just assume they're used. This may not end up being the actual case, but in theory not warning about an unused thing is worse than warning about a used thing.
4. Only issue one warning statement
5. Only issue one warning statement.

This is the first time I've edited the compiler itself, and I tried to keep up with the style around, but I may have missed something here or there...
2013-02-07 15:20:16 -08:00
Viktor Dahl
b8943474dc Moved experimental compiler flags to -Z (#4740) 2013-02-08 00:18:23 +01:00
bors
4272765830 auto merge of #4791 : jbclements/rust/demodeing-and-deGCing, r=jbclements,brson
r?

It looks to me like the string_reader and tt_reader structs are
GC pointers only because they predate the modern borrow system.
This commit leaves the type names string_reader and tt_reader alone
(they still refer to GC-ed pointers), but internally the functions
now use borrowed pointers to refer to these structures. My guess
would be that it's possible to move this change outward and not
use the GCed pointers at all, but that change looks like it could be
a larger one. Actually, I'm delighted at how quick this change was.
2013-02-07 13:58:32 -08:00
Brian Anderson
6e9298ab88 Merge pull request #4619 from brson/exchange
Some work on freestanding Rust: foreign calls, exchange allocator
2013-02-07 13:46:10 -08:00
bors
a2817953d0 auto merge of #4832 : sanxiyn/rust/pretty-exact, r=graydon 2013-02-07 12:17:32 -08:00
bors
8dd932b3d5 auto merge of #4814 : brson/rust/check, r=nikomatsakis
r? @nikomatsakis The third commit here is the one that makes the test suite remember which steps have completed successfully.
2013-02-07 10:46:34 -08:00
Seo Sanghyeon
683e7a45a6 Change pretty-exact to pp-exact 2013-02-08 02:56:49 +09:00
bors
37a610a7d9 auto merge of #4831 : bjz/rust/incoming, r=pcwalton
This is useful for comparing more complex types that include floats.
2013-02-07 08:32:09 -08:00
Brendan Zabarauskas
7651100ec1 Fix broken tests 2013-02-08 02:41:23 +11:00
bors
3764cfbf57 auto merge of #4810 : nikomatsakis/rust/owned-fn-noncopyable, r=nikomatsakis
Part of #3678.  Fixes #2828, #3904.

r? @brson
2013-02-07 06:05:10 -08:00
Niko Matsakis
a32498d846 Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
correct handling of moves for struct-record update.

Part of #3678.  Fixes #2828, #3904, #4719.
2013-02-07 05:53:30 -08:00
bors
82d7396333 auto merge of #4823 : pcwalton/rust/enum-variant-discriminants, r=graydon
r? @graydon
2013-02-07 04:02:51 -08:00
Brendan Zabarauskas
17a14fe0e9 Merge branch 'incoming' of https://github.com/mozilla/rust into incoming 2013-02-07 22:55:23 +11:00
Brendan Zabarauskas
e4c7d8ec87 Add type parameter for epsilon value 2013-02-07 22:54:52 +11:00
bors
fa69739320 auto merge of #4822 : graydon/rust/doc-version-stamp, r=brson
This just improves the version stamp, which was not being regenerated in cached workspaces even when the version changed. Also adds it to the pdf.
2013-02-07 02:47:14 -08:00
bors
b3e182568f auto merge of #4817 : kud1ing/rust/patch-1, r=brson
Encountered this while trying to port rustsqlite to rust 0.6
2013-02-07 01:30:57 -08:00
bors
d9a61f2a19 auto merge of #4816 : lifthrasiir/rust/float-literal, r=graydon
See #4804 for details.
2013-02-07 00:14:14 -08:00
bors
951ad11d68 auto merge of #4815 : thestinger/rust/treemap, r=pcwalton
5283a8b reworks the TreeMap lazy iterator to use `&mut` again, which closes #4763. It gets the performance of the set methods back in the same ballpark that it was pre-INHTWAMA which is nice. These can be turned back into methods eventually.

e5b6334 removes the transitional smallintmap attributes which closes #4737.
2013-02-06 22:57:08 -08:00
Patrick Walton
8280c81513 Merge pull request #4811 from catamorphism/issue-4523-testcase
auto: testsuite: Add test for #4523
2013-02-06 22:49:26 -08:00
bors
2df473dc69 auto merge of #4801 : z0w0/rust/randomtrait, r=graydon
Also adds Rng::gen() for generically generating any type that implements the Rand trait. There's no way to generate things with a length (for e.g. strings or vectors), because I can't think of an elegant way to do that. Maybe have a RandLen trait that inherits Rand?

This can be used for a quickcheck mechanism I'm working on.
2013-02-06 21:04:37 -08:00
bors
f13ea4121e auto merge of #4795 : catamorphism/rust/less-copy, r=catamorphism 2013-02-06 17:06:15 -08:00
Patrick Walton
cf6c3d96fb librustc: Attempt to put out burning tree by fixing translation of unary negation in boolean constants. rs=burningtree 2013-02-06 15:38:23 -08:00
Brendan Zabarauskas
b081f59495 Convert fuzzy_epsilon constant to upper case and make public 2013-02-07 10:25:41 +11:00
Patrick Walton
6d13c90256 librustc: Stop loading enum variant discriminants from memory 2013-02-06 15:08:33 -08:00
Graydon Hoare
79dc10dba9 doc: improvements to version-stamp makefile logic. 2013-02-06 14:59:03 -08:00
Daniel Micay
dab2f2fac0 remove old snapshot workaround from smallintmap 2013-02-06 17:37:56 -05:00
Daniel Micay
bdfb930f34 treemap: make map_next and set_next public 2013-02-06 17:37:56 -05:00
Daniel Micay
1694168783 update treemap FIXME 2013-02-06 17:37:56 -05:00
Daniel Micay
37e998696f get rid of implicit vec copies in treemap iterator
Each call to next() was doing a copy rather than a move. There's
currently no way for this to be a method that uses &mut self, so it has
to be a free function. Closes #4763.
2013-02-06 17:37:56 -05:00
Daniel Micay
5b6c26b4e4 treemap: get rid of some implicit vector copies 2013-02-06 17:37:56 -05:00
Daniel Micay
b91a51daca remove issue #3148 workarounds (no longer needed) 2013-02-06 17:37:56 -05:00
Patrick Walton
b34f871dda librustc: Change i1 to i8 for bools. Attempts to put out burning tree. rs=burningtree 2013-02-06 14:28:02 -08:00
Brian Anderson
e43c5bdc6b Rewrite the exchange allocator to work without an active scheduler. #4457 2013-02-06 14:27:36 -08:00
Brian Anderson
e91040c704 Make foreign calls work outside of tasks. #4451 2013-02-06 14:27:34 -08:00
Tim Chevalier
739e5ba369 rustc: Less copy 2013-02-06 12:09:11 -08:00
Brian Anderson
a8c8bfc7b5 rt: Add rust_try_get_current_task 2013-02-06 11:56:32 -08:00