summary refs log tree commit diff
path: root/src/librustc/driver/session.rs
AgeCommit message (Collapse)AuthorLines
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-2/+1
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-27Remove many shared pointersPhilipp Brüschweiler-1/+1
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-19Hide the once-move-out privilege for stack fns behind '-Z once-fns'Ben Blum-25/+30
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-9/+9
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-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-3/+4
2013-06-01rustc/rusti/rustpkg: Infer packages from `extern mod` directivesTim Chevalier-2/+4
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-29Further refactor optimization pass handlingJames Miller-0/+2
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-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-28Silence various warnings throughout test modulesAlex Crichton-2/+2
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-22librustc: Disable borrow check debugging even when rustc is compiled with -O0.Patrick Walton-3/+10
This improves -O0 compile times dramatically.
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-1/+1
2013-05-17Change lints to indicate exactly where the level was setAlex Crichton-9/+0
2013-05-17Re-implement lint with less emphasis on item idsAlex Crichton-10/+9
This way it's much easier to add lints throughout compilation correctly, and functions on impls can alter the way lints are emitted.
2013-05-12librustc: Make `self` and `static` into keywordsPatrick Walton-2/+2
2013-05-10auto merge of #6356 : dotdash/rust/strinterner, r=pcwaltonbors-2/+2
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-09auto merge of #6325 : sammykim/rust/lint-name, r=graydonbors-0/+1
Fix #3525.
2013-05-09Use a specialized string interner to reduce the need for owned stringsBjörn Steinbrink-2/+2
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-09Add spaceSangeun Kim-1/+1
2013-05-08Show lint namesSangeun Kim-0/+1
2013-05-06refinement to technique used to not run regionckNiko Matsakis-0/+3
2013-05-05Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-30/+21
Conflicts: src/libcore/core.rc src/libcore/hashmap.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/num/float.rs src/libcore/num/int-template.rs src/libcore/num/num.rs src/libcore/num/strconv.rs src/libcore/num/uint-template.rs src/libcore/ops.rs src/libcore/os.rs src/libcore/prelude.rs src/libcore/rt/mod.rs src/libcore/unstable/lang.rs src/librustc/driver/session.rs src/librustc/middle/astencode.rs src/librustc/middle/borrowck/check_loans.rs src/librustc/middle/borrowck/gather_loans.rs src/librustc/middle/borrowck/loan.rs src/librustc/middle/borrowck/preserve.rs src/librustc/middle/liveness.rs src/librustc/middle/mem_categorization.rs src/librustc/middle/region.rs src/librustc/middle/trans/base.rs src/librustc/middle/trans/inline.rs src/librustc/middle/trans/reachable.rs src/librustc/middle/typeck/check/_match.rs src/librustc/middle/typeck/check/regionck.rs src/librustc/util/ppaux.rs src/libstd/arena.rs src/libstd/ebml.rs src/libstd/json.rs src/libstd/serialize.rs src/libstd/std.rc src/libsyntax/ast_map.rs src/libsyntax/parse/parser.rs src/test/compile-fail/borrowck-uniq-via-box.rs src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs src/test/run-pass/borrowck-nested-calls.rs
2013-05-04make asm_comments something that you opt in toNiko Matsakis-3/+3
2013-05-03auto merge of #6198 : luqmana/rust/linker-arg, r=graydonbors-1/+3
2013-05-03rustpkg: Handle sysroot more correctlyTim Chevalier-1/+1
In rustpkg, pass around sysroot; in rustpkg tests, set the sysroot manually so that tests can find libcore and such. With bonus metadata::filesearch refactoring to avoid copies.
2013-05-03librustc: Add argument to allow choosing "linker"Luqman Aden-1/+3
2013-05-01auto merge of #6174 : sanxiyn/rust/static-string, r=brsonbors-14/+14
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-7/+0
2013-05-02Take string slicesSeo Sanghyeon-14/+14
2013-04-30new borrow checker (mass squash)Niko Matsakis-0/+8
2013-04-30Change flags to -Z print-link-args and --link-argsJames Miller-5/+2
2013-04-29Adds '--print-link-args' that outputs linker arguments that would be usedJames Miller-0/+5
2013-04-29Add `--linker` option to pass flags to the linkerJames Miller-0/+2
2013-04-27only use #[no_core] in libcoreDaniel Micay-2/+0
2013-04-22Choose target featuresSeo Sanghyeon-0/+2
2013-04-19rustc: de-mode + fallout from libsyntax changesAlex Crichton-4/+4
2013-04-18rustc: One less copyTim Chevalier-2/+2
2013-04-16libcore,std,syntax,rustc: move tests into `mod tests`, make them private (no ↵Huon Wilson-10/+10
pub mod or pub fn).
2013-04-10Add #[start] attribute to define a new entry point functionJames Miller-1/+12
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-4/+2
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-7/+7
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-23/+23
2013-03-22rustc: replace uses of old deriving attribute with new oneAndrew Paseltiner-3/+3
2013-03-13librustc: Remove "base types" from the language.Patrick Walton-39/+39
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-3/+3