summary refs log tree commit diff
path: root/src/librustc/driver
AgeCommit message (Collapse)AuthorLines
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-9/+6
2013-06-29auto merge of #7244 : bblum/rust/once, r=nikomatsakisbors-25/+30
@graydon suggested that once closures not be part of the language for 1.0, but that they might be hidden behind a -Z compile flag as an "experimental feature" in case people decide they need them. Regardless of whether ```-Z once-fns``` is set, this PR will parse the ```once``` keyword and will prevent closures labelled with it from being called more than once. It will also permit moving out of captured vars in heap closures, just to let the runtime writers stop using ```Cell``` sooner. Setting ```-Z once-fns``` only toggles whether the move-out-from-capture privilege is also given for stack closures. r? @nikomatsakis
2013-06-28librustc: Fix merge fallout and test cases.Patrick Walton-2/+6
2013-06-28librustc: Rewrite reachability and forbid duplicate methods in type ↵Patrick Walton-4/+14
implementations. This should allow fewer symbols to be exported.
2013-06-27auto merge of #7429 : Blei/rust/delete-shared, r=huonwbors-14/+12
Mostly just low-haning fruit, i.e. function arguments that were @ even though & would work just as well. Reduces librustc.so size by 200k when compiling without -O, by 100k when compiling with -O.
2013-06-27Remove many shared pointersPhilipp Brüschweiler-14/+12
Mostly just low-haning fruit, i.e. function arguments that were @ even though & would work just as well. Reduces librustc.so size by 200k when compiling without -O, by 100k when compiling with -O.
2013-06-27auto merge of #7403 : catamorphism/rust/package-scripts, r=brsonbors-1/+1
r? @brson (or @graydon if available) rustpkg/api.rs provides functions intended for package scripts to call. It will probably need more functionality added to it later, but this is a start. Added a test case checking that a package script can use the API. Closes #6401
2013-06-26driver: perform stripping before and after macro expansion.Huon Wilson-1/+12
This allows macros to both be conditionally defined, and expand to items with #[cfg]'s.
2013-06-25rustpkg: Begin allowing package scripts to call the default build logicTim Chevalier-1/+1
rustpkg/api.rs provides functions intended for package scripts to call. It will probably need more functionality added to it later, but this is a start. Added a test case checking that a package script can use the API. Closes #6401
2013-06-23Remove intrinsic modulePhilipp Brüschweiler-3/+0
To achieve this, the following changes were made: * Move TyDesc, TyVisitor and Opaque to std::unstable::intrinsics * Convert TyDesc, TyVisitor and Opaque to lang items instead of specially handling the intrinsics module * Removed TypeDesc, FreeGlue and get_type_desc() from sys Fixes #3475.
2013-06-23vec: remove BaseIter implementationDaniel Micay-6/+6
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-21Remove all #[cfg(stage0)]-protected codeJames Miller-19/+0
New snapshot means this can all go. Also removes places that have comments that say they are workarounds for stage0 errors.
2013-06-19Hide the once-move-out privilege for stack fns behind '-Z once-fns'Ben Blum-25/+30
2013-06-16auto merge of #7157 : sstewartgallus/rust/master, r=brsonbors-47/+39
I did a little bit of cleanup work in driver.rs. It's not much but hey little steps.
2013-06-16Fix Merge FalloutJames Miller-78/+78
2013-06-15Fix up mingw32 caseSteven Stewart-Gallus-0/+1
2013-06-15auto merge of #7125 : alexcrichton/rust/rusti-issues, r=brsonbors-5/+5
This un-reverts the reverts of the rusti commits made awhile back. These were reverted for an LLVM failure in rustpkg. I believe that this is not a problem with these commits, but rather that rustc is being used in parallel for rustpkg tests (in-process). This is not working yet (almost! see #7011), so I serialized all the tests to run one after another. @brson, I'm mainly just guessing as to the cause of the LLVM failures in rustpkg tests. I'm confident that running tests in parallel is more likely to be the problem than those commits I made. Additionally, this fixes two recently reported issues with rusti.
2013-06-15Cleaned up driver.rsSteven Stewart-Gallus-47/+38
2013-06-14add IteratorUtil to the preludeDaniel Micay-1/+0
2013-06-13Revert "Revert "Have JIT execution take ownership of the LLVMContextRef""Alex Crichton-5/+5
This reverts commit 19adece68b00bd1873499cca6f1537750608d769.
2013-06-13Revert "Have JIT execution take ownership of the LLVMContextRef"Brian Anderson-5/+5
This reverts commit 5c5095d25e3652c434c8d4ec178e6844877e3c2d. Conflicts: src/librusti/rusti.rc
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-56/+56
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-06-12std: convert str::replace to a method.Huon Wilson-2/+1
2013-06-12std: remove substr & str::count_*, methodise char_len, implement slice_chars.Huon Wilson-1/+1
The confusing mixture of byte index and character count meant that every use of .substr was incorrect; replaced by slice_chars which only uses character indices. The old behaviour of `.substr(start, n)` can be emulated via `.slice_from(start).slice_chars(0, n)`.
2013-06-12std: convert {vec,str}::to_owned to methods.Huon Wilson-2/+2
2013-06-10Have JIT execution take ownership of the LLVMContextRefAlex Crichton-5/+5
Also stop leaking the ExecutionEngine created for jit code by forcibly disposing of it after the JIT code has finished executing
2013-06-10std: remove str::{connect,concat}*.Huon Wilson-2/+2
2013-06-10std: remove str::contains in favour of the methodHuon Wilson-15/+15
2013-06-10std: replace str::each_split* with an iteratorHuon Wilson-11/+5
2013-06-05token_to_ident takes argument by referenceJohn Clements-1/+1
2013-06-05interner just uses uints, not idents with syntax contextJohn Clements-2/+7
2013-06-05removed some interner fieldsJohn Clements-7/+9
2013-06-05rust::driver: remove accidental double freevar calculationPhilipp Brüschweiler-3/+0
2013-06-01rustc/rusti/rustpkg: Infer packages from `extern mod` directivesTim Chevalier-123/+156
This commit won't be quite as useful until I implement RUST_PATH and until we change `extern mod` to take a general string instead of an identifier (#5682 and #6407). With that said, now if you're using rustpkg and a program contains: extern mod foo; rustpkg will attempt to search for `foo`, so that you don't have to provide a -L directory explicitly. In addition, rustpkg will actually try to build and install `foo`, unless it's already installed (specifically, I tested that `extern mod extra;` would not cause it to try to find source for `extra` and compile it again). This is as per #5681. Incidentally, I changed some driver code to infer the link name from the crate link_meta attributes. If that change isn't ok, say something. Also, I changed the addl_lib_search_paths field in the session options to be an @mut ~[Path] so that it can be modified after expansion but before later phases.
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-41/+45
2013-05-30Remove copy bindings from patterns.Niko Matsakis-4/+4
2013-05-29librustc: Redo the unsafe checker and make unsafe methods not callable from ↵Patrick Walton-0/+3
safe code
2013-05-29auto merge of #6799 : Aatch/rust/pass-refactor, r=graydonbors-0/+18
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.
2013-05-29auto merge of #6733 : alexcrichton/rust/issue-2400, r=brsonbors-12/+12
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)
2013-05-29Further refactor optimization pass handlingJames Miller-0/+18
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.
2013-05-29auto merge of #6793 : graydon/rust/drop-ast-before-llvm, r=Aatchbors-51/+54
2013-05-28auto merge of #6784 : nikomatsakis/rust/moves-into-borrowck, r=pcwaltonbors-3/+2
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.
2013-05-28Define rustc's host triple at compile timeAlex Crichton-12/+12
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
2013-05-29Refactor optimization pass handling.James Miller-0/+5
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.
2013-05-28Move checking for moves and initialization of local variables and patterns intoNiko Matsakis-3/+2
borrow checker and generalize what moves are allowed. Fixes a nasty bug or two in the pattern move checking code. Unifies dataflow code used for initialization and other things. First step towards once fns. Everybody wins. Fixes #4384. Fixes #4715. cc once fns (#2202), optimizing local moves (#5016).
2013-05-28librustc: drop AST before running LLVM, frees 400mb on a librustc buildGraydon Hoare-51/+54
2013-05-28Silence various warnings throughout test modulesAlex Crichton-4/+4
2013-05-24show options for -W help and -WLenny222-1/+1
2013-05-23cleanup warnings from librustcErick Tryzelaar-4/+4
2013-05-22librustc: Add some missing `use core::prelude::*;` in the test casesPatrick Walton-0/+2