]> git.lizzy.rs Git - rust.git/log
rust.git
11 years agolibrustc: Have destructor run for unit-like structs.
Luqman Aden [Sat, 1 Jun 2013 21:39:39 +0000 (17:39 -0400)]
librustc: Have destructor run for unit-like structs.

11 years agoauto merge of #6871 : pcwalton/rust/de-pub-impl, r=pcwalton
bors [Sat, 1 Jun 2013 16:37:39 +0000 (09:37 -0700)]
auto merge of #6871 : pcwalton/rust/de-pub-impl, r=pcwalton

11 years agoRemove all uses of `pub impl`. rs=style
Patrick Walton [Fri, 31 May 2013 22:17:22 +0000 (15:17 -0700)]
Remove all uses of `pub impl`. rs=style

11 years agolibrustc: Don't require `pub extern` to make extern functions visible
Patrick Walton [Fri, 31 May 2013 18:31:38 +0000 (11:31 -0700)]
librustc: Don't require `pub extern` to make extern functions visible

11 years agoauto merge of #6881 : Aatch/rust/new-passes-2, r=thestinger
bors [Sat, 1 Jun 2013 13:13:40 +0000 (06:13 -0700)]
auto merge of #6881 : Aatch/rust/new-passes-2, r=thestinger

This is a better pipeline, both faster-running and produces faster code.

For some reason the `mergefunc` pass screws over resolve. I have no idea why though.

11 years agoBetter optimization pipeline
James Miller [Sat, 1 Jun 2013 12:08:38 +0000 (00:08 +1200)]
Better optimization pipeline

11 years agoauto merge of #6851 : alexcrichton/rust/bugfixes, r=pcwalton
bors [Sat, 1 Jun 2013 06:10:36 +0000 (23:10 -0700)]
auto merge of #6851 : alexcrichton/rust/bugfixes, r=pcwalton

Closes #5090 by using the excellent new generic deriving code

Promotes the unreachable code attribute to a lint attribute (instead of always being a warning)

