Commit Graph

28909 Commits

Author SHA1 Message Date
Daniel Micay
81fadbbc41 android workaround 2014-05-11 00:57:41 -04:00
Daniel Micay
e2479b8cac pass correct CFLAGS for jemalloc 2014-05-11 00:07:21 -04:00
moonglum
1895ad269c Clarification of Slice, Vector and Array
Especially in the tutorial beginners should not be confused with
wrong terminology. It helps to know the right names for things
when you want to find something in the documentation.
2014-05-10 18:02:02 -07:00
Alan Andrade
4e1f239721 remove the word managed from the trait explanation 2014-05-10 17:30:59 -07:00
Alex Crichton
30927f15b7 rustdoc: Fix search links to enums/typedefs
When the values in html::item_type were updated, the JS definitions were
accidentally not updated as well.

Closes #14095
2014-05-10 17:00:39 -07:00
Daniel Micay
121ad1cb7d rename global_heap -> libc_heap
This module only contains wrappers for malloc and realloc with
out-of-memory checks.
2014-05-10 19:58:18 -04:00
Daniel Micay
87b658cf72 gitattributes: rm obsolete jemalloc entry 2014-05-10 19:58:17 -04:00
Daniel Micay
7e84b221de vec: factor out some deallocation code 2014-05-10 19:58:17 -04:00
Daniel Micay
0621ccac62 vec: move some code inside alloc_or_realloc 2014-05-10 19:58:17 -04:00
Daniel Micay
f8e92cbbe3 fix Vec<ZeroSizeType> 2014-05-10 19:58:17 -04:00
Daniel Micay
138437956c initial port of the exchange allocator to jemalloc
In stage0, all allocations are 8-byte aligned. Passing a size and
alignment to free is not yet implemented everywhere (0 size and 8 align
are used as placeholders). Fixing this is part of #13994.

Closes #13616
2014-05-10 19:58:17 -04:00
Daniel Micay
aaf6e06b01 use jemalloc to implement Vec<T> 2014-05-10 19:58:17 -04:00
Daniel Micay
03a5eb4b52 add an align parameter to exchange_malloc
Closes #13094
2014-05-10 19:58:17 -04:00
Daniel Micay
1b1ca6d546 add back jemalloc to the tree
This adds a `std::rt::heap` module with a nice allocator API. It's a
step towards fixing #13094 and is a starting point for working on a
generic allocator trait.

The revision used for the jemalloc submodule is the stable 3.6.0 release.

Closes #11807
2014-05-10 19:58:17 -04:00
Nick Cameron
37ca36783c Reorganise driver code.
The goal of this refactoring is to make the rustc driver code easier to understand and use. Since this is as close to an API as we have, I think it is important that it is nice. On getting stuck in, I found that there wasn't as much to change as I'd hoped to make the stage... fns easier to use by tools.

This patch only moves code around - mostly just moving code to different files, but a few extracted method refactorings too. To summarise the changes: I added driver::config which handles everything about configuring the compiler. driver::session now just defines and builds session objects. I moved driver code from librustc/lib.rs to librustc/driver/mod.rs so all the code is one place. I extracted methods to make emulating the compiler without being the compiler a little easier. Within the driver directory, I moved code around to more logically fit in the modules.
2014-05-11 11:08:01 +12:00
bors
11571cd9c1 auto merge of #14081 : Manishearth/rust/c-schar-reexport, r=huonw
Don't merge this until #14076 merges, since it is based on top of that branch to avoid merge conflicts.
2014-05-10 12:31:35 -07:00
Guillaume Pinot
db93ca28e2 shootout-nbody improvements
- minimize bound check
- factorise operations
- use x, y, z instead of [f64, ..3]
- ~1.15 faster
2014-05-10 20:32:31 +02:00
bors
1001635dc1 auto merge of #14073 : alexcrichton/rust/snapshots, r=huonw 2014-05-10 09:56:34 -07:00
klutzy
c92f51974b librand: Revise crypto part of document
This patch adds document which explains when to use `OSRng` in
cryptographic context, and explains why we use `/dev/urandom` instead
of `/dev/random`.
2014-05-10 23:37:55 +09:00
Manish Goregaokar
4cbd7754ea Reexport wchar_t, c_schar 2014-05-10 19:35:14 +05:30
bors
e850316408 auto merge of #14068 : alexcrichton/rust/rustdoc-xcrate-links, r=brson
This should improve the libcore experience quite a bit when looking at the
libstd documentation.
2014-05-10 03:36:30 -07:00
bors
061450dcf1 auto merge of #14066 : edwardw/rust/pod-to-copy, r=alexcrichton
Some error messages still use the word `Pod` instead of `Copy`. Renames
them.
2014-05-10 02:11:32 -07:00
bors
a7d877ce62 auto merge of #14056 : kballard/rust/vim_indent_fix, r=huonw
cindent handles the following case incorrectly:

    impl X {
        b: int,
        //
        c: int,
    }

