about summary refs log tree commit diff
path: root/src/librustc/util
AgeCommit message (Collapse)AuthorLines
2014-03-01librustc: Fix errors arising from the automated `~[T]` conversionPatrick Walton-1/+1
2014-02-26Replace callee_id with information stored in method_map.Eduard Burtescu-3/+9
2014-02-26Rename a few typeck method-related structures to UpperCamelCase.Eduard Burtescu-9/+9
2014-02-22auto merge of #12451 : edwardw/rust/ident-2-name, r=cmrbors-5/+5
Closes #7743.
2014-02-22Represent lifetimes as Names instead of IdentsEdward Wang-5/+5
Closes #7743.
2014-02-21Move time out of extra (cc #8784)Arcterus-1/+2
2014-02-21Changed NonCamelCaseTypes lint to warn by defaultmr.Shu-0/+1
Added allow(non_camel_case_types) to librustc where necesary Tried to fix problems with non_camel_case_types outside rustc fixed failing tests Docs updated Moved #[allow(non_camel_case_types)] a level higher. markdown.rs reverted Fixed timer that was failing tests Fixed another timer
2014-02-20auto merge of #12403 : eddyb/rust/generic-dtors-with-bounds, r=nikomatsakisbors-6/+0
Fix generic Drop impls with trait bounds. Fixes #4252.
2014-02-20move extra::test to libtestLiigo Zhuang-1/+2
2014-02-19Replaced method_map_entry with method_origin and cleaned up vtable checking ↵Eduard Burtescu-6/+0
a bit.
2014-02-19Change the format_args! macro expansion for temporariesEdward Wang-2/+2
Currently, the format_args! macro and its downstream macros in turn expand to series of let statements, one for each of its arguments, and then the invocation of the macro function. If one or more of the arguments are RefCell's, the enclosing statement for the temporary of the let is the let itself, which leads to scope problem. This patch changes let's to a match expression. Closes #12239.
2014-02-14Removed libextra dependency from libsyntax.HeroesGrave-3/+3
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-60/+39
2014-02-13auto merge of #12017 : FlaPer87/rust/replace-mod-crate, r=alexcrichtonbors-1/+1
The first setp for #9880 is to add a new `crate` keyword. This PR does exactly that. I took a chance to refactor `parse_item_foreign_mod` and I broke it down into 2 separate methods to isolate each feature. The next step will be to push a new stage0 snapshot and then get rid of all `extern mod` around the code.
2014-02-13Move base64 and hex from libextra to libserializeLiigo Zhuang-2/+2
2014-02-13Replace `crate` usage with `krate`Flavio Percoco-1/+1
This patch replaces all `crate` usage with `krate` before introducing the new keyword. This ensures that after introducing the keyword, there won't be any compilation errors. krate might not be the most expressive substitution for crate but it's a very close abbreviation for it. `module` was already used in several places already.
2014-02-12Removed ty_type (previously used to represent *tydesc).Eduard Burtescu-2/+1
2014-02-11sha2 -- introduce locals to clarify which subportions are being borrowedNiko Matsakis-3/+5
2014-02-11ppaux -- add Repr implementationsNiko Matsakis-1/+45
2014-02-09std: Move byteswap functions to memBrian Anderson-2/+2
2014-02-08Fixed error starting with uppercasemr.Shu-2/+2
Error messages cleaned in librustc/middle Error messages cleaned in libsyntax Error messages cleaned in libsyntax more agressively Error messages cleaned in librustc more aggressively Fixed affected tests Fixed other failing tests Last failing tests fixed
2014-02-07Removed @self and @Trait.Eduard Burtescu-2/+0
2014-02-02Substitute type params in default type params using them.Eduard Burtescu-7/+19
2014-02-02rustc: Remove the vstore handling of @str and @[].Huon Wilson-1/+0
2014-02-02rustc: remove use of @[].Huon Wilson-4/+4
2014-02-02librustc: Remove uses of `token::ident_to_str()` from librustcPatrick Walton-1/+2
2014-01-31Fix minor doc typosVirgile Andreani-2/+2
2014-01-30Implement default type parameters in generics.Eduard Burtescu-6/+24
2014-01-30Remove Times traitBrendan Zabarauskas-2/+2
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal was then lost after `do` was disabled for closures. It's time to let this one go.
2014-01-27Demote self to an (almost) regular argument and remove the env param.Eduard Burtescu-17/+6
Fixes #10667 and closes #10259.
2014-01-26Fix privacy fallout from previous changeAlex Crichton-2/+2
2014-01-19syntax: convert ast_map to use a SmallIntMap.Huon Wilson-23/+19
NodeIds are sequential integers starting at zero, so we can achieve some memory savings by just storing the items all in a line in a vector. The occupancy for typical crates seems to be 75-80%, so we're already more efficient than a HashMap (maximum occupancy 75%), not even counting the extra book-keeping that HashMap does.
2014-01-17auto merge of #11585 : nikomatsakis/rust/issue-3511-rvalue-lifetimes, r=pcwaltonbors-0/+8
Major changes: - Define temporary scopes in a syntax-based way that basically defaults to the innermost statement or conditional block, except for in a `let` initializer, where we default to the innermost block. Rules are documented in the code, but not in the manual (yet). See new test run-pass/cleanup-value-scopes.rs for examples. - Refactors Datum to better define cleanup roles. - Refactor cleanup scopes to not be tied to basic blocks, permitting us to have a very large number of scopes (one per AST node). - Introduce nascent documentation in trans/doc.rs covering datums and cleanup in a more comprehensive way. r? @pcwalton
2014-01-16Merge Bitwise and BitCount traits and remove from prelude, along with BoundedBrendan Zabarauskas-0/+1
One less trait in std::num, and three less exported in the prelude.
2014-01-15Issue #3511 - Rationalize temporary lifetimes.Niko Matsakis-0/+8
Major changes: - Define temporary scopes in a syntax-based way that basically defaults to the innermost statement or conditional block, except for in a `let` initializer, where we default to the innermost block. Rules are documented in the code, but not in the manual (yet). See new test run-pass/cleanup-value-scopes.rs for examples. - Refactors Datum to better define cleanup roles. - Refactor cleanup scopes to not be tied to basic blocks, permitting us to have a very large number of scopes (one per AST node). - Introduce nascent documentation in trans/doc.rs covering datums and cleanup in a more comprehensive way.
2014-01-12Removed remnants of `@mut` and `~mut` from comments and the type system.Eduard Burtescu-1/+1
2014-01-11Use the right type for self in methods and remove obsoleted items.Eduard Burtescu-2/+1
Fixes #7411, #10615.
2014-01-11Removed obsolete 'e' prefix on ty_evec and ty_estr.Eduard Burtescu-3/+3
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-29/+29
2014-01-07Fixup the rest of the tests in the compilerAlex Crichton-2/+2
2014-01-06Disowned the Visitor.Eduard Burtescu-6/+6
2014-01-03librustc: Remove `@mut` support from the typechecker and borrow checkerPatrick Walton-1/+1
2014-01-03librustc: De-`@mut` the AST mapPatrick Walton-12/+20
2013-12-26librustc: Remove the unused `stmt_map` from the borrow checkerPatrick Walton-3/+0
2013-12-26librustc: Remove `ty_param_defs` from the type contextPatrick Walton-4/+3
2013-12-16librustc: Implement a `Pod` kind for types that can be `memcpy`'d.Patrick Walton-0/+2
This will be used for the new `Cell`.
2013-12-15std::vec: remove unnecessary count parameter on {bytes,Huon Wilson-6/+3
raw}::copy_memory. Slices carry their length with them, so we can just use that information.
2013-12-11Make 'self lifetime illegal.Erik Price-7/+7
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-10Make crate hash stable and externally computable.Jack Moffitt-0/+670
This replaces the link meta attributes with a pkgid attribute and uses a hash of this as the crate hash. This makes the crate hash computable by things other than the Rust compiler. It also switches the hash function ot SHA1 since that is much more likely to be available in shell, Python, etc than SipHash. Fixes #10188, #8523.
2013-12-09Implement LTOAlex Crichton-1/+10
This commit implements LTO for rust leveraging LLVM's passes. What this means is: * When compiling an rlib, in addition to insdering foo.o into the archive, also insert foo.bc (the LLVM bytecode) of the optimized module. * When the compiler detects the -Z lto option, it will attempt to perform LTO on a staticlib or binary output. The compiler will emit an error if a dylib or rlib output is being generated. * The actual act of performing LTO is as follows: 1. Force all upstream libraries to have an rlib version available. 2. Load the bytecode of each upstream library from the rlib. 3. Link all this bytecode into the current LLVM module (just using llvm apis) 4. Run an internalization pass which internalizes all symbols except those found reachable for the local crate of compilation. 5. Run the LLVM LTO pass manager over this entire module 6a. If assembling an archive, then add all upstream rlibs into the output archive. This ignores all of the object/bitcode/metadata files rust generated and placed inside the rlibs. 6b. If linking a binary, create copies of all upstream rlibs, remove the rust-generated object-file, and then link everything as usual. As I have explained in #10741, this process is excruciatingly slow, so this is *not* turned on by default, and it is also why I have decided to hide it behind a -Z flag for now. The good news is that the binary sizes are about as small as they can be as a result of LTO, so it's definitely working. Closes #10741 Closes #10740