Commit Graph

19909 Commits

Author SHA1 Message Date
bors
65ed80339b auto merge of #7568 : alexcrichton/rust/check-lite, r=huonw
A lot of cross-platform issues stem from rusti/rustpkg, so include these two test suites in the 'check-lite' target which is run on the cross-compile bots. It shouldn't be much of a performance hit because these suites are pretty fast to run.

Hopefully this will make snapshot/tarball creation easier in the future.
2013-07-08 04:28:53 -07:00
Björn Steinbrink
4a485f8cec Avoid unused allocas for immediate return values
There's no need to allocate a return slot for anykind of immediate
return value, not just not for nils. Also, when the return value is
ignored, we only have to copy it to a temporary alloca if it's actually
required to call drop_ty on it.
2013-07-08 13:17:46 +02:00
bors
48ad726f2a auto merge of #7605 : thestinger/rust/vec, r=Aatch
This is work continued from the now landed #7495 and #7521 pulls.

Removing the headers from unique vectors is another project, so I've separated the allocator.
2013-07-08 02:52:56 -07:00
Daniel Micay
90f1db10fa remove headers from exchange allocations 2013-07-08 04:54:41 -04:00
Daniel Micay
44770ae3a8 Merge pull request #7595 from thestinger/iterator
remove some method resolve workarounds
2013-07-08 01:42:07 -07:00
Daniel Micay
0aedecf96b add a temporary vector_exchange_malloc lang item 2013-07-08 03:41:21 -04:00
Daniel Micay
7bf34c3437 vec: make vec_reserve_shared_actual private 2013-07-08 03:41:21 -04:00
Fedor Indutny
4a868c7c1d libc: add errno values 2013-07-08 10:36:43 +04:00
Fedor Indutny
822dc5f1f6 libc: VirtualAlloc and FileMapping bindings 2013-07-08 10:36:43 +04:00
Fedor Indutny
1c56046d51 libc: add _SC_* consts for non-mips linux too
They was previously missing
2013-07-08 10:36:43 +04:00
Fedor Indutny
6e67701ca8 libc: fix MAP_ANON value on linux 2013-07-08 10:36:43 +04:00
bors
96ae000812 auto merge of #7497 : alexcrichton/rust/issue-7394, r=huonw 2013-07-07 21:34:51 -07:00
bors
e07ae9e6f9 auto merge of #7591 : alexcrichton/rust/fix-warnings, r=huonw
Closes #7589
2013-07-07 19:35:00 -07:00
Alex Crichton
d49acef07b Add rusti/rustpkg to check-lite
Ironically also disable rusti tests for now, but mainly because they're awaiting
LLVM upgrades before proceeding
2013-07-07 19:13:21 -07:00
Alex Crichton
a02e37c397 Fix a warning when generating tests 2013-07-07 19:03:57 -07:00
bors
6d6b1a8bfa auto merge of #7586 : g5pw/rust/master, r=cmr
This updates the script in src/etc/local_stage0.sh to copy the correct libraries
to stage0.
2013-07-07 17:59:03 -07:00
Daniel Micay
641aec7407 remove some method resolve workarounds 2013-07-07 19:51:13 -04:00
Andrew Paseltiner
7bb4ff6267 iterator: Add IteratorUtil::peek_ method 2013-07-07 19:29:37 -04:00
bors
ddf8247d7f auto merge of #7629 : thestinger/rust/rope, r=graydon
It's broken/unmaintained and needs to be rewritten to avoid managed
pointers and needless copies. A full rewrite is necessary and the API
will need to be redone so it's not worth keeping this around (#7628).

Closes #2236, #2744
2013-07-07 15:20:01 -07:00
bors
28643d4135 auto merge of #7456 : graydon/rust/better-trans-stats, r=cmr
This way when you compile with -Z trans-stats you'll get a per-function cost breakdown, sorted with the most expensive functions first. Should help highlight pathological code.
2013-07-07 12:53:06 -07:00
Luca Bruno
7a4210a174 Generate initial translatable templates for documentation
These files are automatically genereated by `make docs-l10n` (via po4a),
which will also take of updating them if the original .md changes.

Signed-off-by: Luca Bruno <lucab@debian.org>
2013-07-07 21:17:35 +02:00
Luca Bruno
3177e63dee Use po4a to provide translatable documentation
This commit add a new "docs-l10n" make target which uses po4a to:
* create .pot (PO templates) from markdown doc
* update templates and po for enabled languages
* generate translated markdown for completed (> 80%) translations

Currently, no language has been activated.