if you try and insert a new line after the `c` declaration.

To fix this, fix the get_line_trimmed() function to work properly, and
then extend GetRustIndent to keep searching backwards until it finds a
non-blank line after trimming. This lets it handle the trailing comma
case properly, as if the comment were never there.

Fixes #14041.
2014-05-09 23:51:30 -07:00
Alex Crichton
3f5e3af838 Register new snapshots 2014-05-09 21:13:02 -07:00
bors
5b4774dafc auto merge of #14065 : alexcrichton/rust/ignore-flaky-windows-test, r=brson
See #14064 for some rationale, but the basic idea is that I suspect that there
is an LLVM codegen bug somewhere, and I'm not entirely sure why it's happening
intermittently rather than deterministically...

cc #14064
2014-05-09 20:31:31 -07:00
bors
fb8773463a auto merge of #14063 : TeXitoi/rust/shootout-meteor-improvement, r=pcwalton
- 5-10% of raw speedup
- parallelization of the search
2014-05-09 18:36:29 -07:00
bors
e3c62a20c3 auto merge of #14057 : kballard/rust/remove_no-bounds, r=sfackler
Printing <no-bounds> on trait objects comes from a time when trait
objects had a non-empty default bounds set. As they no longer have any
default bounds, printing <no-bounds> is just noise.
2014-05-09 16:41:47 -07:00
bors
3d6cf1d525 auto merge of #14055 : nikomatsakis/rust/issue-5527-use-substs-in-trans, r=pcwalton
Code to use `ty::substs` in trans. As part of this, uncovered (and fixed) issue #14050.

r? @pcwalton
2014-05-09 14:51:38 -07:00
Alex Crichton
620b4352f2 doc: Fix some broken links 2014-05-09 14:42:12 -07:00
Alex Crichton
1ba4971ab8 rustdoc: Hyperlink cross-crate reexports
This should improve the libcore experience quite a bit when looking at the
libstd documentation.
2014-05-09 14:42:12 -07:00
bors
66f4f558cb auto merge of #14054 : luqmana/rust/at, r=alexcrichton
`/data/local/tmp` seems to be more common.
2014-05-09 12:56:35 -07:00
bors
47ecc2e889 auto merge of #14046 : alexcrichton/rust/ignore-a-test-on-freebsd, r=kballard
This test runs successfully manually, but the bots are having trouble getting
this test to pass. Ignore it on freebsd for now.
2014-05-09 11:01:42 -07:00
Edward Wang
0f25aad746 Rename Pod to Copy
Some error messages still use the word `Pod` instead of `Copy`. Renames
them.
2014-05-10 02:01:29 +08:00
Alex Crichton
300109e5eb serialize: Ignore two flaky json tests on windows
See #14064 for some rationale, but the basic idea is that I suspect that there
is an LLVM codegen bug somewhere, and I'm not entirely sure why it's happening
intermittently rather than deterministically...

cc #14064
2014-05-09 09:49:30 -07:00
bors
58d540f0c6 auto merge of #14053 : FlaPer87/rust/master, r=huonw
This patch allows for using derivings for `kinds` in libcore

r? @alexcrichton
2014-05-09 09:11:35 -07:00
Guillaume Pinot
3fa293c10f shootout-meteor improvement
- 5-10% of raw speedup
- parallelization of the search
2014-05-09 17:39:00 +02:00
bors
176df98a19 auto merge of #14044 : hirschenberger/rust/lint_mut_match, r=alexcrichton
fixing #13866
2014-05-09 06:26:33 -07:00
bors
65205652b8 auto merge of #14043 : sanxiyn/rust/attr-reference, r=alexcrichton
Attribute grammar in reference manual allowed `#[foo, bar]`, which does not match parser behavior.

