summary refs log tree commit diff
path: root/src/librustc/util
AgeCommit message (Collapse)AuthorLines
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-6/+6
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-28Removing unused importsAlex Crichton-2/+2
2013-03-26Move ast_map::map to LinearMapAlex Crichton-7/+7
2013-03-26rustc: Remove uses of oldmap::HashMapAlex Crichton-4/+2
2013-03-21auto merge of #5466 : Kimundi/rust/view-slice-rename, r=bstriebors-1/+1
A slice now always refers to something that returns an borrowed pointer, views don't exist anymore. If you want to have an explictit copy of a slice, use `to_owned()`
2013-03-21auto merge of #5470 : sanxiyn/rust/remove-oldmap-2, r=sanxiynbors-0/+10
Referencing #4986.
2013-03-21back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> ↵Marvin Löbel-1/+1
slice_unique
2013-03-21Move the function to time passes to utilSeo Sanghyeon-0/+10
2013-03-21renamed str::view -> slice_DBG_BRWDMarvin Löbel-1/+1
renamed str::slice -> slice_DBG_UNIQ changed vec slice method -> to_owned() renamed vec view method -> slice_V_DBG_BRWD
2013-03-20Refactor the self-info so that the def-id is carried in ty_self()Niko Matsakis-1/+1
and the fn_ctxt doesn't need any self_info field at all. Step towards fixing `fn(&self)` (cc #4846) to have a distinct lifetime.
2013-03-20rustc: Remove some bad copies throughoutAlex Crichton-10/+10
2013-03-18libsyntax: Stop parsing old lifetimes, except for the ones on data type ↵Patrick Walton-22/+21
declarations.
2013-03-13librustc: Separate out trait storage from evec/estr storagePatrick Walton-2/+11
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-1/+1
2013-03-07librustc: Remove structural record types from the compilerPatrick Walton-7/+2
2013-03-04Remove unused imports throughout src/Alex Crichton-8/+0
2013-03-02librustc: Remove `fn@`, `fn~`, and `fn&` from librustc. rs=defunPatrick Walton-2/+2
2013-02-28Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-1/+4
2013-02-27Turn old `drop` blocks into `Drop` traitsBen Striegel-1/+4
2013-02-27Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-7/+7
2013-02-25libsyntax: progress on making syntax::visit vecs_implicitly_copyable-freeErick Tryzelaar-5/+5
2013-02-23Fix slice printingoncemoreification-3/+1
2013-02-22Fix vector syntax in error messagesoncemoreification-6/+8
2013-02-19librustc: change driver::session::Session::str_of to return @~strErick Tryzelaar-3/+4
2013-02-15librustc: Get rid of `move`.Luqman Aden-1/+1
2013-02-07Make ~fn non-copyable, make &fn copyable, split barefn/closure types,Niko Matsakis-74/+85
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-02-05oldmap: use &K instead of K in find and getPatrick Walton-3/+3
This reverts commit a4250a96fdf61142a9c8dbb6d37ae8435c99e396. This is not the cause of the nonexhaustive-match failure.
2013-02-05Revert "oldmap: use &K instead of K in find and get"Graydon Hoare-3/+3
This reverts commit 8e643525d4e5bca993dada43615916c382a0645b.
2013-02-03oldmap: use &K instead of K in find and getDaniel Micay-3/+3
2013-02-03rename map -> oldmap and mark it as deprecatedDaniel Micay-2/+2
LinearMap is quite a bit faster, and is fully owned/sendable without requiring copies. The older std::map also doesn't use explicit self and relies on mutable fields.
2013-01-31Finalize moves-based-on-type implementation.Niko Matsakis-2/+9
Changes: - Refactor move mode computation - Removes move mode arguments, unary move, capture clauses (though they still parse for backwards compatibility) - Simplify how moves are handled in trans - Fix a number of illegal copies that cropped up - Workaround for bug involving def-ids in params (see details below) Future work (I'll open bugs for these...): - Improve error messages for moves that are due to bindings - Add support for moving owned content like a.b.c to borrow check, test in trans (but I think it'll "just work") - Proper fix for def-ids in params Def ids in params: Move captures into a map instead of recomputing. This is a workaround for a larger bug having to do with the def-ids associated with ty_params, which are not always properly preserved when inlining. I am not sure of my preferred fix for the larger bug yet. This current fix removes the only code in trans that I know of which relies on ty_param def-ids, but feels fragile.
2013-01-29librustc: De-export back, lib, and util. rs=deexportingPatrick Walton-43/+42
2013-01-29libstd: Remove "dual impls" from the language and enforce coherence rules. ↵Patrick Walton-5/+4
r=brson "Dual impls" are impls that are both type implementations and trait implementations. They can lead to ambiguity and so this patch removes them from the language. This also enforces coherence rules. Without this patch, records can implement traits not defined in the current crate. This patch fixes this, and updates all of rustc to adhere to the new enforcement. Most of this patch is fixing rustc to obey the coherence rules, which involves converting a bunch of records to structs.
2013-01-28Link the lifetimes of regions resulting from borrows of theNiko Matsakis-0/+6
contents of other borrowed pointers to the lifetimes of the borrowed value. Fixes #3148. r=catamorphism
2013-01-24remove unnecessary codeILyoan-6/+0
2013-01-22Make borrowck's notion of scopes consistent with trans's notion of scopesTim Chevalier-0/+3
This eliminates an ICE in trans where the scope for a particular borrow was a statement ID, but the code in trans that does cleanups wasn't finding the block with that scope. As per #3860 preserve looks at a node ID to see if it's for a statement -- if it is, it uses the enclosing scope instead when updating the map that trans looks at later. I added a comment noting that this is not the best fix (since it may cause boxes to be frozen for longer than necessary) and referring to #3511. r=nmatsakis
2013-01-20rustc: Print out region errors involving a function scope properlyTim Chevalier-0/+4
2013-01-19Handle region errors where the actual scope is a statementTim Chevalier-0/+3
Prevents a case of "unknown scope, this is a bug". I judged this too small to review. Closes #4500
2013-01-15librustc: Make the default sigil for block lambdas `&` instead of `@`.Graydon Hoare-4/+6
2013-01-09A collection of refactorings that I found it hard/tiresome to divide:Niko Matsakis-14/+22
- Make `extern fn()` assignable to any closure type, rather than a subtype. - Remove unused int_ty_set and float_ty_set - Refactor variable unification and make it more DRY - Do fn sub/lub/glb on the level of fn_sig - Rename infer::to_str::ToStr to infer::to_str::InferStr - Capitalize names of various types - Correct hashing of FnMeta - Convert various records-of-fns into structs-of-fns. This is both eliminating use of deprecated features and more forwards compatible with fn reform. r=pcwalton
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-0/+2
module scope. r=tjc
2013-01-08Revert "librustc: Make unqualified identifier searches terminate at the ↵Patrick Walton-2/+0
nearest module scope. r=tjc" This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-0/+2
module scope. r=tjc
2013-01-08Implement GLB algorithm. (Issue #2263)Niko Matsakis-1/+4
r=brson
2013-01-08Remove ret_style and instead check whether fn return type is botNiko Matsakis-20/+15
cc #3681
2013-01-08Rename identifiers that still use 'alt' to use 'match'Lindsey Kuper-1/+1
This'll be less confusing for anyone who works on match in future.
2013-01-07librustc: Make vectors no longer implicitly copyable in rustc. r=graydonPatrick Walton-7/+12
~20% perf win for trans on -O0, with other minor improvements across the board. No effect on -O2.
2013-01-05librustc: Remove some string allocations. rs=perfPatrick Walton-28/+28
2012-12-27librustc: Terminate name searches at the nearest module scope for paths that ↵Patrick Walton-2/+10
contain at least two components. r=graydon
2012-12-13Rename Send trait to OwnedBrian Anderson-1/+1