Signed-off-by: Luca Bruno <lucab@debian.org>
2013-07-07 21:12:00 +02:00
bors
52abd1cc32 auto merge of #7636 : dotdash/rust/scope_cleanup, r=graydon
Currently, scopes are tied to LLVM basic blocks. For each scope, there
are two new basic blocks, which means two extra jumps in the unoptimized
IR. These blocks aren't actually required, but only used to act as the
boundary for cleanups.

By keeping track of the current scope within a single basic block, we
can avoid those extra blocks and jumps, shrinking the pre-optimization
IR quite considerably. For example, the IR for trans_intrinsic goes
from ~22k lines to ~16k lines, almost 30% less.

The impact on the build times of optimized builds is rather small (about
1%), but unoptimized builds are about 11% faster. The testsuite for
unoptimized builds runs between 15% (CPU time) and 7.5% (wallclock time on
my i7) faster.

Also, in some situations this helps LLVM to generate better code by
inlining functions that it previously considered to be too large.
Likely because of the pointless blocks/jumps that were still present at
the time the inlining pass runs.

Refs #7462
2013-07-07 11:16:59 -07:00
bors
3c44265d87 auto merge of #7602 : blake2-ppc/rust/vec-pop-opt, r=cmr
Implement methods `.pop_opt() -> Option<T>` and `.shift_opt() -> Option<T>` to allow retrieval of front/back of a vec in one operation without fail. .pop() and .shift() are changed to reuse the former two methods.

Follows the naming of the previous method .head_opt()
2013-07-07 09:35:04 -07:00
bors
005c9bde45 auto merge of #7594 : chris-morgan/rust/proper-net-module-structure, r=huonw
Where * = tcp, ip, url.

Formerly, extra::net::* were aliases of extra::net_*, but were the
recommended path to use. Thus, the documentation talked of the `net_*`
modules while everything else was written expecting `net::*`.

This moves the actual modules so that `extra::net::*` is the actual
location of the modules.

This will naturally break any code which used `extra::net_*` directly.
They should be altered to use `extra::net::*` (which has been the
documented way of doing things for some time).

This ensures that there is one, and only one, obvious way of doing
things.
2013-07-07 07:41:03 -07:00
Felix S. Klock II
033ac5497e Fix #3225: Check for old Rust libraries when building and installing.
When building Rust libraries (e.g. librustc, libstd, etc), checks for
and verbosely removes previous build products before invoking rustc.
(Also, when Make variable VERBOSE is defined, it will list all of the
libraries matching the object library's glob after the rustc
invocation has completed.)

When installing Rust libraries, checks for previous libraries in
target install directory, but does not remove them.

The thinking behind these two different modes of operation is that the
installation target, unlike the build tree, is not under the control
of this infrastructure and it is not up to this Makefile to decide if
the previous libraries should be removed.
2013-07-07 15:23:40 +02:00
Björn Steinbrink
e41e435851 Implement scopes independent of LLVM basic blocks
Currently, scopes are tied to LLVM basic blocks. For each scope, there
are two new basic blocks, which means two extra jumps in the unoptimized
IR. These blocks aren't actually required, but only used to act as the
boundary for cleanups.

By keeping track of the current scope within a single basic block, we
can avoid those extra blocks and jumps, shrinking the pre-optimization
IR quite considerably. For example, the IR for trans_intrinsic goes
from ~22k lines to ~16k lines, almost 30% less.

The impact on the build times of optimized builds is rather small (about
1%), but unoptimized builds are about 11% faster. The testsuite for
unoptimized builds runs between 15% (CPU time) and 7.5% (wallclock time on
my i7) faster.

Also, in some situations this helps LLVM to generate better code by
inlining functions that it previously considered to be too large.
Likely because of the pointless blocks/jumps that were still present at
the time the inlining pass runs.

Refs #7462
2013-07-07 14:53:57 +02:00
bors
0f2515583d auto merge of #7615 : Aatch/rust/syntax-deshare, r=graydon
In an ideal world, the AST would be completely sendable, this gets us a step closer.