Also rename nonterminals to match parser code.

Fix #13825.
2014-05-09 04:36:33 -07:00
Niko Matsakis
ed7c849057 Currently trans uses Vec<ty::t> to represent substitutions instead of a proper
ty::substs struct. This is a holdover from the olden days of yore. This patch
removes the last vestiges of that practice. This is part of the work
I was doing on #5527.
2014-05-09 05:56:44 -04:00
Niko Matsakis
b6c9dbd3e4 Check lifetime parameters when we do check for supertrait impls. Fixes #14050. 2014-05-09 05:55:42 -04:00
Niko Matsakis
fa43727781 Rename resolve_regions to resolve_regions_and_report_errors 2014-05-09 05:55:42 -04:00
bors
52002154c7 auto merge of #14035 : alexcrichton/rust/experimental, r=huonw
This was intended as part of the I/O timeouts commit, but it was mistakenly
forgotten. The type of the timeout argument is not guaranteed to remain constant
into the future.
2014-05-09 02:41:36 -07:00
bors
ab369c4353 auto merge of #14025 : tbrooks8/rust/big_uint_doc, r=alexcrichton
I changed the documentation for the BigUint to reflection the deprecation of ~[T] in favor of Vec<T>.
2014-05-09 00:51:35 -07:00
bors
fcf25ae83d auto merge of #14019 : brson/rust/docs, r=alexcrichton
Just small bits of polish.
2014-05-08 23:01:40 -07:00
Kevin Ballard
33cc0efa3d Remove <no-bounds> on trait objects
Printing <no-bounds> on trait objects comes from a time when trait
objects had a non-empty default bounds set. As they no longer have any
default bounds, printing <no-bounds> is just noise.
2014-05-08 21:37:57 -07:00
bors
a990920c6f auto merge of #13963 : kballard/rust/remove_owned_vec_from_iterator, r=pcwalton
With `~[T]` no longer growable, the `FromIterator` impl for `~[T]` doesn't make
much sense. Not only that, but nearly everywhere it is used is to convert from
a `Vec<T>` into a `~[T]`, for the sake of maintaining existing APIs. This turns
out to be a performance loss, as it means every API that returns `~[T]`, even a
supposedly non-copying one, is in fact doing extra allocations and memcpy's.
Even `&[T].to_owned()` is going through `Vec<T>` first.

Remove the `FromIterator` impl for `~[T]`, and adjust all the APIs that relied
on it to start using `Vec<T>` instead. This includes rewriting
`&[T].to_owned()` to be more efficient, among other performance wins.

Also add a new mechanism to go from `Vec<T>` -> `~[T]`, just in case anyone
truly needs that, using the new trait `FromVec`.

[breaking-change]
2014-05-08 21:01:42 -07:00
bors
c0a25e4fdc auto merge of #14001 : alexcrichton/rust/issue-11680, r=pcwalton
The code in resolve erroneously assumed that private enums weren't visited, so
the logic was adjusted to check to see if the enum definition itself was public.

Closes #11680
2014-05-08 19:12:05 -07:00
Kevin Ballard
0381ad4fdf vim: Fix an indentation issue with cindent
cindent handles the following case incorrectly:

impl X {
    b: int,
    //
    c: int,
}

if you try and insert a new line after the `c` declaration.

To fix this, fix the get_line_trimmed() function to work properly, and
then extend GetRustIndent to keep searching backwards until it finds a
non-blank line after trimming. This lets it handle the trailing comma
case properly, as if the comment were never there.

Fixes #14041.
2014-05-08 19:04:23 -07:00
bors
74172341aa auto merge of #14010 : richo/rust/tests/11493, r=alexcrichton
Is this what you had in mind?

Closes #11493
2014-05-08 17:16:43 -07:00
Luqman Aden
b55423a852 libstd: Check TMPDIR for android as well and if not set use '/data/local/tmp' instead of '/data/tmp'. 2014-05-08 19:53:04 -04:00