Fixes some edge cases when creating hashmaps/hashsets and also when consuming them. (fixes #5998)

11 years agoauto merge of #6876 : cmr/rust/from_elem_opts, r=Aatch
bors [Sat, 1 Jun 2013 05:04:38 +0000 (22:04 -0700)]
auto merge of #6876 : cmr/rust/from_elem_opts, r=Aatch

borrowck 1.85x speedup on libstd

11 years agoOptimize vec::from_elem with manual inlining (borrowck 1.85x speedup on libstd)
Corey Richardson [Sat, 1 Jun 2013 04:55:19 +0000 (00:55 -0400)]
Optimize vec::from_elem with manual inlining (borrowck 1.85x speedup on libstd)

11 years agoauto merge of #6729 : bstrie/rust/ascstr, r=Aatch
bors [Sat, 1 Jun 2013 02:34:41 +0000 (19:34 -0700)]
auto merge of #6729 : bstrie/rust/ascstr, r=Aatch

Formerly this was a free function rather than a method. I've left it in place for now, although redefined it so that it just calls the method.

11 years agoauto merge of #6864 : thestinger/rust/bool, r=pcwalton
bors [Fri, 31 May 2013 23:58:42 +0000 (16:58 -0700)]
auto merge of #6864 : thestinger/rust/bool, r=pcwalton

11 years agoauto merge of #6862 : thestinger/rust/swap, r=bstrie
bors [Fri, 31 May 2013 22:22:45 +0000 (15:22 -0700)]
auto merge of #6862 : thestinger/rust/swap, r=bstrie

I don't like the `util` module in general, and `ptr` is a much better place for these.

11 years agofix tutorial lint warnings
Daniel Micay [Fri, 31 May 2013 17:00:31 +0000 (13:00 -0400)]
fix tutorial lint warnings

11 years agobool: rm functions duplicating methods
Daniel Micay [Fri, 31 May 2013 15:54:15 +0000 (11:54 -0400)]
bool: rm functions duplicating methods

11 years agoAdd as_c_str method on strings
Ben Striegel [Fri, 31 May 2013 22:11:38 +0000 (18:11 -0400)]
Add as_c_str method on strings

11 years agoxfail-fast the deriving test
Alex Crichton [Fri, 31 May 2013 20:44:44 +0000 (14:44 -0600)]
xfail-fast the deriving test

11 years agoauto merge of #6857 : alexcrichton/rust/ebml-fixes, r=pcwalton
bors [Fri, 31 May 2013 18:34:46 +0000 (11:34 -0700)]
auto merge of #6857 : alexcrichton/rust/ebml-fixes, r=pcwalton

Also provides a method of serializing `char`.

11 years agoptr: replace unnecessary unsafe code
Daniel Micay [Fri, 31 May 2013 15:22:51 +0000 (11:22 -0400)]
ptr: replace unnecessary unsafe code

11 years agoauto merge of #6863 : huonw/rust/error-span, r=thestinger
bors [Fri, 31 May 2013 14:43:49 +0000 (07:43 -0700)]
auto merge of #6863 : huonw/rust/error-span, r=thestinger

11 years agorustc: adjust span for error message to not trim last letter
Huon Wilson [Fri, 31 May 2013 14:39:02 +0000 (00:39 +1000)]
rustc: adjust span for error message to not trim last letter

11 years agomv the raw pointer {swap,replace}_ptr to std::ptr
Daniel Micay [Fri, 31 May 2013 14:21:29 +0000 (10:21 -0400)]
mv the raw pointer {swap,replace}_ptr to std::ptr

11 years agoauto merge of #6859 : thestinger/rust/optimize, r=thestinger
bors [Fri, 31 May 2013 13:40:49 +0000 (06:40 -0700)]
auto merge of #6859 : thestinger/rust/optimize, r=thestinger

A workaround to get #6828 through.

11 years agoRemove the slow bb-vectorize pass
James Miller [Thu, 30 May 2013 03:20:02 +0000 (15:20 +1200)]
Remove the slow bb-vectorize pass

11 years agoauto merge of #6853 : bblum/rust/sized, r=pcwalton
bors [Fri, 31 May 2013 09:01:44 +0000 (02:01 -0700)]
auto merge of #6853 : bblum/rust/sized, r=pcwalton

r? @nikomatsakis @pcwalton

11 years agoauto merge of #6833 : fdr/rust/fix-warnings, r=Aatch
bors [Fri, 31 May 2013 07:43:45 +0000 (00:43 -0700)]
auto merge of #6833 : fdr/rust/fix-warnings, r=Aatch

Fix a laundry list of warnings involving unused imports that glutted
up compilation output.  There are more, but there seems to be some
false positives (where 'remedy' appears to break the build), but this
particular set of fixes seems safe.

11 years agoauto merge of #6848 : pcwalton/rust/issue-6352, r=pcwalton
bors [Fri, 31 May 2013 06:31:48 +0000 (23:31 -0700)]
auto merge of #6848 : pcwalton/rust/issue-6352, r=pcwalton

r? @nikomatsakis

11 years agoImplement unimplemented methods in ebml
Alex Crichton [Fri, 31 May 2013 04:42:00 +0000 (23:42 -0500)]
Implement unimplemented methods in ebml

11 years agoRewrite deriving(Decodable, Encodable)
Alex Crichton [Thu, 30 May 2013 21:58:16 +0000 (16:58 -0500)]
Rewrite deriving(Decodable, Encodable)

Now it uses the generic deriving code and should in theory work in all cases.

11 years agoauto merge of #6845 : thestinger/rust/zsh-complete, r=graydon
bors [Fri, 31 May 2013 04:34:47 +0000 (21:34 -0700)]
auto merge of #6845 : thestinger/rust/zsh-complete, r=graydon

I'll do the other commands and the `rust` wrapper later.

![sample completion](http://i.imgur.com/Y1IFCWi.png)

11 years agoauto merge of #6841 : steveklabnik/rust/range_docs, r=thestinger
bors [Fri, 31 May 2013 03:28:48 +0000 (20:28 -0700)]
auto merge of #6841 : steveklabnik/rust/range_docs, r=thestinger

11 years agoauto merge of #6818 : nikomatsakis/rust/irrefut-patterns-refactoring, r=graydon
bors [Fri, 31 May 2013 02:04:52 +0000 (19:04 -0700)]
auto merge of #6818 : nikomatsakis/rust/irrefut-patterns-refactoring, r=graydon

Various bug fixes and simplifications I did as part of a patch to fix `let` patterns.

r? @catamorphism

11 years agoFix a bug with HashMap::consume
Alex Crichton [Thu, 30 May 2013 17:03:11 +0000 (12:03 -0500)]
Fix a bug with HashMap::consume

11 years agoPromote unreachable code to being a lint attribute
Alex Crichton [Thu, 30 May 2013 08:03:32 +0000 (03:03 -0500)]
Promote unreachable code to being a lint attribute

11 years agoAdd simple tests for Sized
Ben Blum [Fri, 31 May 2013 01:40:55 +0000 (21:40 -0400)]
Add simple tests for Sized

11 years agoHighlight Sized in vim and kate
Ben Blum [Fri, 31 May 2013 01:39:46 +0000 (21:39 -0400)]
Highlight Sized in vim and kate

11 years agoAdd 'Sized' builtin kind; doesn't do anything yet
Ben Blum [Fri, 31 May 2013 00:03:01 +0000 (20:03 -0400)]
Add 'Sized' builtin kind; doesn't do anything yet

11 years agolibrustc: Bump the offset when translating const structs. Closes #6352.
Patrick Walton [Fri, 31 May 2013 00:08:49 +0000 (17:08 -0700)]
librustc: Bump the offset when translating const structs. Closes #6352.

11 years agoFix parser test
Niko Matsakis [Fri, 31 May 2013 01:01:25 +0000 (21:01 -0400)]
Fix parser test

11 years agoauto merge of #6689 : graydon/rust/issue-5661-doc-test-targets, r=graydon
bors [Fri, 31 May 2013 00:22:49 +0000 (17:22 -0700)]
auto merge of #6689 : graydon/rust/issue-5661-doc-test-targets, r=graydon

Re-enables `make check-stage2-doc-tutorial` and friends. r? @brson

11 years agoauto merge of #6340 : graydon/rust/issue-2994, r=graydon
bors [Thu, 30 May 2013 23:04:47 +0000 (16:04 -0700)]
auto merge of #6340 : graydon/rust/issue-2994, r=graydon

11 years agoadd a zsh completion file for rustc
Daniel Micay [Thu, 30 May 2013 22:52:23 +0000 (18:52 -0400)]
add a zsh completion file for rustc

11 years agofix the check-stageN-doc-$doc targets, close #5661
Graydon Hoare [Wed, 22 May 2013 23:17:37 +0000 (16:17 -0700)]
fix the check-stageN-doc-$doc targets, close #5661

11 years agoauto merge of #6836 : pnkfelix/rust/fsk-issue6805-ccache-rewrite-basedir, r=catamorphism
bors [Thu, 30 May 2013 21:58:47 +0000 (14:58 -0700)]
auto merge of #6836 : pnkfelix/rust/fsk-issue6805-ccache-rewrite-basedir, r=catamorphism

Attempt to get reuse of common object code from multiple clones in different directories.

This is a followup to issue #6805.

11 years agoAdd example for uint::range_step.
Steve Klabnik [Thu, 30 May 2013 21:35:07 +0000 (14:35 -0700)]
Add example for uint::range_step.

11 years agoCorrect issue-2804 test
Niko Matsakis [Thu, 30 May 2013 20:55:50 +0000 (16:55 -0400)]
Correct issue-2804 test

11 years agorustc: change 'use' to 'add' in error message, fix #2994
Graydon Hoare [Wed, 8 May 2013 19:52:07 +0000 (12:52 -0700)]
rustc: change 'use' to 'add' in error message, fix #2994

11 years agoRemove unnecessary 'use' forms
Daniel Farina [Thu, 30 May 2013 10:16:33 +0000 (03:16 -0700)]
Remove unnecessary 'use' forms

Fix a laundry list of warnings involving unused imports that glutted
up compilation output.  There are more, but there seems to be some
false positives (where 'remedy' appears to break the build), but this
particular set of fixes seems safe.

11 years agoauto merge of #6835 : cmr/rust/clang, r=thestinger
bors [Thu, 30 May 2013 19:41:09 +0000 (12:41 -0700)]
auto merge of #6835 : cmr/rust/clang, r=thestinger

current svn version is 3.4

11 years agoReplace NDM with proper FIXME
Niko Matsakis [Thu, 30 May 2013 00:15:46 +0000 (20:15 -0400)]
Replace NDM with proper FIXME

11 years agoRemove copy bindings from patterns.
Niko Matsakis [Wed, 29 May 2013 23:59:33 +0000 (19:59 -0400)]
Remove copy bindings from patterns.

11 years agoFix matching of rvalues with destructors
Niko Matsakis [Wed, 29 May 2013 22:33:30 +0000 (18:33 -0400)]
Fix matching of rvalues with destructors

Fixes #4542.

11 years agoauto merge of #6831 : Xazax-hun/rust/incoming, r=graydon
bors [Thu, 30 May 2013 17:37:46 +0000 (10:37 -0700)]
auto merge of #6831 : Xazax-hun/rust/incoming, r=graydon

Minor doc enhancement for: https://github.com/mozilla/rust/issues/4543

11 years agobump clang version
Corey Richardson [Thu, 30 May 2013 17:33:52 +0000 (13:33 -0400)]
bump clang version

11 years agoAttempt to get reuse of common code from multiple clones in different directories.
Felix S. Klock II [Thu, 30 May 2013 14:26:12 +0000 (16:26 +0200)]
Attempt to get reuse of common code from multiple clones in different directories.

11 years agoRemove some spurious copies that are identified by later patches
Niko Matsakis [Wed, 29 May 2013 22:10:34 +0000 (18:10 -0400)]
Remove some spurious copies that are identified by later patches

11 years agoRemove local_imm/local_mem since all variables are now by reference
Niko Matsakis [Wed, 29 May 2013 21:44:19 +0000 (17:44 -0400)]
Remove local_imm/local_mem since all variables are now by reference

11 years agoRefactor helper routines to be less tied to match syntax
Niko Matsakis [Wed, 29 May 2013 20:32:07 +0000 (16:32 -0400)]
Refactor helper routines to be less tied to match syntax

11 years agoRemove TrByImplicitRef and source field on datums
Niko Matsakis [Wed, 29 May 2013 19:49:23 +0000 (15:49 -0400)]
Remove TrByImplicitRef and source field on datums

11 years agoMinor grammar fix.
Gábor Horváth [Thu, 30 May 2013 13:26:25 +0000 (15:26 +0200)]
Minor grammar fix.

11 years agoMinor style fix.
Gábor Horváth [Thu, 30 May 2013 13:24:08 +0000 (15:24 +0200)]
Minor style fix.

11 years agoMinor documentation addition.
Gábor Horváth [Thu, 30 May 2013 13:20:30 +0000 (15:20 +0200)]
Minor documentation addition.

11 years agoauto merge of #6829 : dotdash/rust/allocs, r=sanxiyn
bors [Thu, 30 May 2013 11:49:37 +0000 (04:49 -0700)]
auto merge of #6829 : dotdash/rust/allocs, r=sanxiyn

11 years agoRemove a bunch of unnecessary allocations and copies
Björn Steinbrink [Wed, 29 May 2013 18:10:16 +0000 (20:10 +0200)]
Remove a bunch of unnecessary allocations and copies

11 years agoauto merge of #6798 : alexcrichton/rust/doc-lints, r=pcwalton
bors [Thu, 30 May 2013 07:37:35 +0000 (00:37 -0700)]
auto merge of #6798 : alexcrichton/rust/doc-lints, r=pcwalton

These commits perform a variety of actions:

1. The linting of missing documentation has been consolidated under one `missing_doc` attribute, and many more things are linted about.
2. A test was added for linting missing documentation, which revealed a large number of corner cases in both linting and the `missing_doc` lint pass. Some notable edge cases:
  * When compiling with `--test`, all `missing_doc` warnings are suppressed
  * If any parent of the current item has `#[doc(hidden)]`, then the `missing_doc` warning is suppressed
3. Both the std and extra libraries were modified to `#[deny(missing_doc)]` by default.

I believe that the libraries are getting to the point where they're fairly well documented, and they should definitely stay that way. If developing a particular new module, it's easy enough to add `#[allow(missing_doc)]` at the top, but those should definitely be flags for removal in favor of actual documentation.

I added as much documentation as I could throughout std/extra, although I avoided trying to document things that I knew nothing about. I can't say that this lint pass will vouch for the quality of the documentation of std/extra, but it will certainly make sure that there's at least some describing words.

That being said, I may have a different opinion, so I don't mind amending these commits to turn off the lint by default for std/extra if people think otherwise.

11 years agolibextra: Require documentation by default
Alex Crichton [Wed, 29 May 2013 03:11:41 +0000 (22:11 -0500)]
libextra: Require documentation by default

11 years agoRequire documentation by default for libstd
Alex Crichton [Tue, 28 May 2013 21:35:52 +0000 (16:35 -0500)]
Require documentation by default for libstd

Adds documentation for various things that I understand.
Adds #[allow(missing_doc)] for lots of things that I don't understand.

11 years agoAllow doc(hidden) and --test to disable doc linting
Alex Crichton [Tue, 28 May 2013 21:53:43 +0000 (16:53 -0500)]
Allow doc(hidden) and --test to disable doc linting

11 years agoMake missing documentation linting more robust
Alex Crichton [Tue, 28 May 2013 20:44:53 +0000 (15:44 -0500)]
Make missing documentation linting more robust

Add some more cases for warning about missing documentation, and also add a test
to make sure it doesn't die in the future.

11 years agoauto merge of #6825 : caitp/rust/issue-6824, r=Aatch
bors [Thu, 30 May 2013 05:58:35 +0000 (22:58 -0700)]
auto merge of #6825 : caitp/rust/issue-6824, r=Aatch

Show `int_suffix_size` to appear 0 or 1 times
Show `exponent | . dec_lit` to appear 0 or 1 times, to show why `3f;` is a valid number

11 years agoRemove all of the `#[inline(always)]` attributes from bigint
James Miller [Thu, 30 May 2013 03:22:08 +0000 (15:22 +1200)]
Remove all of the `#[inline(always)]` attributes from bigint

11 years agoetc: Fix more check-fast breakage. rs=burningtree
Patrick Walton [Thu, 30 May 2013 05:17:21 +0000 (22:17 -0700)]
etc: Fix more check-fast breakage. rs=burningtree

11 years agoFixes #6824 - Correct scan_number() grammar
Caitlin Potter [Thu, 30 May 2013 04:40:43 +0000 (00:40 -0400)]
Fixes #6824 - Correct scan_number() grammar

Show `int_suffix_size` to appear 0 or 1 times
Show `exponent | . dec_lit` to appear 0 or 1 times, to show why `3f;` is a valid number

11 years agotest: Fix problem with check-fast. rs=burningtree
Patrick Walton [Thu, 30 May 2013 04:21:33 +0000 (21:21 -0700)]
test: Fix problem with check-fast. rs=burningtree

11 years agolibrustc: add some imports to back/passes.rs rs=burningtree
Erick Tryzelaar [Thu, 30 May 2013 03:00:43 +0000 (20:00 -0700)]
librustc: add some imports to back/passes.rs rs=burningtree

11 years agolibrustc: Stop reexporting the standard modules from prelude.
Patrick Walton [Sat, 25 May 2013 02:35:29 +0000 (19:35 -0700)]
librustc: Stop reexporting the standard modules from prelude.

11 years agolibsyntax: Stop parsing mutable fields
Patrick Walton [Fri, 24 May 2013 02:47:38 +0000 (19:47 -0700)]
libsyntax: Stop parsing mutable fields

11 years agolibsyntax: Make `drop` no longer a keyword
Patrick Walton [Fri, 24 May 2013 02:22:53 +0000 (19:22 -0700)]
libsyntax: Make `drop` no longer a keyword

11 years agolibrustc: Redo the unsafe checker and make unsafe methods not callable from safe...
Patrick Walton [Fri, 24 May 2013 02:12:16 +0000 (19:12 -0700)]
librustc: Redo the unsafe checker and make unsafe methods not callable from safe code

11 years agoauto merge of #6799 : Aatch/rust/pass-refactor, r=graydon
bors [Wed, 29 May 2013 23:58:44 +0000 (16:58 -0700)]
auto merge of #6799 : Aatch/rust/pass-refactor, r=graydon

This refactors pass handling to use the argument names, so it can be used
in a similar manner to `opt`. This may be slightly less efficient than the
previous version, but it is much easier to maintain.

It also adds in the ability to specify a custom pipeline on the command
line, this overrides the normal passes, however. This should completely
close #2396.

11 years agoauto merge of #6813 : pnkfelix/rust/fsk-issue-6805-ccache-support, r=catamorphism
bors [Wed, 29 May 2013 22:10:42 +0000 (15:10 -0700)]
auto merge of #6813 : pnkfelix/rust/fsk-issue-6805-ccache-support, r=catamorphism

Fix #6805: add --enable-ccache configure option to prefix compiler invocations with `ccache` to attempt to reuse common results, e.g. for LLVM (re)builds.

The information at developer [Note-ccache](../../wiki/Note-ccache) and at [ccache and clang concerns](http://petereisentraut.blogspot.fr/2011/09/ccache-and-clang-part-2.html) were what drove my introduction of the `-Qunused-arguments` and `CCACHE_CPP2` options.  (Though I did confirm first-hand that at least the first really is necessary.)

Yes, one certainly can re-route how `gcc` and `clang` are resolved in one's PATH and use that as a way to invoke `ccache`.  But I personally do not want to introduce that change to my own PATH, and this seems like a small enough change that it does not hurt to add it, at least for now.  (I don't know what form it would take when we move over to `rustpkg`.)

11 years agoFix #6805: add --enable-ccache configure option to prefix compiler invocations with...
Felix S. Klock II [Wed, 29 May 2013 21:18:09 +0000 (23:18 +0200)]
Fix #6805: add --enable-ccache configure option to prefix compiler invocations with ccache to attempt to reuse common results, e.g. for LLVM (re)builds.

11 years agoauto merge of #6803 : Thiez/rust/native_fmax_fmin, r=brson
bors [Wed, 29 May 2013 20:29:06 +0000 (13:29 -0700)]
auto merge of #6803 : Thiez/rust/native_fmax_fmin, r=brson

Calls to the libc versions of fmin and fmax were relatively slow (perhaps because they could not be inlined?). This pull request provides f32 and f64 with fmin and fmax written in Rust, and shows a significant speed increase on my system; I used https://github.com/thiez/rustray as my benchmark, with --opt-level 3 it brings the ray-tracing time down from 10.8 seconds to about 9.2, which seemed significant to me.

r?

11 years agoauto merge of #6733 : alexcrichton/rust/issue-2400, r=brson
bors [Wed, 29 May 2013 19:13:49 +0000 (12:13 -0700)]
auto merge of #6733 : alexcrichton/rust/issue-2400, r=brson

Most of the relevant information can be found in the commit messages.

r? @brson - I just wanted to make sure the make changes aren't completely bogus

This would close #2400, #6517, and #6489 (although a run through incoming-full on linux would have to confirm the latter two)

11 years agoChanged to a more efficient implementation.
Matthijs Hofstra [Wed, 29 May 2013 18:21:04 +0000 (20:21 +0200)]
Changed to a more efficient implementation.

11 years agoauto merge of #6800 : june0cho/rust/issue5984, r=pcwalton
bors [Wed, 29 May 2013 17:55:53 +0000 (10:55 -0700)]
auto merge of #6800 : june0cho/rust/issue5984, r=pcwalton

Fix #5984.
Resolve the problem which exists in #6780.

11 years agoReplaced calls to external fmin/fmax by a Rust implementation.
Matthijs Hofstra [Wed, 29 May 2013 14:21:29 +0000 (16:21 +0200)]
Replaced calls to external fmin/fmax by a Rust implementation.

11 years agoauto merge of #6796 : sfackler/rust/FromBase64-type-fix, r=bstrie
bors [Wed, 29 May 2013 15:49:53 +0000 (08:49 -0700)]
auto merge of #6796 : sfackler/rust/FromBase64-type-fix, r=bstrie

Previously, FromBase64 was only implemented on ~[u8] and ~str when
any pointer would do. The implementations of FromBase64 are now
consistent with the implementations of ToBase64.

11 years agoauto merge of #6794 : thestinger/rust/align_zero, r=pcwalton
bors [Wed, 29 May 2013 14:32:06 +0000 (07:32 -0700)]
auto merge of #6794 : thestinger/rust/align_zero, r=pcwalton

This is unlikely to alter optimized codegen much but there's no point in downgrading the known alignment to 1.

11 years agoFurther refactor optimization pass handling
James Miller [Wed, 29 May 2013 08:08:20 +0000 (20:08 +1200)]
Further refactor optimization pass handling

This refactors pass handling to use the argument names, so it can be used
in a similar manner to `opt`. This may be slightly less efficient than the
previous version, but it is much easier to maintain.

It also adds in the ability to specify a custom pipeline on the command
line, this overrides the normal passes, however. This should completely
close #2396.

11 years agoauto merge of #6793 : graydon/rust/drop-ast-before-llvm, r=Aatch
bors [Wed, 29 May 2013 07:52:47 +0000 (00:52 -0700)]
auto merge of #6793 : graydon/rust/drop-ast-before-llvm, r=Aatch

11 years agoauto merge of #6789 : luqmana/rust/compiletest-fix, r=thestinger
bors [Wed, 29 May 2013 06:34:48 +0000 (23:34 -0700)]
auto merge of #6789 : luqmana/rust/compiletest-fix, r=thestinger

Can be removed after a snapshot I believe.

11 years agoFix vec::mut_slice
june0cho [Wed, 29 May 2013 05:56:21 +0000 (14:56 +0900)]
Fix vec::mut_slice

11 years agoauto merge of #6784 : nikomatsakis/rust/moves-into-borrowck, r=pcwalton
bors [Wed, 29 May 2013 05:16:50 +0000 (22:16 -0700)]
auto merge of #6784 : nikomatsakis/rust/moves-into-borrowck, r=pcwalton

Move the computation of what data is moved out of `liveness` and into `borrowck`. The resulting code is cleaner, since before we had a split distribution of responsibilities, and also this avoids having multiple implementations of the dataflow code. Liveness is still used to report warnings about useless writes. This will go away when we get the control-flow graph code landed (working on that).

Also adds borrow checker documentation.

Fixes #4384.
Required to support once fns and to properly fix closures (#2202).
First step to generalize our treatment of moves somewhat as well.

11 years agoauto merge of #6778 : Aatch/rust/pass-refactor, r=graydon
bors [Wed, 29 May 2013 04:01:53 +0000 (21:01 -0700)]
auto merge of #6778 : Aatch/rust/pass-refactor, r=graydon

Refactor the optimization passes to explicitly use the passes. This commit just re-implements the same passes as were already being run.

It also adds an option (behind `-Z`) to run the LLVM lint pass on the unoptimized IR.

This should close #2812. It is also the first step towards #2396

----------------

This is pretty much just an initial "get it out there" PR. With finer control over the optimization passes coming later. I also just blindly copied the passes we were already doing, so there could almost certainly be some more work in paring it down.

The other thing is the addition of the `mergefunctions` pass, which is currently enabled at `--opt-level=3` and does have a small impact on the code size. However the fact that it is at the end of the optimization pipeline is probably not ideal, so some more experimentation is in order.

11 years agoRemove extraneous defs from export file
James Miller [Wed, 29 May 2013 03:15:42 +0000 (15:15 +1200)]
Remove extraneous defs from export file

11 years agoauto merge of #6780 : june0cho/rust/issue5984, r=brson
bors [Wed, 29 May 2013 02:58:52 +0000 (19:58 -0700)]
auto merge of #6780 : june0cho/rust/issue5984, r=brson

Fix #5984. Also, I found a problem on type inference and left a comment.

11 years agoUn-ignore rusti/rustpkg tests on i686
Alex Crichton [Sat, 25 May 2013 06:04:28 +0000 (01:04 -0500)]
Un-ignore rusti/rustpkg tests on i686

11 years agoDefine rustc's host triple at compile time
Alex Crichton [Sat, 25 May 2013 06:05:31 +0000 (01:05 -0500)]
Define rustc's host triple at compile time

This way a cross-compiled rustc's answer to host_triple() is correct. The return
value of host_triple() reflects the actual host triple that the compiler was
build for, not the triple the compiler is being built on

11 years agoRemove now-unused import
James Miller [Wed, 29 May 2013 02:07:51 +0000 (14:07 +1200)]
Remove now-unused import

11 years agoRemove passes that were causing bad optmizations
James Miller [Wed, 29 May 2013 01:12:36 +0000 (13:12 +1200)]
Remove passes that were causing bad optmizations