It removes the local heap allocations for `view_item`, `Path`, `Lifetime` `trait_ref` `OptVec<TyParamBounds>` and `Ty`. There are also a few other smaller changes I made as things went along.
2013-07-07 05:22:56 -07:00
James Miller
280e4245c0 Fix merge-fallout-typo 2013-07-07 23:05:03 +12:00
James Miller
1fd735d3c1 Fix broken tests 2013-07-07 22:51:10 +12:00
James Miller
fb19205b1b Fix rustdoc and rusti 2013-07-07 22:51:10 +12:00
James Miller
7ce68dc9e1 Clean up warnings 2013-07-07 22:51:10 +12:00
James Miller
47eca2113c De-share ast::Ty 2013-07-07 22:51:10 +12:00
James Miller
46a1f54666 De-manage OptVec<TyParamBounds> 2013-07-07 22:51:10 +12:00
James Miller
97c5a44d3e De-share trait_ref
Also, makes the pretty-printer use & instead of @ as much as possible,
which will help with later changes, though in the interim has produced
some... interesting constructs.
2013-07-07 22:51:09 +12:00
James Miller
62c83bb17b De-manage Lifetime 2013-07-07 22:51:09 +12:00
James Miller
cd1b6c8979 De-managed ast::Path 2013-07-07 22:51:09 +12:00
James Miller
a69eb95233 Stop allocating view_items with @ 2013-07-07 22:51:09 +12:00
bors
d91ac39cd5 auto merge of #7585 : Blei/rust/fix-circular-modules, r=huonw
Fixes #7276
2013-07-07 03:40:59 -07:00
bors
63f7857697 auto merge of #7582 : mitsuhiko/rust/doc-fixes, r=huonw
Drop is no longer a keyword, removed it from the intro docs.
2013-07-07 01:44:02 -07:00
bors
88487d8274 auto merge of #7557 : michaelwoerister/rust/enum_structs, r=pcwalton
After getting an ICE trying to use the `Repr` enum from middle::trans::adt (see issue #7527), I tried to implement the missing case for struct-like enum variants in `middle::ty::enum_variants()`. It seems to work now (and passes make check) but there are still some uncertainties that bother me:
+ I'm not sure I did everything, right. Especially getting the variant constructor function from the variant node id is just copied from the tuple-variant case. Someone with more experience in the code base should be able to see rather quickly whether this OK so.
+ It is kind of strange that I could not reproduce the ICE with a smaller test case. The unimplemented code path never seems to be hit in most cases, even when using the exact same `Repr` enum, just with `ty::t` replaced by an opaque pointer. Also, within the `adt` module, `Repr` and matching on it is used multiple times, again without running into problems. Can anyone explain why this is the case? That would be much appreciated. 

Apart from that, I hope this PR is useful.
2013-07-06 23:59:05 -07:00
bors
b16825216e auto merge of #7581 : alexcrichton/rust/better-rusti, r=pcwalton
This is more future-proof
2013-07-06 22:17:08 -07:00
Gavin Baker
6143419ee1 Add new manpages to install script 2013-07-07 14:45:39 +10:00
Gavin Baker
4f2ee0ef3a Create man pages for rust tools 2013-07-07 14:45:39 +10:00
bors
d243e0047d auto merge of #7572 : Dretch/rust/missing-trait-message-followup, r=pcwalton
This a followup to #7510. @catamorphism requested a test - so I have created one, but in doing so I noticed some inconsistency in the error messages resulting from referencing nonexistent traits, so I changed the messages to be more consistent.
2013-07-06 20:32:09 -07:00
bors
a9f178c148 auto merge of #7570 : kballard/rust/iterator-size-hint, r=thestinger
Change the signature of Iterator.size_hint() to always have a lower bound.

Implement .size_hint() on all remaining iterators (if it differs from the default).
2013-07-06 14:59:09 -07:00
Kevin Ballard
e6f9b08610 Implement size_hint() on all remaining Iterators
Add size_hint() to the Iterators in libextra and the Iterator in
libsyntax.

Skip deque for the moment, as it's being worked on elsewhere.
2013-07-06 14:14:45 -07:00
Daniel Micay
01833de7ea remove extra::rope
It's broken/unmaintained and needs to be rewritten to avoid managed
pointers and needless copies. A full rewrite is necessary and the API
will need to be redone so it's not worth keeping this around.

Closes #2236, #2744
2013-07-06 17:06:30 -04:00
bors
c1c7768b32 auto merge of #7562 : blake2-ppc/rust/deque, r=cmr
Fix an assertion in grow when using add_front.

Speeds up grow (and the functions that use it) by a lot. We retain the vector instead of creating it anew for each grow. 

The struct field hi is removed since it is redundant, and all iterators are updated to use a representation closer to the Deque itself, it should make it work even if deque sizes are not powers of two.

Deque::with_capacity is also implemented, but .reserve() is not yet done.
2013-07-06 13:23:08 -07:00
bors
3e933b199c auto merge of #7194 : jensnockert/rust/endian, r=cmr
They simply byte-swap an integer to a specific endian, like the hton* functions in C.

These intrinsics are synthesized, so maybe they should be in another file. But since they are just a single line of code each, based on the bswap intrinsics and aren't really intended for public consumption I thought they would fit in the intrinsics file.

The next step working on this could be to expose a trait / generic function for byteswapping.
2013-07-06 08:32:10 -07:00