Commit Graph

22779 Commits

Author SHA1 Message Date
Alex Crichton af3b132285 syntax: Remove usage of fmt! 2013-09-30 23:21:19 -07:00
Alex Crichton 7e709bfd0d extra: Remove usage of fmt! 2013-09-30 23:21:18 -07:00
Alex Crichton a8ba31dbf3 std: Remove usage of fmt! 2013-09-30 23:21:18 -07:00
Alex Crichton aaf6cc3a84 Prevent leakage of fmt! into the compiler
We're not outright removing fmt! just yet, but this prevents it from leaking
into the compiler further (it's still turned on by default for all other code).
2013-09-30 23:21:18 -07:00
bors 1dbc467fd9 auto merge of #9643 : thestinger/rust/immediate, r=alexcrichton 2013-09-30 21:51:27 -07:00
Daniel Micay ab0a884a73 fix dropping non-primitive immediates
Closes #9446
2013-10-01 00:38:37 -04:00
David Creswick 4dd3ccb7ef Add test for issue #9446. 2013-09-30 22:39:53 -04:00
bors bc6dd906a9 auto merge of #9640 : catamorphism/rust/rustpkg-test-fix, r=alexcrichton
r? @alexcrichton test output may contain color codes, so check for several small strings
instead of one big one.
2013-09-30 17:46:25 -07:00
Tim Chevalier 2ec2d7dd23 rustpkg: Make test_rustpkg_test_output more permissive
test output may contain color codes, so check for several small strings
instead of one big one.
2013-09-30 17:35:47 -07:00
Daniel Micay 11b7109b7b rm only use of type_is_immediate outside of trans 2013-09-30 18:16:35 -04:00
bors 7ddcd2a745 auto merge of #9628 : alexcrichton/rust/tidy-binaries, r=thestinger
Closes #9621
2013-09-30 15:06:23 -07:00
bors 5c016857b7 auto merge of #9635 : catamorphism/rust/issue-7999, r=catamorphism
Closes #7999
2013-09-30 13:36:32 -07:00
Tim Chevalier 60eb04aea9 testsuite: Un-xfail unit-like-struct-drop-run on Windows
Closes #7999
2013-09-30 13:30:19 -07:00
bors 5011bbfbb6 auto merge of #9630 : blake2-ppc/rust/de-at-smaller, r=huonw
This is mostly an incremental change, picking off some uses of
@- or @mut-pointers that can be replaced by references.

Almost all of the builder functions in trans::build are updated,
mostly using `&Block` arguments instead of `@mut Block`.
2013-09-30 10:41:20 -07:00
blake2-ppc f4d8d8c122 trans::build: Change @mut Block to &Block or &mut Block
Use &mut Block and &Block references where possible in the builder
functions in trans::build.

@mut Block remains in a few functions where I could not (not yet at
least) track down the runtime borrowck failures.
2013-09-30 19:37:22 +02:00
blake2-ppc b88517ec93 trans: Change @ast::Pat and @mut CrateContext in a few places
Use borrowed references in a few locations that were encountered when
working on other changes.
2013-09-30 19:37:17 +02:00
blake2-ppc 948b5ab87a trans: Change @ast::Expr -> &ast::Expr where possible 2013-09-30 19:37:17 +02:00
Alex Crichton d29b3ac8a7 Expand tidy to prevent binaries from being checked
Closes #9621
2013-09-30 10:15:47 -07:00
bors 8174618a05 auto merge of #9619 : toffaletti/rust/mmap, r=huonw 2013-09-30 05:01:23 -07:00
bors aafad43ae9 auto merge of #9616 : klutzy/rust/win32-uv-test, r=huonw
Closes #8815.
2013-09-30 03:41:19 -07:00
bors ca2d5965d1 auto merge of #9614 : blake2-ppc/rust/lang-item-iter, r=alexcrichton
Cleanup in middle::lang_items

Use static string keys in the lang item hashmap, and convert
the traversal function to be an iterator.
2013-09-30 01:56:23 -07:00
Jason Toffaletti b617569583 reduce heap allocations for MemoryMap 2013-09-29 23:05:40 -07:00
klutzy f4f6b951d7 std::rt::uv::net: Enable tests on Win32
Closes #8815.
2013-09-30 13:56:55 +09:00
blake2-ppc abcca1c7d1 rustc: Convert lang_item to use an iterator 2013-09-30 05:13:04 +02:00
blake2-ppc 8e69c05b7c rustc: Convert lang_items hashmap to use &'static str keys 2013-09-30 05:13:04 +02:00
bors 80b6056f5d auto merge of #9612 : alexcrichton/rust/rc-crate2, r=huonw
This patch exposes actual ownership of an `ast::Crate` structure so it's not implicitly copied and reference counted via `@`.

The main purpose for this patch was to get rid of the massive spike in memory during the start of the compiler (this can be seen on isrustfastyet). The reason that this spike exists is that during `phase_2` we're creating many copies of the crate by folding. Because these are reference counted, all instances of the old crates aren't dropped until the end of the function, which is why so much memory is accumulated.

This patch exposes true ownership of the crate, meaning that it will be destroyed ASAP when requested. There are no code changes except for dealing with actual ownership of the crate. The large spike is then avoided: http://i.imgur.com/IO3NENy.png

This shouldn't help our overall memory usage (that still is the highest at the end), but if we ever manage to bring that down it should help us not have a 1GB spike at the beginning of compilation.

(This was to un-stuck bors (hopefully).)
2013-09-29 20:06:13 -07:00
bors 0fd8cb07c1 auto merge of #9609 : alexcrichton/rust/fix-logging-newline, r=catamorphism
Forgot to do this when I was refactoring logging :(
2013-09-29 17:56:13 -07:00
Alex Crichton 7b18976f08 Remove all usage of @ast::Crate 2013-09-29 16:21:25 -07:00
Alex Crichton 22ef7e72f4 Require &Crate instead of @Crate
This help enable some later refactorings.
2013-09-29 16:21:25 -07:00
bors 727d4c306c auto merge of #9603 : sfackler/rust/rustpkg-test, r=catamorphism
Previously, if tests failed, you'd only get stderr which isn't very
useful, especially if the failure didn't happen directly in a test
function (e.g None.unwrap()).
2013-09-29 16:21:13 -07:00
Alex Crichton c687f6fa92 Put a newline after each logging message 2013-09-29 12:39:49 -07:00
Steven Fackler c685e0879c Don't redirect output in rustpkg test
Previously, if tests failed, you'd only get stderr which isn't very
useful, especially if the failure didn't happen directly in a test
function (e.g None.unwrap()).
2013-09-28 22:12:24 -07:00
bors 9883a6250b auto merge of #9589 : thestinger/rust/tutorial, r=alexcrichton 2013-09-28 16:21:04 -07:00
bors 92e7bb67a8 auto merge of #9542 : pnkfelix/rust/fsk-fix-issue-9531, r=thestinger
r? strcat 

(please double check that it fixes things on your chroot, if possible, before approval)

Fix #9531
2013-09-28 15:01:38 -07:00
Daniel Micay 6c8e6aad73 tutorial: rewrite the sections on boxes/moves 2013-09-28 17:01:46 -04:00
bors 9cc11ca6a3 auto merge of #9577 : alexcrichton/rust/rustdoc, r=cmr
They're getting smaller each time though!

The highlight of this round is source files in documentation. Still trying to figure out the best syntax-highlighting solution.
2013-09-28 13:46:11 -07:00
Alex Crichton 88866a4c20 rustdoc: Show type parameters on external paths
This removes the internal type representation of an `External` type and instead
relies on passing around DefId structures and interpreting them accordingly.

Progress on #9539, but there's still the problem of a crate => url mapping.
2013-09-28 13:43:43 -07:00
bors c635fba748 auto merge of #9583 : blake2-ppc/rust/connect-vec, r=huonw
std::vec: Sane implementations for connect_vec and concat_vec

Avoid unnecessary copying of subvectors, and calculate the needed space
beforehand. These implementations are simple but better than the
previous.

Also only implement it once, for all `Vector<T>` using:

    impl<'self, T: Clone, V: Vector<T>> VectorVector<T> for &'self [V]

Closes #9581
2013-09-28 07:31:02 -07:00
bors 058a5d97a2 auto merge of #9459 : eliovir/rust/patch-1, r=bstrie
change formula (other solution could be using abs()).
2013-09-28 05:26:04 -07:00
bors 4d81e38512 auto merge of #9574 : FlaPer87/rust/suppress_warnings, r=metajack
Small change that suppresses a warning because of an unused import.
2013-09-27 23:51:03 -07:00
bors c151d371fc auto merge of #9562 : alexcrichton/rust/snapshots, r=thestinger 2013-09-27 21:56:04 -07:00
blake2-ppc 3709aa78d8 std::vec: Remove functions concat, connect
std::vec::{concat, connect, concat_slices, connect_slices} are replaced
by the already existing trait methods .concat_vec() and .connect_vec().
2013-09-28 05:56:49 +02:00
bors 4a2f8ba8c9 auto merge of #9559 : sfackler/rust/more-visibility, r=alexcrichton 2013-09-27 20:31:05 -07:00
blake2-ppc 24a4d0daf0 std::vec: Sane implementations for connect_vec and concat_vec
Avoid unnecessary copying of subvectors, and calculate the needed space
beforehand. These implementations are simple but better than the
previous.

Also only implement it once, for all `Vector<T>` using:

    impl<'self, T: Clone, V: Vector<T>> VectorVector<T> for &'self [V]

performance improved according to the bench test:

    before
    test vec::bench::concat ... bench: 74818 ns/iter (+/- 408)
    test vec::bench::connect ... bench: 87066 ns/iter (+/- 376)

    after
    test vec::bench::concat ... bench: 17724 ns/iter (+/- 126)
    test vec::bench::connect ... bench: 18353 ns/iter (+/- 691)

Closes #9581
2013-09-28 05:25:18 +02:00
blake2-ppc 5444f601dc std::vec: Add benchmark for .concat_vec and .connect_vec 2013-09-28 04:53:46 +02:00
bors 3ae895360c auto merge of #9557 : blake2-ppc/rust/vec-lifetime-token, r=thestinger
std::vec: Use a valid value as lifetime dummy in iterator

The current implementation uses `&v[0]` for the lifetime struct field,
but that is a dangling pointer for iterators derived from zero-length
slices.

Example:

    let v: [int, ..0] = [];  println!("{:?}", v.iter())

    std::vec::VecIterator<,int>{ptr: (0x7f3768626100 as *()), end: (0x7f3768626100 as *()), lifetime: &139875951207128}

To replace this parameter, use a field of type `Option<&'self ()>`
that is simply initialized with `None`, but still allows the iterator to
have a lifetime parameter.
2013-09-27 19:16:05 -07:00
bors 6828d2e018 auto merge of #9556 : alexcrichton/rust/less-at-mut, r=luqmana
Instead use &mut everywhere as much as possible and then reorganize lots of code
to get past the borrow checker.
2013-09-27 17:56:06 -07:00
Alex Crichton 8973d7c3f5 mk: Don't require pandoc to run rustdoc 2013-09-27 16:54:45 -07:00
Alex Crichton dd8d565083 rustdoc: Include source files with documentation
All items have source links back to their actual code. Source files can be
omitted with the doc(html_no_source) attribute on the crate. Currently there is
no syntax highlighting, but that will come with syntax highlighting with all
other snippets.

Closes #2072
2013-09-27 16:54:19 -07:00
bors cde44ea288 auto merge of #9553 : brson/rust/lesscxx, r=thestinger 2013-09-27 16:16:03 -07:00